Labsco
MCP SERVER

MCP Msaccess

by unmateria

Build and repair a Microsoft Access database by describing it — forms, VBA, tables, relationships and all the COM plumbing underneath.

Relational SQL Databases
Summary
The rare Access tool that goes all the way into design view and the VBE, rather than just running queries against the file.

Creating a form, adding controls inside a tab page, and attaching a VBA click handler are the operations that normally force you into the Access UI; here they are calls, and the layout checker runs after each control edit so obvious breakage surfaces immediately. Code execution is the sharp edge and the author treats it as one: run, eval and macro tools stay off until you set the environment variable that enables them.

What it is

A Windows server that drives Access through COM: it opens an .accdb, works in design view, edits the VBA project, and closes the file again.

What you get
  • Forms and reports created, cloned, exported and imported as text, with binary sections preserved on the way back in
  • Controls handled properly: created, deleted, listed and modified in design view, including controls nested inside TabControl pages, plus tab order and bulk property changes in one session
  • VBA edited at the line or procedure level — read a range, get a procedure with its bounds, replace lines, or patch inside a procedure atomically so a failed patch writes nothing
  • Search that spans the project: one module, every module at once, or a name traced across VBA, query SQL and control properties such as ControlSource and RowSource
  • Tables and SQL through DAO: create with types, defaults and primary keys, alter fields, run statements, batch several with per-statement results, and inspect structure including linked ODBC tables
  • Relationships, indexes, saved queries, VBA references and field properties, each with the full create/read/update/delete set
  • A UI automation loop — screenshot the Access window, click at image coordinates, type text or send keys, screenshot again to verify
  • A deterministic layout check that flags white-on-white text, overlapping controls, truncated captions, off-canvas and zero-size controls, returning PASS, REVIEW or FAIL, and running on every control edit
  • Maintenance: compact and repair, decompile to strip orphaned p-code from a bloated front end, export a Markdown index of the objects, and read or set database and startup options
  • Report export to PDF, XLSX, RTF or TXT, and data transfer both ways with Excel and CSV
Requirements

Windows, because the whole thing runs on COM automation, with Microsoft Access installed (any version with the VBE, 2010 or later) and Python 3.9+. Trust access to the VBA project object model has to be enabled in Access Trust Center — there is a PowerShell script in the repo that sets it. Published on PyPI as mcp-msaccess-database and run over stdio; no login, because there is no network surface. The three tools that execute arbitrary VBA or macros are hidden and rejected unless you opt in with MCP_ACCESS_ALLOW_CODE_EXEC.

Setup effort

One command — uvx mcp-msaccess-database