MCP Tool Manager
MCP Tool Manager
本番運用に耐える堅牢な、AIネイティブなツールレジストリおよびエージェント管理システム。Model Context Protocol (MCP) に基づいて構築されています。
📖 目次
Related MCP server: mcp-tool-gateway
これは何か?
MCP Tool Manager は、AI統合ツールシステムにおける最も困難な運用課題を解決するデュアルサーバープラットフォームです。
問題 | 解決策 |
巨大なAPIレスポンスでLLMのコンテキストウィンドウを消費する | ツールごとのバイト予算と、グレースフルなトランケーション通知 |
上流APIの障害がLLMに連鎖する | ツールごとのサーキットブレーカー(CLOSED → OPEN → HALF-OPEN) |
サーバー再起動ですべてのデータが失われる | 定期的な自動ディスクスナップショット、起動時に復元 |
APIゲートウェイへのブルートフォース/インジェクション攻撃 | 10系統の脅威検出器+段階的レート制限+IP自動ブロック |
リクエストをエンドツーエンドでトレースする手段がない | 全レイヤーおよび上流APIに伝播されるX-Trace-IDヘッダー |
ツール/エージェントが揮発性メモリのみに登録される | ファイル永続化されたコールログ+エージェントJSON設定+状態スナップショット |
アーキテクチャ概要
┌─────────────────────────────────────────────────────────────────────────┐
│ MCP Tool Manager Platform │
│ │
│ ┌──────────────────────┐ ┌────────────────────────────────────┐ │
│ │ Manager Server │ │ Hardened MCP Server │ │
│ │ src/server │ │ mcp-server-project │ │
│ │ │ │ │ │
│ │ • REST API (CRUD) │ │ • MCP Protocol endpoint │ │
│ │ • JWT + API key auth │ │ • Agent API key auth + expiry │ │
│ │ • Tool registry │ │ • Circuit breaker per tool │ │
│ │ • Agent management │ │ • Retry + exponential backoff │ │
│ │ • Credential vault │ │ • Response cache (TTL per tool) │ │
│ │ • Audit log │ │ • Context window limiting │ │
│ │ • State snapshots │ │ • File-persisted call log │ │
│ │ • WebSocket events │ │ • 10-family threat detection │ │
│ │ • Response cache │ │ • Admin /metrics endpoint │ │
│ └──────────┬───────────┘ └──────────────┬─────────────────────┘ │
│ │ │ │
│ ┌──────────▼───────────┐ ┌──────────────▼─────────────────────┐ │
│ │ React Dashboard │ │ Claude Desktop / LLM Agent │ │
│ │ src/dashboard │ │ (connects via MCP SDK) │ │
│ └──────────────────────┘ └────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────────┐ │
│ │ Cross-cutting: X-Trace-ID · Rate Limiting · Helmet CSP · │ │
│ │ Structured Logging · Connection Limit · Compression │ │
│ └──────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘プロジェクト構成
mcp/
├── .env.example # Template — copy to .env and fill in values
├── .gitignore # Excludes .env, node_modules, logs, snapshots
├── package.json # Root scripts — start both servers, CLI, tests
├── README.md # This file
├── REPORT.md # Full technical capability report
├── CHANGELOG.md # Version history
│
├── src/
│ ├── server/ # Manager Server (REST API)
│ │ ├── index.js # Entry point — snapshot restore + server start
│ │ ├── app.js # Express app — all middleware wired
│ │ ├── routes/
│ │ │ ├── tools.js # CRUD + test execution for tools
│ │ │ ├── agents.js # Agent management + tool discovery
│ │ │ ├── auth.js # Login, register, API key management
│ │ │ ├── credentials.js # Encrypted credential vault
│ │ │ └── monitoring.js # Stats, audit log, cache, snapshot status
│ │ ├── middleware/
│ │ │ ├── auth.js # JWT + API key auth + RBAC
│ │ │ └── error-handler.js # Typed errors + global handler
│ │ ├── storage/
│ │ │ ├── in-memory-store.js # All in-memory Maps + operations
│ │ │ ├── seeder.js # Initial data (skipped if snapshot exists)
│ │ │ └── state-snapshot.js # Periodic disk snapshots (JSON files)
│ │ ├── utils/
│ │ │ ├── trace.js # X-Trace-ID middleware
│ │ │ ├── context-limit.js # Response byte budget + pagination guard
│ │ │ ├── response-cache.js # node-cache wrapper + TTL presets
│ │ │ ├── encryption.js # AES-256-CBC for credential vault
│ │ │ └── logger.js # Levelled logger (error/warn/info/debug)
│ │ └── websocket.js # Real-time events via WebSocket
│ │
│ ├── dashboard/ # React + Vite management UI
│ │ ├── src/
│ │ │ ├── pages/ # Dashboard, Tools, Agents, Monitoring, Settings
│ │ │ ├── components/ # Sidebar, Topbar, ToastContainer
│ │ │ ├── services/api.js # Axios client for Manager Server
│ │ │ └── styles/ # global.css, sidebar.css
│ │ └── vite.config.js
│ │
│ ├── sdk/
│ │ └── index.js # Developer SDK — npm-publishable client
│ │
│ └── cli/
│ └── index.js # Admin CLI (17 commands)
│
├── mcp-server-project/ # Hardened MCP Server
│ ├── package.json
│ ├── src/
│ │ ├── server.js # Boot sequence — all 7 security layers
│ │ ├── mcp-protocol.js # MCP spec endpoint (/mcp/tools, /mcp/invoke)
│ │ ├── routes/
│ │ │ ├── invoke.js # Tool invocation (retry + CB + cache + limit)
│ │ │ ├── info.js # Tool discovery per agent
│ │ │ └── metrics.js # Admin monitoring endpoint
│ │ ├── middleware/
│ │ │ ├── auth.js # Agent auth + expiry + scope + disabled check
│ │ │ ├── trace.js # X-Trace-ID attachment
│ │ │ └── context-limit.js # Response byte budget
│ │ ├── state/
│ │ │ ├── call-log.js # Disk-persisted call log (NDJSON)
│ │ │ ├── circuit-breaker.js # Per-tool CLOSED/OPEN/HALF state machine
│ │ │ └── response-cache.js # TTL cache with auto-eviction
│ │ ├── loaders/
│ │ │ ├── registry.js # Central tool+agent in-memory registry
│ │ │ ├── tool-loader.js # Loads *.json from /tools/
│ │ │ ├── agent-loader.js # Loads *.json from /agents/
│ │ │ └── credential-loader.js # Merges .env + JSON credentials
│ │ └── watcher.js # chokidar hot-reload on /tools/ and /agents/
│ ├── security/
│ │ ├── middleware/
│ │ │ ├── security-headers.js # Strict Helmet CSP + CORS
│ │ │ ├── rate-limiter.js # 3-tier rate limiting + IP auto-block
│ │ │ └── threat-detector.js # 10-family injection/attack detector
│ │ └── logger/
│ │ └── security-log.js # Structured security event log (5 levels)
│ ├── tools/ # Tool definition JSON files
│ ├── agents/ # Agent definition JSON files
│ ├── credentials/ # .env and JSON secrets (gitignored)
│ ├── logs/ # Security log + call log (gitignored)
│ └── security-tests/ # Attack simulation suite + benchmark
│
├── snapshots/ # Manager server state snapshots (gitignored)
└── examples/ # Example tool/agent JSON filesクイックスタート
前提条件
要件 | バージョン |
Node.js | ≥ 16.0.0 |
npm | ≥ 7.0.0 |
Git | 任意 |
1. クローン
git clone https://github.com/YOUR_USERNAME/mcp-tool-manager.git
cd mcp-tool-manager2. 依存関係のインストール
# Root (Manager Server + CLI + SDK)
npm install
# Dashboard
cd src/dashboard && npm install && cd ../..
# MCP Server
cd mcp-server-project && npm install && cd ..3. 設定
# Manager Server
cp .env.example .env
# Edit .env with your JWT_SECRET, ENCRYPTION_KEY, etc.
# MCP Server
cp mcp-server-project/credentials/.env.example mcp-server-project/credentials/.env
# Edit credentials/.env with your agent keys and tool API keys4. 実行
# Terminal 1 — Manager Server (port 5000)
npm run dev:server
# Terminal 2 — React Dashboard (port 3000)
npm run dev:dashboard
# Terminal 3 — MCP Server (port 5001 by default)
cd mcp-server-project && npm start5. アクセス
インターフェース | URL |
ダッシュボード | |
マネージャーAPI | |
マネージャーヘルスチェック | |
MCPサーバー | |
MCPヘルスチェック | |
MCPメトリクス |
デフォルトログイン(マネージャー)
Email: admin@mcp-tool-manager.dev
Password: admin123⚠️ 本番環境では、
ADMIN_USERNAME/ADMIN_PASSWORD環境変数を使用して直ちに変更してください。
設定リファレンス
マネージャーサーバー(.env)
# Core
NODE_ENV=development
MCP_SERVER_PORT=5000
MCP_SERVER_HOST=localhost
LOG_LEVEL=info
# Auth
JWT_SECRET=your-super-secret-key-min-32-chars
JWT_EXPIRY=24h
ENCRYPTION_KEY=your-encryption-key-exactly-32-ch
# Context Window
MCP_MAX_RESPONSE_BYTES=65536 # 64 KB default response budget
MCP_MAX_PAGE_SIZE=100 # Max items per paginated endpoint
# Scalability
MCP_MAX_CONNECTIONS=500 # TCP connection limit
SNAPSHOT_DIR=./snapshots # State persistence directory
SNAPSHOT_INTERVAL_SECS=60 # Save state every 60 seconds
SNAPSHOT_RESTORE=true # Restore state on startup
# Cache TTLs (seconds)
CACHE_TTL_TOOL_LIST=30
CACHE_TTL_TOOL_ITEM=60
CACHE_TTL_AGENT_LIST=30
CACHE_TTL_STATS=10
CACHE_TTL_ACTIVITY=300
# Future (not yet wired — provide connection string to enable)
DATABASE_URL=postgresql://user:password@localhost:5432/mcp_tools
REDIS_URL=redis://localhost:6379MCPサーバー(mcp-server-project/credentials/.env)
# Agent API Keys (convention: AGENT_<AGENTID_UPPERCASE>_KEY)
AGENT_MY_AGENT_KEY=your-agent-secret-key
# Tool credentials (referenced by credential_ref in tool JSON)
OPENAI_API_KEY=sk-...
WEATHER_API_KEY=...
SLACK_BOT_TOKEN=xoxb-...
# Admin
ADMIN_KEY=your-admin-key-for-metrics-endpoint
# Server
MCP_PORT=5001
MCP_MAX_CONNECTIONS=200
MCP_MAX_RESPONSE_BYTES=32768 # 32 KB default per tool responseツールJSONフィールド(MCPサーバー)
{
"name": "my_tool",
"description": "Human-readable description for the LLM",
"endpoint_url": "https://api.example.com/endpoint",
"method": "POST",
"credential_ref": "MY_API_KEY",
"parameters": {
"type": "object",
"properties": {
"query": { "type": "string", "description": "Search query" }
},
"required": ["query"]
},
"cache_ttl_seconds": 60,
"max_response_bytes": 8192,
"retry_max": 3,
"timeout_ms": 10000,
"circuit_failure_threshold": 5,
"circuit_open_window_ms": 30000
}エージェントJSONフィールド(MCPサーバー)
{
"agent_id": "my-agent",
"allowed_tools": ["weather_lookup", "send_email"],
"expires_at": "2027-01-01T00:00:00Z",
"disabled": false
}APIリファレンス
マネージャーサーバー(http://localhost:5000)
認証
メソッド | パス | 認証 | 説明 |
POST |
| — | JWTトークンを取得 |
POST |
| — | アカウントを作成 |
GET |
| ✅ | 現在のユーザー+APIキー |
POST |
| ✅ | 新しいAPIキーを生成 |
DELETE |
| ✅ | APIキーを失効 |
ツール
メソッド | パス | 認証 | 説明 |
GET |
| ✅ | ツール一覧(ページング対応) |
POST |
| ✅ | 新しいツールを登録 |
GET |
| ✅ | ツール詳細 |
PUT |
| ✅ | ツールを更新 |
DELETE |
| ✅ | ツールを削除 |
POST |
| ✅ | ツール呼び出しをテスト |
エージェント
メソッド | パス | 認証 | 説明 |
GET |
| ✅ | エージェント一覧 |
POST |
| ✅ | エージェントを登録 |
GET |
| ✅ | エージェント詳細 |
PUT |
| ✅ | エージェントを更新 |
DELETE |
| ✅ | エージェントを削除 |
POST |
| ✅ | エージェント用のツールを探索 |
モニタリング
メソッド | パス | 認証 | 説明 |
GET |
| — | 生存確認プローブ |
GET |
| ✅ | システム全体の統計+キャッシュ+スナップショット |
GET |
| ✅ | 実際の時間別コールタイムライン(24時間) |
GET |
| ✅ | 呼び出し回数上位N件のツール |
GET |
| ✅ | 監査エントリ |
GET |
| ✅ | キャッシュヒット率+エントリ |
GET |
| ✅ | 最終スナップショットのタイムスタンプ+件数 |
MCPサーバー(http://localhost:5001)
メソッド | パス | 認証 | 説明 |
GET |
| — | 生存確認プローブ |
GET |
| AGENT_KEY | 呼び出し元エージェント用のツール一覧 |
GET |
| ADMIN_KEY | 全ツール+全エージェント |
GET |
| — | Claude Desktop互換のツール一覧 |
POST |
| — | MCPプロトコル呼び出し |
POST |
| AGENT_KEY | 直接ツール呼び出し |
GET |
| ADMIN_KEY | 完全なモニタリングダッシュボード |
GET |
| — | 軽量な生存確認プローブ |
GET |
| ADMIN_KEY | 最近のコール履歴 |
実装計画
このセクションでは、完全なロードマップを説明します — 構築済みのもの、進行中のもの、そしてインフラストラクチャの決定が必要なものです。
フェーズ1 — 基盤 ✅ 完了
マネージャーサーバーのREST API(ツール、エージェント、認証、認証情報、モニタリング)
完全なCRUD操作を備えたインメモリストア
RBACを備えたJWT+APIキーの二重認証
AES-256-CBCによる認証情報ボールト
Reactダッシュボード(ツール、エージェント、モニタリング、設定ページ)
WebSocketによるリアルタイムイベント配信
開発者向けSDK(
src/sdk/index.js)17コマンドを備えた管理CLI(
src/cli/index.js)MCPプロトコルエンドポイント(Claude Desktop互換)
ホットリロード対応のファイルベースのツール/エージェントレジストリ(
chokidar)リングバッファ方式の監査ログ
フェーズ2 — セキュリティ強化 ✅ 完了
10系統の脅威検出器(SQL/NoSQL/XSS/SSRF/Shell/Template/Path/CMDi/Null/Headerインジェクション)
スキャナーのユーザーエージェントブロック(sqlmap、nikto、nmap、Burp Suite、20以上のスキャナー)
3段階のレート制限(グローバル+厳格+スローダウン)
ブルートフォース後の自動IPブロック(20回以上のヒット)
5段階の重大度レベルを持つ構造化セキュリティイベントログ
Helmetによる厳格なCSP(
defaultSrc: 'none')エージェントキーの有効期限+無効化フラグ
スコープの強制(
requireScopeミドルウェア)認証失敗+スコープ違反のセキュリティログ
セキュリティテストスイート+ベンチマーク(強化版と非保護版の比較)
フェーズ3 — 運用機能 ✅ 完了(本リリース)
X-Trace-ID — 全レイヤーと上流APIに伝播される一意のリクエスト相関ID
サーキットブレーカー — ツールごとのCLOSED/OPEN/HALF-OPEN(設定可能なしきい値)
指数バックオフによるリトライ — 200ms → 400ms → 800ms、4xxエラーはスキップ
レスポンスキャッシュ — ツール/データ型ごとのTTL、ヒット率追跡、プレフィックス無効化
コンテキストウィンドウ制限 — ツールごとのバイト予算、シグナリング付きグレースフルなトランケーション
ページネーションガード — グローバルな
?limitクランプ(デフォルト最大100件)状態スナップショット — 定期的なアトミック書き込み、起動時に復元(ツール/エージェント/ユーザーは再起動後も保持)
接続数制限ガード — 設定可能な最大値を超えるTCPソケットを切断
レート制限を有効化(マネージャー) — IPごとに毎分グローバル300回+認証15回
実際のモニタリング — 実際のコールデータに基づくアクティビティタイムライン(Math.random()モックを削除)
/metricsエンドポイント(MCP) — 完全な管理ダッシュボード(コール、キャッシュ、サーキットブレーカー、メモリ)node-cacheを有効化(マネージャー) — データ型ごとのTTLプリセット、ヒット率追跡
/api/monitoring/cacheと/api/monitoring/snapshotの新しいエンドポイント
フェーズ4 — 永続化と分散 🔲 インプット待ち
これらにはインフラストラクチャが必要です。
pgとioredisはすでにインストールされています — 必要なのは接続文字列のみです。
PostgreSQL —
in-memory-store.jsを永続データベースに移行tools、agents、users、api_keys、credentials、audit_logテーブルpgによるコネクションプール(DATABASE_URLは.env.exampleにすでに記載)
Redis — 共有レート制限+セッション+レスポンスキャッシュストア
マルチインスタンス安全性のため、node-cache を ioredis に置き換え
全サーバーインスタンス間での共有IPブロックリスト
(
REDIS_URLは.env.exampleにすでに記載)
水平スケーリング — Redis+Postgresの接続後、nginxの背後にNインスタンスをデプロイ
フェーズ5 — 開発者体験 🔲 オプション
OpenAPI/Swagger仕様の自動生成(
swagger-jsdoc)起動時の
zod環境スキーマ検証(設定欠落時にフェイルファスト)JWTリフレッシュトークン+ブラックリスト
Prometheusメトリクスエクスポート(
/metrics/prometheusエンドポイント)OpenTelemetry分散トレーシング
ツール互換性マトリックス
サーキットブレーカーの状態をリアルタイム表示するWebSocketダッシュボード
セキュリティモデル
マネージャーサーバー
Request
│
├── X-Trace-ID attachment (Layer 0)
├── Helmet strict CSP (Layer 1)
├── Global rate limit 300/min (Layer 2a)
├── Auth rate limit 15/min on /api/auth (Layer 2b)
├── Body size limit 2 MB (Layer 3)
├── Context window budget (Layer 4)
├── Pagination guard max 100 items (Layer 5)
├── JWT / API key verification (per-route)
└── RBAC role check (per-route)MCPサーバー
Request
│
├── X-Trace-ID attachment (Layer 0)
├── Strict Helmet CSP (Layer 1)
├── IP block list check (Layer 2)
├── Body size guard (Layer 3)
├── Context window budget (Layer 4)
├── HTTP method whitelist (Layer 5)
├── Scanner user-agent block (Layer 6)
├── Global rate limit + speed slow-down (Layer 7)
├── 10-family threat detection (Layer 8)
├── Agent API key auth + expiry + disabled check (per-route)
├── Tool scope enforcement (per-route)
├── Circuit breaker check (per-tool)
├── Response cache lookup (per-tool)
└── Retry + context limit on upstream call (per-tool)モニタリングと可観測性
利用可能なデータ
ソース | 表示内容 |
| システム概要、キャッシュ統計、スナップショット情報、コンテキスト制限設定 |
| 実際の24時間の時間別コールタイムライン(成功数+エラー数) |
| コール数と成功率で見た上位ツール |
| すべての管理者操作(ツール作成/削除、エージェント追加/削除) |
| キャッシュヒット率、エントリ数、エビクション数 |
| 最終スナップショットのタイムスタンプ+レコード数 |
| サーキットブレーカーの状態、コールログ、キャッシュ統計、システムメモリ |
| アップタイム+メモリ(軽量プローブ) |
| 完全なコール履歴:トレースID、エージェント、ツール、レイテンシ、成功、リトライ |
| すべてのセキュリティイベント:AUTH 失敗、脅威、レート制限、サーキットブレーカーのトリップ |
| 最終スナップショット:タイムスタンプ+全データ種別の件数 |
X-Trace-ID フロー
Client → [generates or passes X-Trace-ID]
→ Manager/MCP Server [attaches to req.traceId, echoes in X-Trace-ID response header]
→ Security log entries [include traceId]
→ Call log entries [include traceId]
→ Upstream API call [X-Trace-ID forwarded in headers]
→ Response [traceId in JSON body]ロードマップ
v2.1(次期)
永続ストレージ用に PostgreSQL を接続
分散レート制限+キャッシュ用に Redis を接続
起動時における
zodによる環境変数スキーマ検証
v2.2
JWT リフレッシュトークン+ブラックリスト
Prometheus メトリクスエクスポート
APIキーごとのレート制限(IPベースではない)
v3.0
完全な OpenAPI 仕様
OpenTelemetry による分散トレーシング
OAuth2/OIDC によるエージェントのフェデレーション ID
コントリビューティング
ブランチ戦略、PRプロセス、コードスタイルガイドについては、CONTRIBUTING.md を参照してください。
ライセンス
MIT © MCP Tool Manager Team
完全な技術能力評価については REPORT.md を参照してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to discover and execute tools via a secure MCP server with JWT authentication, RBAC, rate limiting, and audit logging.1MIT
- AlicenseNot gradedqualityCmaintenanceA secure tool-execution plane for agentic AI that enforces JWT authentication, rate limiting, prompt-injection inspection, and audit logging, while ingesting downstream OpenAPI endpoints as MCP tools.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to access a unified catalog of tools from various APIs (OpenAPI, GraphQL, MCP, Google Discovery) through the MCP protocol.MIT

AgentsGateofficial
AlicenseNot gradedqualityAmaintenanceEnables AI agents to securely call MCP tools with risk scoring, checkpoints, rollback, and approval workflows.134MIT
Related MCP Connectors
Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.
Free public MCP for AI agents — 193 tools, 44 workflows. No API key.
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Nagendda/MCP-Tool-Manager'
If you have feedback or need assistance with the MCP directory API, please join our Discord server