atlas-introspect-mcp

atlas-introspect-mcp

Enables introspection and configuration of a running ATLAS instance, including browsing chat history, editing config/mcp.json, and managing workspaces and custom prompts.

Category
访问服务器

README

atlas-introspect-mcp

An MCP server that lets ATLAS look at — and edit — itself:

surface what you get how
conversations list, search, read full chat history ATLAS REST API (read-only)
config/mcp.json read, add/replace/delete a server, replace the file on disk, atomic + backed up
workspaces list, create, update, delete ATLAS REST API
custom prompts the per-user prompt library ATLAS REST API
prompt files the on-disk prompts/*.md defaults on disk, backed up

Why it goes through the HTTP API

Chat history, workspaces, and prompts all live in one DuckDB file (data/chat_history.db). DuckDB is single-writer and the ATLAS process holds that write lock for its entire lifetime — a second process opening the file, even read-only, fails with a lock conflict. So this server asks ATLAS over loopback HTTP instead. That also means per-user scoping is enforced by ATLAS rather than reimplemented here.

Only mcp.json and prompts/*.md are touched directly; ATLAS has no API for either.

Being a separate process is what makes calling back into ATLAS safe: ATLAS awaits this server's stdio reply while its own event loop stays free to serve the request. An in-process tool doing the same thing would deadlock.

Identity

Every query is scoped to one user, sent as X-User-Email. With DEBUG_MODE=true ATLAS honours that header; with it off, the header is what the auth proxy would have supplied, so the same flag works either way. The default is test@test.com — the test user ATLAS falls back to in debug mode, and therefore the owner of the conversations created through the UI on this host.

Install

git clone https://github.com/garland3/atlas-introspect-mcp
cd atlas-introspect-mcp
uv venv .venv
uv pip install -e ".[dev]" --python .venv/bin/python

Standalone check (with ATLAS running):

.venv/bin/atlas-introspect-mcp --list-tools
.venv/bin/python -c "
import asyncio; from fastmcp import Client
from fastmcp.client.transports import StdioTransport
async def m():
    async with Client(StdioTransport(command='.venv/bin/atlas-introspect-mcp', args=['--stdio'])) as c:
        print(await c.call_tool('atlas_status', {}))
asyncio.run(m())"

Register with ATLAS

Add to your ATLAS config/mcp.json (absolute paths — the command is looked up on the service manager's PATH, not your shell's), then restart ATLAS:

"atlas_introspect": {
  "command": [
    "/abs/path/to/atlas-introspect-mcp/.venv/bin/atlas-introspect-mcp",
    "--stdio",
    "--atlas-url", "http://127.0.0.1:8090",
    "--user", "test@test.com"
  ],
  "cwd": "/abs/path/to/atlas-introspect-mcp",
  "transport": "stdio",
  "groups": ["users"],
  "description": "Introspect and configure this ATLAS instance: browse chat history, read/edit config/mcp.json, manage workspaces and custom prompts.",
  "short_description": "ATLAS self-introspection",
  "compliance_level": "Public"
}

Add "--read-only" to the command for a view-only build; every mutating tool then refuses instead of writing.

Ports: stdio needs none. --transport http defaults to 8101. It refuses port 8080 outright — on a host running k3s, klipper-lb DNATs 8080 to Traefik including on 127.0.0.1, so a server bound there receives nothing and every request comes back as an empty 500 with no line in your log.

Configuration

Every flag has an environment-variable equivalent.

flag env var default
--atlas-url ATLAS_URL http://127.0.0.1:8090
--user ATLAS_USER test@test.com
--auth-header ATLAS_AUTH_HEADER X-User-Email
--atlas-home ATLAS_HOME ~/ATLAS-GROUP/atlas-ui-3
--config-dir ATLAS_CONFIG_DIR <atlas-home>/config
--prompts-dir ATLAS_PROMPTS_DIR <atlas-home>/prompts
--timeout ATLAS_TIMEOUT 30 seconds
--max-output-chars ATLAS_MAX_OUTPUT 100000
--read-only ATLAS_INTROSPECT_READ_ONLY off
--transport ATLAS_INTROSPECT_TRANSPORT stdio
--port ATLAS_INTROSPECT_PORT 8101 (http transport only)

Tools

Conversations (read-only) — list_conversations, search_conversations, get_conversation, list_conversation_tags

config/mcp.json — get_mcp_config, upsert_mcp_server, delete_mcp_server, replace_mcp_config

Workspaces — list_workspaces, create_workspace, update_workspace, delete_workspace

Custom prompts — list_custom_prompts, get_custom_prompt, create_custom_prompt, update_custom_prompt, delete_custom_prompt

On-disk prompt files — list_prompt_files, read_prompt_file, write_prompt_file

Health — atlas_status

Things that will bite

  • mcp.json edits are not live. ATLAS spawns stdio servers at startup. Every write tool says so in its result; apply with systemctl --user restart atlas or ./redeploy.sh --no-pull.
  • Editing your own entry works, but only takes effect on restart — at which point a broken entry means this server is gone and you cannot fix it from inside ATLAS. Backups land next to the file as mcp.json.bak-<stamp>.
  • upsert_mcp_server replaces an entry wholesale, it does not merge. Read it first, change it, send the whole thing back. Same for a workspace config and a prompt's content.
  • Conversation tools are read-only by design. There are delete endpoints in ATLAS; they are deliberately not exposed here.
  • write_prompt_file changes every chat in the instance. It backs up first and, like mcp.json, applies on the next restart.

Tests

.venv/bin/pytest

They cover the file-editing and validation logic (atomic write, backup, traversal refusal, lint warnings, read-only mode) against a temp directory — no running ATLAS needed.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选