ArchMCP

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.

Category
Visit Server

README

šŸ›ļø ArchMCP: Central Remote MCP Server for Microservices

Python 3.10+ Model Context Protocol License: MIT Tests: 18/18 Passing

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-service requires for idempotency.
  • It doesn't know what database columns exist in inventory-service to 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:

  1. 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.
  2. 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 calls analyze_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/login or table users.
  • 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:

  1. 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.
  2. DNS Rebinding Guard: The MCP 2.0 protocol automatically validates incoming Host headers to protect internal developer networks from browser-based DNS attacks.
  3. 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 /):

ArchMCP Interactive Dashboard & Live Sandbox

  • 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:

  1. Semantic Concept Search: Adding pgvector or sqlite-vec with local embeddings so developers can ask conceptual questions ("Where does recurring billing live?").
  2. Backstage Integration: Auto-syncing from Spotify's Backstage catalog-info.yaml.
  3. Redis Event Bus: Synchronizing active SSE sessions across horizontally scaled container replicas.
  4. 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured