Skip to main content
Glama

šŸ›ļø 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.

-
license - not tested
Not graded
quality - not tested
C
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).

  • MCP server for AI access to Swagger by SmartBear.

  • MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ShubhamScript/archmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server