network-mcp
network-mcp
UniFi Dream Machine を介してホームネットワークを管理するためのスタンドアロン型 HTTP MCP サーバーです。
現在のコントローラ実装は、ローカルの UniFi Network UI/コントローラ API を使用しています。これは、プレーンテキストでのデバイス管理に必要な、クライアントを直接ブロックリストに登録する動作に対応しているためです。アプリケーションの残りの部分は小さな NetworkController インターフェースに依存しているため、後で公式の UniFi Network API に置き換えたり補完したりできます。
セットアップ
bun install
cp .env.example .env
bun run startサービスはデフォルトで 127.0.0.1:4123 で待ち受けます。
Docker
ホスト運用/ホームセットアップでは、Docker Compose で実行します:
cp .env.example .env
docker compose up -d --buildCompose ファイルはコンテナ内でサービスを 0.0.0.0 にバインドし、ホストのループバック 127.0.0.1:4123 にのみ公開し、LowDB データを ./data に永続化します。
コード変更後は再ビルド/再起動します:
docker compose up -d --buildログを表示します:
docker compose logs -f network-mcpログは Winston により JSON 形式で stdout に出力されます。LOG_LEVEL=debug を設定すると、UniFi リクエストのタイミングと MCP リクエストの診断情報が含まれます。
エンドポイント
GET /healthPOST /mcpGET /mcpDELETE /mcp
MCP_AUTH_TOKEN が設定されている場合、/mcp には次が必要です:
Authorization: Bearer <token>OpenCode 設定
リモート MCP サーバーを /home/zac/.config/opencode/opencode.json に追加します:
{
"mcp": {
"home-network": {
"type": "remote",
"url": "http://127.0.0.1:4123/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer {env:HOME_NETWORK_MCP_TOKEN}"
}
}
}
}MCP 設定を変更したら、ホストされている OpenCode サービスを再起動してください。
ツール
list_clientsfind_deviceadd_tagremove_taglist_tagsadd_displaynameblock_deviceunblock_deviceblock_by_tagunblock_by_tagshow_blockedunblock_allrecent_actions
MAC アドレスはデバイスの正規キーです。タグと表示名は、DB_PATH 配下の LowDB にローカル保存されます。
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 Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
GibsonAI MCP server: manage your databases with natural language
MCP server for generating rough-draft project plans from natural-language prompts.
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/zapplebee/network-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server