MCP Access MCP Server

Create forms, write VBA, design tables, manage controls, run queries, build relationships, and edit every corner of an `.accdb` — all through natural

Local serverstdioPython

What is the MCP Access MCP Server?

Create forms, write VBA, design tables, manage controls, run queries, build relationships, and edit every corner of an .accdb — all through natural language. 68

Credentials and setup notes

  • 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

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
access_create_databaseCreate a new empty .accdb database file
access_closeClose the COM session and release the .accdb file
access_list_objectsList objects by type (table, module, form, report, query, macro, all). System tables filtered
access_get_codeExport an object's full definition as text
access_set_codeImport modified text back (creates or overwrites)
access_export_structureGenerate a Markdown index of all modules, forms, reports, queries
access_delete_objectDelete a module, form, report, query, or macro. Requires confirm=true
access_create_formCreate a new form without triggering the "Save As" MsgBox that blocks COM. Optional has_header for header/footer section, record_source (bind to table/query), d
access_execute_sqlRun SQL via DAO — SELECT returns rows as JSON (limit default 500). DELETE/DROP/ALTER require confirm_destructive=true
access_execute_batchExecute multiple SQL statements in one call. Supports mixed SELECT/INSERT/UPDATE/DELETE with per-statement results, stop_on_error, and confirm_destructive
access_table_infoShow table structure via DAO (fields, types, sizes, required, linked status)
access_search_queriesSearch text in the SQL of ALL queries at once (find which queries reference a table, field, or keyword)
access_create_tableCreate a table via DAO with full type, default, description and primary key support in one call. More robust than CREATE TABLE SQL
access_alter_tableModify table structure via DAO: add field, delete field (requires confirm=true), rename field
access_vbe_get_linesRead a line range from a VBA module without exporting the whole file
access_vbe_get_procGet a procedure's code and position by name
access_vbe_module_infoList all procedures with their line numbers
access_vbe_replace_linesReplace/insert/delete lines in a VBA module directly via VBE
access_vbe_findSearch text in ONE specific module. A hit on a statement wrapped with _ also returns the whole joined statement. To search all modules at once, use access_vbe_s
access_vbe_search_allSearch text across ALL modules/forms/reports in the database at once. A hit on a statement wrapped with _ also returns the whole joined statement. Optional cont
access_vbe_replace_procReplace a full procedure by name (auto-calculates line bounds). Strips misplaced Option lines, runs structural health check
access_vbe_patch_procSurgical find/replace within a procedure. Atomic by default (a failed patch writes nothing), case-insensitive anchors, optional require_unique, whitespace-toler
access_vbe_appendAppend code at the end of a module. Auto-strips Option Explicit/Option Compare to prevent misplacement
access_list_controlsList all controls of a form/report with key properties. Long values split across lines in the export are returned joined. Controls inside Pages/OptionGroups inc
access_get_controlGet the full, unabridged definition block of a specific control — where to go for a property access_list_controls does not return (finds controls inside Pages/O
access_search_controlsSearch text or regex in the control properties of every form/report (ControlSource, RowSource, Caption, Tag, Filter… or properties=["all"]). Values split across
access_create_controlCreate a new control via COM in design view. Supports class_name for ActiveX (type 119) ProgID initialization. Use type 128 (acWebBrowser) for native WebBrowser
access_delete_controlDelete a control via COM
access_set_control_propsModify control properties via COM in design view
access_set_multiple_controlsModify properties of multiple controls in a single design-view session
access_lint_formDeterministic check for objectively-broken layout: contrast (WCAG), overlap, out-of-bounds, truncation, sibling inconsistency, zero-size/invisible. Returns verd
access_export_textExport form/report/module as text via SaveAsText. Does NOT open Design view. UTF-16 LE output
access_import_textImport form/report/module from text via LoadFromText. Replaces if exists. Auto-splits CodeBehindForm VBA
access_get_db_propertyRead a DB property (CurrentDb.Properties) or Access option (GetOption)
access_set_db_propertySet a DB property or Access option — creates the property if it doesn't exist
access_get_form_propertyRead form or report properties (RecordSource, Caption, DefaultView, etc.). object_type required (form or report). Omit property_names for all
access_set_form_propertySet form/report properties (RecordSource, Caption, DefaultView, HasModule, etc.) via COM in Design view
access_list_linked_tablesList linked tables with source table, connection string, ODBC flag. name='X' returns one table; names_only=true is a light listing (no connect strings — use it
access_relink_tableChange connection string and refresh link — auto-saves credentials (dbAttachSavePWD) when UID/PWD detected. relink_all=true updates all tables with the same ori
access_list_relationshipsList table relationships with field mappings and cascade flags
access_create_relationshipCreate a relationship between two tables (supports cascade update/delete)
access_delete_relationshipDelete a relationship by name
access_list_referencesList VBA project references with GUID, path, broken/built-in status
access_manage_referenceAdd (by GUID or file path) or remove a VBA reference — guards against removing built-in refs
access_compact_repairCompact & repair the database — closes, compacts to temp, swaps atomically, reopens
access_decompile_compactRemove orphaned VBA p-code via /decompile, recompile, then compact. Typical reduction: 60-70% on heavily-edited front-end databases. Use when a data-free .accdb
access_manage_queryCreate, modify, delete, rename, or read SQL of a QueryDef. Delete requires confirm=true
access_list_indexesList indexes of a table with fields, primary, unique, foreign flags
access_manage_indexCreate or delete an index. Create requires fields list with optional sort order
access_vbe_check_syntaxStatic structural check of the already-open VBA project — no decompile, nothing discarded. The safe post-edit check. Not a compiler: it does not resolve identif
access_compile_vbaCompile and save all VBA modules. Optional timeout to auto-dismiss error MsgBox. Decompiles first and can discard unsaved VBA — for a quick check use access_vbe
access_run_macroExecute an Access macro by name
access_run_vbaExecute a VBA Sub/Function. Standard modules via Application.Run, form modules via Forms.FormName.Method syntax (COM). Optional timeout auto-dismisses MsgBox/In
access_eval_vbaEvaluate a VBA expression via Application.Eval. Domain functions, VBA built-ins, open form properties, standard module functions. Auto-fallback via temp module
access_output_reportExport a report to PDF, XLSX, RTF, or TXT via DoCmd.OutputTo
access_transfer_dataImport/export data between Access and Excel (.xlsx) or CSV. Supports range (Excel) and spec_name (CSV)
access_get_field_propertiesRead all properties of a table field (DefaultValue, ValidationRule, Description, Format, etc.)
access_set_field_propertySet a field property — creates the property if it doesn't exist
access_list_startup_optionsList 14 common startup options (AppTitle, StartupForm, AllowBypassKey, etc.) with current values
access_screenshotCapture the Access window as PNG. Optionally opens a form/report first. Returns path, dimensions (original + image), and metadata. Configurable max_width (defau
access_ui_clickClick at image coordinates on the Access window. Coordinates are relative to a previous screenshot (image_width required for scaling). Supports left, double, an
access_ui_typeType text or send keyboard shortcuts. text for normal characters (WM_CHAR), key for special keys (enter, tab, escape, f1-f12, arrows, etc.), modifiers for combo
access_find_usagesSearch a name across VBA code, query SQL, and control properties (ControlSource, RecordSource, RowSource, SourceObject, DefaultValue, ValidationRule, LinkChildF
access_tipsOn-demand tips and gotchas. Topics: eval, controls, gotchas, sql, vbe, compile, design. Zero tokens until called

How to install the MCP Access MCP Server

{
  "mcpServers": {
    "access": {
      "type": "stdio",
      "command": "python",
      "args": [
        "C:\\path\\to\\access_mcp_server.py"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • 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

Example prompts to try

  • “Use MCP Access to Database.”
  • “Use MCP Access to Relationships.”
  • “Use MCP Access to Maintenance.”

Frequently asked questions

Create forms, write VBA, design tables, manage controls, run queries, build relationships, and edit every corner of an `.accdb` — all through natural language. 68 Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.