ArchMCP
A centralized remote MCP server that gives AI coding assistants real-time microservices architecture intelligence, including service search, database schema lookup, API discovery, and change blast-radius analysis.
README
🏛️ ArchMCP: Central Remote MCP Server for Microservices
Give your AI coding assistant an organizational brain.
ArchMCP is a lightweight, remote Model Context Protocol (MCP) server that connects your AI assistants (Google Antigravity, Claude Desktop, Cursor, VS Code) to your entire microservice architecture in real time.
📚 Read the Step-by-Step User Manual & Setup Guide
📖 The Story Behind ArchMCP
The Everyday Problem
Imagine you are writing a feature in order-service with your AI coding assistant. You ask the AI:
"Implement checkout and charge the customer."
Immediately, the AI hits a wall:
- It has no idea what headers
payment-servicerequires for idempotency. - It doesn't know what database columns exist in
inventory-serviceto reserve stock. - It has no clue which upstream services will break if you modify an endpoint.
To fix this today, developers usually try one of two bad options:
- Dumping entire repositories into the prompt: This easily wastes 100,000+ tokens per question, costs a lot of money, makes the AI slow, and causes hallucinations due to prompt clutter.
- Cloning 20+ repos locally: Every developer on the team has to keep 20 repos updated on their laptop just so their local AI has context.
The Solution: A Shared Remote Brain
ArchMCP solves this by acting as a centralized, sub-millisecond architecture brain.
Instead of running as a private local command on one laptop, ArchMCP runs as a shared remote service. Any engineer on your team connects their AI assistant to the ArchMCP server URL with an authentication token.
When your AI assistant needs to know:
- "Which service handles refunds?" $\rightarrow$ It calls
search_microservices. - "What tables does payment-service own?" $\rightarrow$ It calls
get_database_schema. - "If I change
/api/v1/orders, who breaks?" $\rightarrow$ It callsanalyze_blast_radius.
┌────────────────────────────────────────────────────────┐
│ AI Assistant Client │
│ (Google Antigravity, Claude Desktop, Cursor) │
└──────────────────────────┬─────────────────────────────┘
│
│ HTTP / Server-Sent Events (SSE)
│ Authorization: Bearer <token>
│
┌──────────────────────────▼────────────────────────────────────────────────────────┐
│ ArchMCP Server │
│ │
│ ┌─────────────────────┐ ┌─────────────────────┐ ┌──────────────────────────┐ │
│ │ MCP Tools │ │ MCP Resources │ │ MCP Prompts │ │
│ │ • search_services │ │ • arch/overview │ │ • cross_service_planner │ │
│ │ • blast_radius │ │ • services/catalog │ │ • incident_triage │ │
│ │ • sequence_diagram │ │ • guidelines/docs │ │ • contract_refactor │ │
│ │ • get_db_schema │ │ • service docs │ │ │ │
│ └──────────┬──────────┘ └──────────┬──────────┘ └────────────┬─────────────┘ │
│ │ │ │ │
│ ┌──────────▼────────────────────────▼──────────────────────────▼─────────────┐ │
│ │ Microservice Intelligence Engine │ │
│ │ • Transitive Graph Traversal & Blast Radius Analyzer (BFS) │ │
│ │ • In-Memory Index & Token Search (< 2ms response time) │ │
│ │ • Dynamic OpenAPI / Swagger 3.0 Importer │ │
│ └───────────────────────────────────┬────────────────────────────────────────┘ │
│ │ │
│ ┌───────────────────────────────────▼────────────────────────────────────────┐ │
│ │ Embedded Web Visualizer & Live Sandbox (/dashboard) │ │
│ │ • Interactive Service Topology Explorer & Token Economics Calculator │ │
│ └────────────────────────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────────────────────────┘
💡 How I Designed It & Why
When designing ArchMCP, the goal was to keep it fast, clean, and practical without unnecessary complexity:
1. Why Remote HTTP/SSE instead of a local CLI process?
Standard MCP servers run as a local stdio subprocess. While that works for single-user desktop scripts, a company with 50 engineers working across 30 microservices needs one central source of truth. By hosting ArchMCP over HTTP/SSE, architectural updates and new API schemas are instantly available to everyone without local repository cloning.
2. Why In-Memory Graph Indexing instead of a Heavy Vector Database?
Many AI tools immediately jump to heavy vector databases (like Pinecone or Milvus). For structured architecture metadata (API routes, database tables, and service dependencies), graph traversal and fast lexical token matching are:
- Deterministic: Exact matches for routes like
/api/v1/auth/loginor tableusers. - Zero Overhead: Runs with ~38 MB of RAM and zero external API keys or GPU requirements.
- Blazing Fast: Sub-2ms response time.
3. Trade-offs Considered
| Approach | The Good | The Bad | The Decision |
|---|---|---|---|
Local CLI (stdio) |
Simple for one person. | Everyone has to clone every repo locally; no centralized updates. | Skipped |
| Custom REST API | Familiar web endpoints. | Requires writing and maintaining custom plugins for every IDE. | Skipped (MCP is the open standard) |
| Heavy Vector DB | Semantic search. | Slow cold-starts, high cost, requires embeddings infrastructure. | Deferred for simple in-memory graph index |
| Remote MCP over SSE | Centralized, instant sync, authenticated, works with all major AI tools. | Requires running a lightweight server. | Adopted ✅ |
📊 Performance Benchmarks & Token Economics
We measured the difference between asking an AI assistant to analyze a microservice task by dumping repository context vs querying ArchMCP:
| Benchmark Metric | Full Codebase Prompting | ArchMCP Query (Live) | Efficiency Gain |
|---|---|---|---|
| Token Consumption | ~140,000 to 180,000 tokens | ~120 to 380 tokens | > 99.6% Reduction |
| Execution Latency | N/A (Full file scans / manual) | ~1.8 ms to 16 ms | Sub-second real-time |
| Memory Footprint | ~500 MB (Local clones + indexers) | ~38 MB | > 90% Less RAM |
| Test Suite | N/A | 18/18 Passing in < 1.5s | Instant verification |
💡 Real-Time Verification: You can test and observe these performance metrics live at any time using the built-in Interactive Dashboard Sandbox, which calculates query latency and token savings on every request.
🔍 Surprises & Discoveries Along the Way
Building a remote MCP server in Python revealed a few fascinating technical details:
- Type Hints Become AI Schemas: The official Python MCP SDK automatically reads Python type annotations and docstrings to generate JSON-Schema definitions that the LLM uses to pick tools. Good docstrings literally make the AI smarter.
- DNS Rebinding Guard: The MCP 2.0 protocol automatically validates incoming
Hostheaders to protect internal developer networks from browser-based DNS attacks. - The 2-Phase SSE Handshake: When an AI client connects to
GET /sse, the server opens the event stream and returns a unique session postback URL (/messages/?session_id=...). All subsequent JSON-RPC tool calls are posted to this session.
🖥️ Live Browser Visualizer & Sandbox
ArchMCP includes an embedded, responsive web dashboard at http://localhost:8000/dashboard (or /):

