mcp-msaccess
About
Give any AI assistant full control over Microsoft Access databases.
Details
- Author
- unmateria
- Categories
- Database, Other
Jump to
Setup
Install mcp-msaccess in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/unmateria/MCP-Access
Follow the installation instructions in the repository README, then restart your MCP client.
Give any AI assistant full control over Microsoft Access databases.
Create forms, write VBA, design tables, manage controls, run queries, build relationships, and edit every corner of an.accdb— all through natural language. 68 tools that turn Access into something you cantalk to.
No Access expertise required. Just describe what you want.
"Create a form called Invoices with a ListBox, two date filters, and a search button" "Add a VBA click handler that filters the recordsource by date range" "Create a table called audit_log with timestamp, user, and action fields" "List all controls inside the Payment tab and change the combo's row source"
The AI handles the COM automation, design view, VBA modules, binary sections, cache invalidation, and all the ugly parts. You get the result.
- Forms & Reports— create, clone, export, import, screenshot, click, type. Full UI automation loop
- VBA— read, write, replace, compile, andrunprocedures. Line-level or full-proc editing
- Controls— create, delete, modify, list, set tab order. Finds controls nested inside TabControl pages
- Tables & SQL— create via DAO, alter, query, batch execute, full-text search across every Text/Memo field. Linked ODBC tables supported
- Relationships, indexes, references, queries, macros— full CRUD. Clone any object (form / report / module / class / query / macro) preserving VBA and binary sections
- Maintenance— compact & repair, decompile bloated databases, export structure docs. Office install autodetected (no more hardcoded Office 16 paths)
- UI lint—access_lint_formflagsobjectivelybroken layouts (white-on-white text, overlaps, truncation, off-canvas controls). A checker,nota designer — see the note below
Works with Claude Code, Cursor, Windsurf, Continue, or any MCP-compatible client.
- Windows (COM automation is Windows-only)
- Microsoft Access installed (any version that supports VBE, 2010+)
- Python 3.9+
- "Trust access to the VBA project object model"enabled in Access Trust Center
File → Options → Trust Center → Trust Center Settings → Macro Settings→ checkTrust access to the VBA project object model
claude mcp add access -- python C:\path\to\access_mcp_server.py
Project-only(creates.mcp.jsonin current directory):
claude mcp add --scope project access -- python C:\path\to\access_mcp_server.py
Add to your MCP config file (.mcp.json,mcp.json, or client-specific settings):
{ "mcpServers": { "access": { "type": "stdio", "command": "python", "args": ["C:\\path\\to\\access_mcp_server.py"] } } }
Compatible with any MCP-compliant client (Cursor, Windsurf, Continue, etc.).
⚠️ A note onaccess_lint_form— manage your expectations
This is NOT a designer and there is zero super-design here.Don't expect it to make a formlook good, suggest a nice palette, or have any taste — it has none and never will.
It is adumb, deterministic verifier of the obvious, easy-to-check stuff: is the text the same colour as its background? do two controls physically overlap? does a caption not fit its box? is something off the edge of the form, or zero pixels tall? That's it. Plain math — WCAG contrast ratios and rectangle intersection — with a pile of false-positive guards so it doesn't cry wolf.
Thinkseatbelt, not stylist: it won't make the car pretty, it just stops you shipping a form with white text on a white background without noticing. It runs automatically on every control edit so those obvious mistakes surface on their own. If you were hoping for a UI-design AI, this isn't it (honest PRs to make it smarter are very welcome 😄).
⚠️Disabled by default (v0.7.51).These three tools run arbitrary code and are gated behind theMCP_ACCESS_ALLOW_CODE_EXECenvironment variable. SeeSecurityto enable them.
1. access_list_objects → find the module or form name 2. access_vbe_module_info → get procedure list and line numbers 3. access_vbe_get_proc → read the specific procedure 4. access_vbe_replace_lines → apply targeted line-level changes 5. access_close → release the file when done
Full object replacement (forms, reports, modules)
1. access_get_code → export to text 2. (edit the text) 3. access_set_code → reimport — binary sections are restored automatically
1. access_create_form(db, "myForm", has_header=true) → creates empty form 2. access_create_control(db, "form", "myForm", "CommandButton", {Name: "btn1", ...}) 3. access_vbe_append(db, "form", "myForm", code) → add VBA event handlers 4. access_set_form_property(db, "form", "myForm", {HasModule: true, OnCurrent: "[Event Procedure]"})
1. access_screenshot(db, "form", "myForm") → capture form as PNG 2. (LLM reads the image and identifies UI elements) 3. access_ui_click(db, x=850, y=120, image_width=1920) → click a button 4. access_ui_type(db, text="search term") → type in a field 5. access_ui_type(db, key="enter") → press Enter 6. access_screenshot(db) → verify the result
This is alocal stdio serverwith no network surface, so there is no login by design — seeSECURITY.mdfor the full threat model. The main risk isprompt injection: an agent tricked (viadb_pathor content it reads out of the database) into calling a code-execution tool.
Code execution is disabled by default (v0.7.51).The three tools that run arbitrary VBA/Shell —access_run_vba,access_eval_vba,access_run_macro— are hidden and rejected unless you opt in with an environment variable. To re-enable, add it to this server'senvin your MCP client config andrestart:
"env": { "MCP_ACCESS_ALLOW_CODE_EXEC": "1" }
Enabling grants arbitrary OS command execution; only point the server at trusted databases. SeeSECURITY.mdfor details and how to report issues.
Both are read from the server process, so they go in theenvblock of your MCP client config and take effect onrestart.
About the SHIFT bypass (v0.7.53).Holding SHIFT is how the server skips a database's AutoExec macro and startup form, but the key-down is aglobalOS event — it is not scoped to Access, so anything you type anywhere on the machine while it is held arrives capitalised (~0.3 s on every database switch, ~3 s per decompile). Turn it off if that bothers you and your databases guard their own startup, which is the cleaner fix and belongs in the database:
If Not Application.UserControl Then Exit Function End If
Application.UserControlis False when Access was started via COM, so the database opts itself out under automation and needs no bypass at all. With the bypass off,AutomationSecurityand the dialog watchdog still apply — but an unguarded AutoExecmacro objectwill run.
- Access runs visible (Visible = True) so VBE COM access works correctly.
- One Access instance is shared across all tool calls (singleton session). Opening a different.accdbcloses the previous one.
- COM thread isolation: All COM calls run in a dedicated single-thread executor (_com_executor) withCoInitialize(). This keeps COM in one STA thread while the asyncio event loop stays free for stdio I/O, preventing-32602errors from message corruption.
- Auto-reconnect: if the COM session becomes stale (Access crashed, closed manually, or COM corruption), the server detects it via a health check and reconnects automatically on the next tool call.
- access_get_codestrips binary sections (PrtMip,PrtDevMode, etc.) from form/report exports —access_set_coderestores them automatically before importing.
- All VBE line numbers are 1-based.
- ActiveX controls(type 119 =acCustomControl):access_create_controlnow accepts aclass_nameparameter with the ProgID (e.g.Shell.Explorer.2) to initialize the OLE control. For WebBrowser specifically, use type 128 (acWebBrowser) which creates a native control without OLE complexity. Settingctrl.Classfrom COM may not work for all ActiveX controls — manual insertion from the ribbon remains the most reliable method.
- access_run_vba: Now supports form module procedures viaForms.FormName.Methodsyntax (direct COM access, form must be open). Also supportstimeoutparameter — if exceeded, auto-dismisses MsgBox/InputBox dialogs. For more flexible form interaction, useaccess_eval_vba.
- Timer events(Form_Timer): Now fire duringaccess_screenshotwhenwait_ms > 0— the wait loop pumps Windows messages viapythoncom.PumpWaitingMessages(). Other tools still block the message pump.
- access_vbe_appendpreviously HTML-encoded&as&due to MCP transport escaping. Fixed in v0.7.3 with explicithtml.unescape()decoding.
Intermittent-32602 Invalid request parameterserrors
The MCP Python SDK (v1.26.0) has a catch-allexcept Exceptioninmcp/shared/session.pythat swallows real errors and returns a generic-32602code with no detail. A local patch is applied to this machine that includes the actual exception and traceback in the error response. If you upgrade themcppackage, re-apply the patch — seeCLAUDE.mdfor details.
SeeCHANGELOG.mdfor the full release history.
Official MCP server for dbt (data build tool) providing integration with dbt Core/Cloud CLI, project metadata discovery, model information, and semantic layer querying capabilities.
Open source MCP server specializing in easy, fast, and secure tools for Databases.
Query and analyze data with MotherDuck and local DuckDB
Query Streams securely connects MCP clients to live databases through the Query Streams Cloud Network, with no VPNs, inbound ports, or complex setup.
Interact with the SingleStore database platform
Official Supabase MCP server for managing Supabase projects, databases, auth, storage, edge functions, and SQL workflows from AI agents.
A collection of tools for managing the platform, addressing data quality and reading and writing to Teradata Database.
Multi-database agent access (PostgreSQL, SQLite, MySQL, Oracle, SQL Server) with batch queries, pre-configured connections, and SQLGlot-enforced read-only safety
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





