mcp-tool-hub
MCP Tool Hub
IT自動化チーム向けにTypeScriptで構築された、モジュール式で拡張可能なModel Context Protocolマルチサーバーハブ。
LLMにファイル、Git、Webコンテンツ、永続メモリといった実世界のツールへのアクセス権を与えます。Ansibleを使用して、任意の数のクライアントマシンに同時にデプロイ可能です。
アーキテクチャ
mcp-tool-hub/
├── packages/
│ ├── core/ ← Shared types + BaseMCPServer abstract class
│ ├── server-filesystem/ ← Sandboxed local file access (read/write/list/delete)
│ ├── server-git/ ← Git log, diff, file contents, branches, status
│ ├── server-fetch/ ← Web fetching: HTML, JSON APIs, URL health checks
│ └── server-memory/ ← Persistent JSON knowledge base (survives restarts)
├── host/ ← Orchestrator: registry + CLI + stdio JSON interface
├── ansible/ ← Playbook, inventory, systemd service templates
└── docs/ ← How to add new servers (with template)このアーキテクチャはModel Context Protocolパターンに従っています:
各サーバーは完全に独立しており、独自のパッケージとビルドを持ちます
ホスト内のレジストリが、実行時に
toolName → serverをマッピングしますCLIはstdio JSONインターフェースを公開しており、あらゆるLLM統合がstdinで
{"toolName":"...", "arguments":{...}}を送信し、stdoutから結果を読み取ります新しいサーバーの追加 = パッケージの作成、
BaseMCPServerの拡張、cli.tsへの登録
Related MCP server: mcp-toolbox
クイックスタート
1. インストールとビルド
git clone https://github.com/your-org/mcp-tool-hub.git
cd mcp-tool-hub
npm install
npm run build2. 設定
cp .env.example .env
# Edit .env with your paths and settings3. 実行
# Via npm
npm run start --workspace=host
# Or directly
node host/dist/cli.js4. ツールの呼び出し
JSONをstdinに送信し、stdoutからJSONを取得します:
echo '{"toolName":"read_file","arguments":{"path":"hello.txt"}}' | node host/dist/cli.js利用可能なツール
📁 Filesystem Server
すべての操作は MCP_FS_ROOT にサンドボックス化されています。パストラバーサル (../) はブロックされます。
ツール | 説明 |
| ファイル内容の読み取り (utf8またはbase64) |
| ファイルへの書き込みまたは追記 |
| ディレクトリ内容のリスト表示 (オプションで再帰的) |
| ファイルの削除 |
| ファイルの移動または名前変更 |
| パスのサイズ、日付、種類の取得 |
🔀 Git Server
読み取り専用。書き込み操作はありません。
ツール | 説明 |
| リポジトリまたはファイルのコミット履歴 |
| 特定のコミット/ブランチ時点のファイル内容 |
| 2つの参照間の差分 |
| ワーキングツリーの状態 |
| ブランチのリスト表示 (ローカル + オプションでリモート) |
| コミットの詳細と差分 |
🌐 Fetch Server
MCP_FETCH_ALLOWED_DOMAINS を介したオプションのドメイン許可リストをサポートしています。
ツール | 説明 |
| URLからHTMLまたはテキストを取得 |
| JSON APIレスポンスの取得と解析 |
| URLが到達可能か確認 (HEADリクエスト) |
🧠 Memory Server
再起動後も永続化されます。JSONファイルによってバックアップされます。
ツール | 説明 |
| キー、名前空間、タグを指定して値を保存 |
| キーによる値の取得 |
| すべてのエントリに対する全文検索 |
| エントリの削除 |
| カウント付きの名前空間リスト表示 |
| 名前空間内の全エントリを削除 |
Ansibleデプロイ
すべてのクライアントマシンに同時にデプロイします:
cd ansible
# First time
ansible-playbook -i inventory.yml deploy-mcp-hub.yml
# Update only (rebuild + restart)
ansible-playbook -i inventory.yml deploy-mcp-hub.yml --tags update
# Deploy to specific group
ansible-playbook -i inventory.yml deploy-mcp-hub.yml --limit serversプレイブックの内容:
Node.js 20のインストール (存在しない場合)
専用の
mcp-hubシステムユーザーの作成プロジェクトのコピーとビルド
Ansible変数から
.env設定を書き込みsystemdサービスのインストールと開始 (失敗時に自動再起動)
inventory.yml のホストごとの変数により、マシングループごとに異なる許可ドメイン、ログレベル、パスを設定できます。
新しいサーバーの追加
コメント付きの完全なテンプレートについては docs/adding-a-new-server.template.ts を参照してください。
要約:
// 1. Create packages/server-myservice/src/my-server.ts
export class MyServer extends BaseMCPServer {
constructor(options: MyOptions) {
super(SERVER_INFO, options);
this.registerTool("my_tool", this.handleMyTool.bind(this));
}
private async handleMyTool(args) {
return this.ok({ result: "done" });
}
}
// 2. Register in host/src/cli.ts
hub.use(new MyServer({ apiKey: process.env.MY_API_KEY! }));アイデア: server-slack, server-postgres, server-docker, server-ansible, server-ssh, server-jira
環境変数
変数 | デフォルト | 説明 | |||
|
| すべてのハブデータのルート | |||
|
| ファイルシステムサンドボックスのルート | |||
|
| Gitリポジトリのベースパス | |||
|
| メモリストアファイル | |||
| (空 = すべて) | カンマ区切りのドメイン許可リスト | |||
|
| `debug | info | warn | error` |
セキュリティに関する注意
ファイルシステム: 厳密にサンドボックス化されています。パストラバーサル攻撃はデータではなくエラーを返します。
Git: 読み取り専用です。
commit、push、clone操作は公開されていません。Fetch: オプションのドメイン許可リストにより、内部サービスへのSSRFを防ぎます。
Systemdサービス:
PrivateTmp=trueおよびNoNewPrivileges=trueを設定した非rootユーザーとして実行されます。
要件
Node.js ≥ 18 (ネイティブ
fetchAPI用)Git (
server-git用)systemdを搭載したLinux (Ansibleデプロイ用)
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 gradedqualityDmaintenanceA modular MCP server providing file operations, web search, URL scraping, and sandboxed command execution for LLM interactions.1MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server enabling LLMs to execute commands, manage files, interact with Figma, search the web, generate images, and more, extending their capabilities beyond text generation.Apache 2.0
- AlicenseNot gradedqualityAmaintenanceMCP server that gives any LLM a managed Docker workspace with live browser, terminal, code execution, document skills, and autonomous sub-agents.1,560117MIT
- AlicenseNot gradedqualityDmaintenanceA powerful MCP server that enables LLMs to safely execute code, control file systems, search the web, and integrate with services like Gmail and TMDB.MIT
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that gives your AI access to the source code and docs of all public github repos
Cloud-hosted MCP server for durable AI memory
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/TOMJARA/mcp-tool-hub'
If you have feedback or need assistance with the MCP directory API, please join our Discord server