io.github.unmateria/msaccess-database
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@io.github.unmateria/msaccess-databaseCreate a form called Invoices with a filter button"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-access
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 can talk 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.
What it can do
Forms & Reports — create, clone, export, import, screenshot, click, type. Full UI automation loop
VBA — read, write, replace, compile, and run procedures. 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_formflags objectively broken layouts (white-on-white text, overlaps, truncation, off-canvas controls). A checker, not a designer — see the note below
Works with Claude Code, Cursor, Windsurf, Continue, or any MCP-compatible client.
Requirements
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
Related MCP server: SQL Server MCP Server
Installation
pip install mcp pywin32Enable VBA object model access
File → Options → Trust Center → Trust Center Settings → Macro Settings
→ check Trust access to the VBA project object model
Or run the included PowerShell script:
.\enable_vba_trust.ps1Register with Claude Code
Global (available in all projects):
claude mcp add access -- python C:\path\to\access_mcp_server.pyProject-only (creates .mcp.json in current directory):
claude mcp add --scope project access -- python C:\path\to\access_mcp_server.pyRegister with other MCP clients
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.).
Tools (68)
Database
Tool | Description |
| Create a new empty |
| Close the COM session and release the |
Database objects
Tool | Description |
| List objects by type ( |
| Export an object's full definition as text |
| Import modified text back (creates or overwrites) |
| Generate a Markdown index of all modules, forms, reports, queries |
| Delete a module, form, report, query, or macro. Requires |
| Create a new form without triggering the "Save As" MsgBox that blocks COM. Optional |
SQL & tables
Tool | Description |
| Run SQL via DAO — SELECT returns rows as JSON ( |
| Execute multiple SQL statements in one call. Supports mixed SELECT/INSERT/UPDATE/DELETE with per-statement results, |
| Show table structure via DAO (fields, types, sizes, required, linked status) |
| Search text in the SQL of ALL queries at once (find which queries reference a table, field, or keyword) |
| Create a table via DAO with full type, default, description and primary key support in one call. More robust than |
| Modify table structure via DAO: add field, delete field (requires |
VBE line-level editing
Tool | Description |
| Read a line range from a VBA module without exporting the whole file |
| Get a procedure's code and position by name |
| List all procedures with their line numbers |
| Replace/insert/delete lines in a VBA module directly via VBE |
| Search text in ONE specific module. To search all modules at once, use |
| Search text across ALL modules/forms/reports in the database at once |
| Replace a full procedure by name (auto-calculates line bounds). Strips misplaced |
| Surgical find/replace within a procedure. Atomic by default (a failed patch writes nothing), case-insensitive anchors, optional |
| Append code at the end of a module. Auto-strips |
Form & report controls
Tool | Description |
| List all controls of a form/report with key properties. Controls inside Pages/OptionGroups include a |
| Get the full definition block of a specific control (finds controls inside Pages/OptionGroups) |
| Create a new control via COM in design view. Supports |
| Delete a control via COM |
| Modify control properties via COM in design view |
| Modify properties of multiple controls in a single design-view session |
| Deterministic check for objectively-broken layout: contrast (WCAG), overlap, out-of-bounds, truncation, sibling inconsistency, zero-size/invisible. Returns |
⚠️ A note on
access_lint_form— manage your expectationsThis is NOT a designer and there is zero super-design here. Don't expect it to make a form look good, suggest a nice palette, or have any taste — it has none and never will.
It is a dumb, 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.
Think seatbelt, 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 😄).
Text export/import
Tool | Description |
| Export form/report/module as text via SaveAsText. Does NOT open Design view. UTF-16 LE output |
| Import form/report/module from text via LoadFromText. Replaces if exists. Auto-splits CodeBehindForm VBA |
Database properties
Tool | Description |
| Read a DB property ( |
| Set a DB property or Access option — creates the property if it doesn't exist |
| Read form or report properties (RecordSource, Caption, DefaultView, etc.). |
| Set form/report properties (RecordSource, Caption, DefaultView, HasModule, etc.) via COM in Design view |
Linked tables
Tool | Description |
| List linked tables with source table, connection string, ODBC flag. |
| Change connection string and refresh link — auto-saves credentials ( |
Relationships
Tool | Description |
| List table relationships with field mappings and cascade flags |
| Create a relationship between two tables (supports cascade update/delete) |
| Delete a relationship by name |
VBA References
Tool | Description |
| List VBA project references with GUID, path, broken/built-in status |
| Add (by GUID or file path) or remove a VBA reference — guards against removing built-in refs |
Maintenance
Tool | Description |
| Compact & repair the database — closes, compacts to temp, swaps atomically, reopens |
| Remove orphaned VBA p-code via |
Query management
Tool | Description |
| Create, modify, delete, rename, or read SQL of a QueryDef. Delete requires |
Indexes
Tool | Description |
| List indexes of a table with fields, primary, unique, foreign flags |
| Create or delete an index. Create requires fields list with optional sort order |
VBA Compilation
Tool | Description |
| Static structural check of the already-open VBA project — no decompile, nothing discarded. The safe post-edit check. Not a compiler: it does not resolve identifiers, types or references |
| Compile and save all VBA modules. Optional |
VBA & macro execution
⚠️ Disabled by default (v0.7.51). These three tools run arbitrary code and are gated behind the
MCP_ACCESS_ALLOW_CODE_EXECenvironment variable. See Security to enable them.
Tool | Description |
| Execute an Access macro by name |
| Execute a VBA Sub/Function. Standard modules via |
| Evaluate a VBA expression via |
Export
Tool | Description |
| Export a report to PDF, XLSX, RTF, or TXT via |
Data transfer
Tool | Description |
| Import/export data between Access and Excel ( |
Field properties
Tool | Description |
| Read all properties of a table field (DefaultValue, ValidationRule, Description, Format, etc.) |
| Set a field property — creates the property if it doesn't exist |
Startup options
Tool | Description |
| List 14 common startup options (AppTitle, StartupForm, AllowBypassKey, etc.) with current values |
Screenshot & UI automation
Tool | Description |
| Capture the Access window as PNG. Optionally opens a form/report first. Returns path, dimensions (original + image), and metadata. Configurable |
| Click at image coordinates on the Access window. Coordinates are relative to a previous screenshot ( |
| Type text or send keyboard shortcuts. |
Cross-reference
Tool | Description |
| Search a name across VBA code, query SQL, and control properties (ControlSource, RecordSource, RowSource, SourceObject, DefaultValue, ValidationRule, LinkChildFields, LinkMasterFields) in one call |
Knowledge base
Tool | Description |
| On-demand tips and gotchas. Topics: |
Typical workflows
Targeted VBA editing (recommended)
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 doneFull 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 automaticallyCreating a new form
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]"})Screenshot & UI interaction
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 resultSecurity
This is a local stdio server with no network surface, so there is no login
by design — see SECURITY.md for the full threat model. The main
risk is prompt injection: an agent tricked (via db_path or 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's env in your MCP client config and restart:
"env": { "MCP_ACCESS_ALLOW_CODE_EXEC": "1" }Enabling grants arbitrary OS command execution; only point the server at trusted databases. See SECURITY.md for details and how to report issues.
Environment variables
Both are read from the server process, so they go in the env block of your MCP
client config and take effect on restart.
Variable | Default | Effect |
| off | Set to |
| on | Set to |
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 a global OS 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 IfApplication.UserControl is 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, AutomationSecurity and the dialog watchdog still apply — but an
unguarded AutoExec macro object will run.
Notes
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.
Known limitations
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.
Troubleshooting
Intermittent -32602 Invalid request parameters errors
The MCP Python SDK (v1.26.0) has a catch-all except Exception in mcp/shared/session.py that swallows real errors and returns a generic -32602 code 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 the mcp package, re-apply the patch — see CLAUDE.md for details.
Changelog
See CHANGELOG.md for the full release history.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables AI to interact with Microsoft Access (.mdb, .accdb) and SQLite 3 databases, including read-only support for Access 97 databases. Supports executing SQL queries, importing/export data from CSV and Excel files, and storing notes about database files.MIT
- Flicense-qualityDmaintenanceEnables AI assistants to interact with SQL Server databases through natural language, providing capabilities for executing queries, exploring schemas, analyzing performance, backing up tables, and managing data with built-in safety limits.
- Alicense-qualityDmaintenanceEnables AI interaction with Microsoft Access and SQLite databases to perform SQL queries, updates, and data management. It supports importing and exporting data via CSV and Excel files and includes tools for managing human-readable notes about database files.7MIT
- Alicense-qualityDmaintenanceEnables AI assistants to connect to and interact with PostgreSQL, MySQL, SQLite, and MongoDB databases through natural language, supporting schema exploration, query execution, data export, and more.MIT
Related MCP Connectors
Give AI agents access to form submissions — read, search, update, and process file attachments.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
GibsonAI MCP server: manage your databases with natural language
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/unmateria/MCP-Access'
If you have feedback or need assistance with the MCP directory API, please join our Discord server