ArchMCP
🏛️ ArchMCP: マイクロサービス向け中央リモートMCPサーバー
AIコーディングアシスタントに組織の頭脳を与えよう。
ArchMCPは、軽量なリモートModel Context Protocol(MCP)サーバーであり、AIアシスタント(Google Antigravity、Claude Desktop、Cursor、VS Code)をマイクロサービスアーキテクチャ全体にリアルタイムで接続します。
📚 ステップバイステップのユーザーマニュアル&セットアップガイドを読む
📖 ArchMCPの背景ストーリー
日常的な問題
あなたがAIコーディングアシスタントを使ってorder-serviceに機能を実装していると想像してください。AIにこう尋ねます:
「チェックアウトを実装して、顧客に請求して。」
すると、すぐにAIは壁にぶつかります:
payment-serviceが冪等性のために必要とするヘッダーがまったくわからない。inventory-serviceに在庫を確保するためにどんなデータベース列が存在するか知らない。エンドポイントを変更した場合にどの上流サービスが壊れるか見当もつかない。
今日この問題を解決するために、開発者は通常、次の2つの悪い選択肢のいずれかを試します:
リポジトリ全体をプロンプトに投入する:質問ごとに100,000トークン以上を簡単に浪費し、コストが高く、AIが遅くなり、プロンプトのノイズによって幻覚を引き起こします。
20以上のリポジトリをローカルにクローンする:チームの全開発者が、ローカルのAIがコンテキストを持つためだけに、ノートPC上で20のリポジトリを最新に保つ必要があります。
解決策:共有リモートブレイン
ArchMCPは、集中型のサブミリ秒アーキテクチャブレインとして機能することでこれを解決します。
1台のノートPC上のプライベートなローカルコマンドとして実行される代わりに、ArchMCPは共有リモートサービスとして実行されます。チームのエンジニアは誰でも、認証トークンを使ってAIアシスタントをArchMCPサーバーのURLに接続できます。
AIアシスタントが次のことを知る必要がある場合:
「どのサービスが返金を処理する?」 $\rightarrow$
search_microservicesを呼び出します。「payment-serviceが所有するテーブルは?」 $\rightarrow$
get_database_schemaを呼び出します。「
/api/v1/ordersを変更したら、誰が壊れる?」 $\rightarrow$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 │ │
│ └────────────────────────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────────────────────────┘Related MCP server: lxDIG MCP
💡 設計方法とその理由
ArchMCPを設計する際、目標は不必要な複雑さなしに高速で、クリーンで、実用的に保つことでした:
1. なぜローカルCLIプロセスではなくリモートHTTP/SSEなのか?
標準的なMCPサーバーはローカルのstdioサブプロセスとして実行されます。これはシングルユーザーのデスクトップスクリプトには機能しますが、50人のエンジニアが30のマイクロサービスで作業する企業には、1つの中央情報源が必要です。ArchMCPをHTTP/SSE経由でホストすることで、アーキテクチャの更新や新しいAPIスキーマが、ローカルリポジトリのクローンなしですべての人が即座に利用できます。
2. なぜ重いベクターデータベースではなくインメモリグラフインデックスなのか?
多くのAIツールはすぐに重いベクターデータベース(PineconeやMilvusなど)に飛びつきます。構造化されたアーキテクチャメタデータ(APIルート、データベーステーブル、サービス依存関係)には、グラフトラバーサルと高速な字句トークンマッチングが適しています:
決定論的:
/api/v1/auth/loginのようなルートやusersのようなテーブルを正確にマッチング。ゼロオーバーヘッド:約38 MBのRAMで動作し、外部APIキーやGPU要件は不要。
圧倒的に高速:サブ2msの応答時間。
3. 検討したトレードオフ
アプローチ | 利点 | 欠点 | 決定 |
ローカルCLI( | 個人にとってはシンプル。 | 全員がすべてのリポジトリをローカルにクローンする必要がある。集中更新がない。 | スキップ |
カスタムREST API | 馴染みのあるWebエンドポイント。 | すべてのIDE用にカスタムプラグインを作成・保守する必要がある。 | スキップ(MCPがオープンスタンダード) |
重いベクターDB | セマンティック検索。 | コールドスタートが遅く、コストが高く、埋め込みインフラが必要。 | 延期(シンプルなインメモリグラフインデックスに) |
SSE上のリモートMCP | 集中管理、即時同期、認証付き、主要なAIツールすべてで動作。 | 軽量サーバーの実行が必要。 | 採用 ✅ |
📊 パフォーマンスベンチマーク&トークン経済
リポジトリコンテキストをダンプしてAIアシスタントにマイクロサービスタスクを分析させる場合と、ArchMCPにクエリする場合の違いを測定しました:
ベンチマーク指標 | コードベース全体のプロンプト | ArchMCPクエリ(ライブ) | 効率向上 |
トークン消費量 | 約140,000〜180,000トークン | 約120〜380トークン | > 99.6%削減 |
実行レイテンシ | 該当なし(全ファイルスキャン/手動) | 約1.8ms〜16ms | サブ秒のリアルタイム |
メモリフットプリント | 約500 MB(ローカルクローン+インデクサー) | 約38 MB | > 90%のRAM削減 |
テストスイート | 該当なし | 18/18が1.5秒未満で合格 | 即時検証 |
💡 リアルタイム検証:組み込みのインタラクティブダッシュボードサンドボックスを使用して、いつでもこれらのパフォーマンス指標をライブでテスト・観察できます。このダッシュボードは、リクエストごとにクエリレイテンシとトークン削減量を計算します。
🔍 開発中に発見した驚きと発見
PythonでリモートMCPサーバーを構築すると、いくつかの興味深い技術的詳細が明らかになりました:
型ヒントがAIスキーマになる:公式のPython MCP SDKは、Pythonの型アノテーションとdocstringを自動的に読み取り、LLMがツールを選択するために使用するJSON-Schema定義を生成します。優れたdocstringは文字通りAIを賢くします。
DNSリバインディングガード:MCP 2.0プロトコルは、ブラウザベースのDNS攻撃から内部開発者ネットワークを保護するために、受信
Hostヘッダーを自動的に検証します。2フェーズSSEハンドシェイク:AIクライアントが
GET /sseに接続すると、サーバーはイベントストリームを開き、一意のセッションポストバックURL(/messages/?session_id=...)を返します。以降のすべてのJSON-RPCツール呼び出しはこのセッションにポストされます。
🖥️ ライブブラウザビジュアライザー&サンドボックス
ArchMCPには、http://localhost:8000/dashboard(または/)に埋め込まれたレスポンシブなWebダッシュボードが含まれています:

インタラクティブトポロジー:任意のサービスカード(
auth-service、order-service、payment-service)をクリックして、そのAPI、所有するデータベーステーブル、依存関係マッピングを検査します。ライブツールサンドボックス:任意のMCPツールをリアルタイムでテストし、ライブのトークン削減量とレイテンシ指標とともにJSON-RPCリクエスト/レスポンスを確認できます。
⌨️ 開発者CLI
ArchMCPには便利なコマンドラインツールが付属しています:
# 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"🔌 AIアシスタントの接続
ArchMCPが実行されている場合(例:http://127.0.0.1:8000/sse)、AIツールを数秒で設定できます:
Google Antigravity IDE
.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ステップクイックスタート
# 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ブラウザで**http://localhost:8000/dashboard**を開いて、アーキテクチャをインタラクティブに探索してください。
🔮 今後のロードマップ
大規模エンタープライズで500以上のマイクロサービス向けにArchMCPを拡張する場合:
セマンティックコンセプト検索:ローカル埋め込みで
pgvectorまたはsqlite-vecを追加し、開発者が概念的な質問(「定期請求はどこにある?」)をできるようにします。Backstage統合:SpotifyのBackstage
catalog-info.yamlからの自動同期。Redisイベントバス:水平スケーリングされたコンテナレプリカ間でアクティブなSSEセッションを同期。
Git Webhook:PRがマージされるたびにスキーマを自動更新。
📂 プロジェクト構造
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📄 ライセンス
MITライセンス。オープンソースおよび商用利用は無料です。
This server cannot be deployed
Maintenance
Related MCP Connectors
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that transforms codebases into intelligent, queryable knowledge bases, enabling AI assistants to perform semantic search, explore architecture, and analyze code relationships.166-
- AlicenseBqualityCmaintenanceMCP server that gives AI coding assistants persistent memory, structural code graph analysis, and safe multi-agent coordination, enabling them to answer architectural questions, track decisions across sessions, and coordinate safely in multi-agent workflows.394MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for local-first code intelligence, providing structural code graph, semantic search, and impact analysis to AI agents.2MIT
- AlicenseNot gradedqualityBmaintenanceA production-ready MCP server that enables AI assistants to intelligently understand, analyze, edit, navigate, and review software projects with multi-workspace support, Git integration, and semantic search.1MIT