aimm-mcp

aimm-mcp

Local MCP server for AI Model Manager that captures SQL data-model metadata and exposes it to MCP clients over stdio.

Category
访问服务器

README

aimm-mcp

Local Model Context Protocol server for the AI Model Manager. Captures SQL data-model metadata as one JSON file per project (<slug>.aimm.json) and exposes it to Claude Code (or any MCP client) over stdio.

Fork of the AIMM VS Code extension, rebuilt in Python with no UI: just tools the agent calls. Both the VS Code extension and this server read/write the same project-file format — share a project by committing one .aimm.json to your repo.

Why this exists

The VS Code extension lives inside an editor. This fork lets you skip the editor entirely — install once with claude mcp add, and any Claude session on the machine sees the same models.

Install

One line. Claude Code spawns the server via uvx (uv's npx) — no prior install, no setup.

claude mcp add aimm --scope user -- uvx aimm-mcp

First connection downloads the package (a few seconds). Subsequent connections are cache-served.

For testing from a local checkout before PyPI, see LOCAL_INSTALL.md.

Where state lives

Two concepts: machine-local sidecars (always at ~/Documents/AIMM/) and project files (anywhere you point them, default the same folder).

~/Documents/AIMM/                    machine-local, never moves
├── state.json                       which folder + which active project
├── discovered_joins.json            scan output (not project state)
└── diagnostics.log                  ODBC query append-log

<projects_folder>/                   defaults to ~/Documents/AIMM/
├── customer_warehouse.aimm.json     one project
├── reporting_model.aimm.json        another project
└── …

A team checks <projects_folder> into a git repo. The agent runs aimm_set_projects_folder to point at the local clone, then aimm_list_projects + aimm_set_active_project to pick one. The "active project" pointer survives across Claude Code sessions.

No derived snapshots on disk. Renderings (XML / markdown / raw JSON) happen in-memory when aimm_read_project_context is called.

Engines

Three engines via ODBC: trino, sql_server, databricks. Connection descriptors carry a DSN name (system DSN registered at the OS level) plus the catalog / database qualifier.

Tools

Session / context

The agent must select an active project before any project-touching tool runs — these tools handle that bootstrap.

  • aimm_set_projects_folder — point the server at a folder of .aimm.json files (defaults to ~/Documents/AIMM/). Use to switch to a team repo of shared projects. Clears the active pointer.
  • aimm_list_projects — enumerate .aimm.json files in the current folder with their internal project name + updated_at.
  • aimm_set_active_project — pick one as active. Subsequent tool calls read and write that file.
  • aimm_show_active_project — report the current pointer state (folder + active file + on-disk status).

Project + context

  • aimm_init_project — create a new <slug>.aimm.json (slug derived from name) in the current folder, set it as active.
  • aimm_read_project_context — return the entire active project. Formats: xml (default), markdown, json (raw bytes of the active file).

Connections + live catalog

  • aimm_upsert_connection — create / update a connection descriptor. Validates Trino catalog requirement.
  • aimm_list_system_dsns — pyodbc.dataSources() wrapper for discovery before upsert.
  • aimm_browse_connection — drill into schemas / tables / columns on a live connection. Optional case-insensitive search filter.
  • aimm_refresh_columns — re-fetch column shapes from information_schema and merge back into the active project (preserves user-edited PK / FK / description flags).

Table mutations

  • aimm_update_table — patch any non-identity field on a tracked table. Creates on first patch.
  • aimm_set_primary_key — atomically set primary_keys + flip is_primary_key on matching columns.
  • aimm_add_relationship — append an FK edge (idempotent on duplicates, composite keys supported).
  • aimm_add_upstream — append a lineage edge.

Semantic context (the "what it means" layer)

The structural fields above tell the agent what's there. These tell it what those things mean — captured once, surfaced on every subsequent aimm_read_project_context call.

  • aimm_set_table_grain — one-line "what is a row?" per table.
  • aimm_add_pitfall — append-with-dedupe to a table's "don't do this" list.
  • aimm_set_column_classification — flag a column as pii / phi / restricted / internal / public.
  • aimm_add_glossary_term — upsert a domain-vocabulary entry.
  • aimm_add_measure — upsert a KPI / metric with definition + formula.
  • aimm_update_project_config — patch the project header (description, conventions, dialect, default_connection, modeling_paradigm, tags).

Folder scan for joins

  • aimm_scan_folder_for_joins — walk a local folder of .sql files, extract JOIN clauses via sqlglot (multi-dialect fallback: tsql → spark → none), persist canonical edges to ~/Documents/AIMM/discovered_joins.json. Works without an active project.

Diagnostics

  • aimm_show_diagnostics_log — tail of diagnostics.log where every ODBC query is recorded.

Pending changes

  • aimm_get_pending_changes — per-tracked-table diff between authored columns and the live information_schema shape.

Why ODBC?

Every warehouse this targets exposes an ODBC driver. We never run user SQL — only information_schema reads for column / table / schema metadata. Drivers stay read-only at the credential level.

Development

uv sync --dev
uv run python -m aimm_mcp        # starts the MCP stdio server
uv run pytest -q                 # tests

License

MIT.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选