- Interactive Topology: Click any service card (
auth-service,order-service,payment-service) to inspect its APIs, owned database tables, and dependency mapping. - Live Tool Sandbox: Test any MCP tool in real time and see the JSON-RPC request/response with live token savings and latency metrics.
⌨️ Developer CLI
ArchMCP comes with a handy command-line tool:
# 1. Start the Remote Server
archmcp run
# 2. Explore the Catalog in your Terminal
archmcp explore
# 3. Calculate Change Blast Radius
archmcp blast-radius auth-service
# 4. Import a live OpenAPI / Swagger Specification
archmcp import-openapi https://petstore.swagger.io/v2/swagger.json --owner "Commerce Team"
🔌 Connecting Your AI Assistant
Once ArchMCP is running (e.g. at http://127.0.0.1:8000/sse), configure your AI tool in seconds:
Google Antigravity IDE
Add to .agents/mcp_config.json:
{
"mcpServers": {
"archmcp": {
"url": "http://127.0.0.1:8000/sse",
"headers": {
"Authorization": "Bearer dev-token-secret-123"
}
}
}
}
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"archmcp": {
"url": "http://127.0.0.1:8000/sse",
"headers": {
"Authorization": "Bearer dev-token-secret-123"
}
}
}
}
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"archmcp": {
"url": "http://127.0.0.1:8000/sse?token=dev-token-secret-123"
}
}
}
🚀 3-Step Quickstart
# 1. Clone & Install
git clone https://github.com/ShubhamScript/archmcp.git
cd archmcp
pip install -e .[dev]
# 2. Run Tests
pytest -v
# 3. Start Server
archmcp run
Open http://localhost:8000/dashboard in your browser to explore your architecture interactively.
🔮 What's Next on the Roadmap
If expanding ArchMCP for 500+ microservices in a large enterprise:
- Semantic Concept Search: Adding
pgvectororsqlite-vecwith local embeddings so developers can ask conceptual questions ("Where does recurring billing live?"). - Backstage Integration: Auto-syncing from Spotify's Backstage
catalog-info.yaml. - Redis Event Bus: Synchronizing active SSE sessions across horizontally scaled container replicas.
- Git Webhooks: Automatically updating schemas whenever a PR merges.
📂 Project Structure
archmcp/
├── README.md # Project guide & architecture story
├── pyproject.toml # Dependencies, CLI scripts, and build config
├── Dockerfile # Container build instructions
├── docker-compose.yml # Container orchestration
├── data/
│ └── repositories.yaml # Sample microservices catalog
├── src/
│ └── archmcp/
│ ├── main.py # Server bootstrap
│ ├── cli.py # Developer CLI (run, explore, blast-radius, import-openapi)
│ ├── config/settings.py # Environment settings
│ ├── auth/ # Bearer token verification & ASGI middleware
│ ├── mcp/ # Tools, Resources, Prompts, and SSE route handlers
│ ├── services/ # Blast radius, graph traversal, and search logic
│ ├── ingestion/ # OpenAPI importer, markdown parser, dependency scanner
│ ├── storage/ # In-memory database & token search index
│ ├── web/ # Embedded visualizer and live testing playground
│ └── models/ # Pydantic schemas (Architecture, BlastRadius, Services)
└── tests/ # 18 unit & integration tests
📄 License
MIT License. Free for open source and commercial use.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。