site: the MCP hub's docs are the MCP router's, and the old links redirect
The feature is called the MCP router now (the commit before). The docs pages move to mcp-router.html in en, zh and ja, their wording follows (MCP router / MCP 路由 / MCP ルーター, `magpie library mcp router on|off`), and every docs page's link and canonical/hreflang URL points at the new path. The worker answers /docs/mcp-hub, /docs/zh/mcp-hub and /docs/ja/mcp-hub (with or without .html or a trailing slash) with a 301 to the new page, keeping the query, so links already shared still open. The plugins pages' link to the router page (Search1API's tools, from the rebase) follows too. Run at e2583df31 (this stack on86fef947e), on mote: gofmt -l clean; go vet for darwin, linux (-tags nogui) and windows; go build ./...; go test -tags nogui ./... -timeout 45m, 81 packages ok, 0 FAIL; library, gateway, imagemcp, sessions, cli and gui again alone, ok; site's node --test, 49 of 49. GUI on xiaomi-gpu (Windows; mote's browsers crashed under other sessions' suites): library-*, image*, mcp-hub-direct, i18n-keys, list-sort and plugin-tools, both engines and every language, 1055 of 1056: i18n-keys found "{name} is given to each agent directly" dropped from the library's strings in the rebase. Put back in the first commit; at the pushed head i18n-keys, mcp-hub-direct and library-mcp-hub are 48 of 48. That is the only difference from e2583df31. Broken by hand at e2583df31: imagemcp ignoring magpie/roots fails TestHubCallSavesInTheCallersProject; the router asking anything but roots/list fails TestHubAsksTheAgentItsRoots and TestHubRootsUnasked; inHub leaving magpie-image out fails TestHubGivesMagpieImage. Checked: no 聚合, ハブ or mcp-hub left under site/ except the redirect. The worker's redirect test fails without the redirect line (not ok 7). Rebased once more onto2570efb5f, which changed library-mcp-hub, list-sort, mcp-hub-direct and gateway-routing.md. Run at the pushed head: go build; gateway, library, cli and imagemcp tests ok; the GUI budget tests ok; on xiaomi-gpu i18n-keys, mcp-hub-direct, library-mcp-hub and list-sort, 51 of 54. The three reds were WebKit 420px library-mcp-hub cases with no Connect sheet after a reload. origin/maind77da5bffgoes red the same way (de 420px, 9 of 11). In a second run of library-mcp-hub on WebKit at this head, 11 of 11 passed. Filed as #4483.
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-hub">MCP hub</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
@@ -222,7 +222,7 @@ docker logs magpie</pre>
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-hub">MCP hub</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-hub">MCP hub</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
@@ -266,7 +266,7 @@ href = <span class="s">"https://usemagpie.ai/import#"</span> + urlencode({
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-hub">MCP hub</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
<a href="https://discord.gg/vGSnD3ZKQF">Discord</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-hub">MCP hub</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
@@ -157,7 +157,7 @@ curl -s http://127.0.0.1:3425/v1/models -H "Authorization: Bearer magpie-acme"</
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-hub">MCP hub</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-hub">MCP hub</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
@@ -329,7 +329,7 @@ The number of its kind (0 for none):</pre>
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-hub">MCP hub</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
@@ -222,7 +222,7 @@ docker logs magpie</pre>
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
@@ -266,7 +266,7 @@ href = <span class="s">"https://usemagpie.ai/import#"</span> + urlencode({
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
<a href="https://discord.gg/vGSnD3ZKQF">Discord</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
@@ -329,7 +329,7 @@ The number of its kind (0 for none):</pre>
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
@@ -173,7 +173,7 @@
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>MCP ハブ · magpie ドキュメント</title>
|
||||
<meta name="description" content="magpie の MCP ハブの役割:ライブラリのサーバーの代わりにエージェントごとに magpie という MCP サーバーを一つ渡し、コマンドのサーバーは一度だけ動かし、ほかのアプリには一つのアドレスを。">
|
||||
<title>MCP ルーター · magpie ドキュメント</title>
|
||||
<meta name="description" content="magpie の MCP ルーターの役割:ライブラリのサーバーの代わりにエージェントごとに magpie という MCP サーバーを一つ渡し、コマンドのサーバーは一度だけ動かし、ほかのアプリには一つのアドレスを。">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
<script>
|
||||
@@ -27,14 +27,14 @@
|
||||
<script>try{if(/Linux/.test(navigator.userAgent)&&!/Android/.test(navigator.userAgent)||localStorage.getItem("omarchy")||/[?&]omarchy=/.test(location.search))document.write('<script src="/omarchy.js"><\/script>')}catch(e){}</script>
|
||||
<link rel="icon" href="/favicon.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/img/icon-256.png">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/mcp-hub">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/mcp-hub">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/mcp-hub">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/mcp-router">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/mcp-router">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/mcp-router">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
<meta property="og:title" content="MCP ハブ">
|
||||
<meta property="og:title" content="MCP ルーター">
|
||||
<meta property="og:description" content="MCP サーバーを magpie のライブラリで一度設定し、一つのアドレスですべてのエージェントとアプリに。">
|
||||
<meta property="og:image" content="https://usemagpie.ai/img/og.png">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/ja/mcp-hub">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/ja/mcp-router">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
</head>
|
||||
<body>
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
@@ -58,9 +58,9 @@
|
||||
<div class="langs">
|
||||
<button class="icon-btn lang" type="button" aria-label="言語" title="言語" aria-haspopup="true" aria-expanded="false" aria-controls="langs"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><circle cx="8" cy="8" r="6.25"/><path d="M1.75 8h12.5M8 1.75c1.7 1.75 2.55 3.83 2.55 6.25S9.7 12.5 8 14.25M8 1.75C6.3 3.5 5.45 5.58 5.45 8S6.3 12.5 8 14.25"/></svg></button>
|
||||
<div class="lang-menu" id="langs" hidden>
|
||||
<a href="/docs/mcp-hub" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/mcp-hub" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/mcp-hub" hreflang="ja" lang="ja">日本語</a>
|
||||
<a href="/docs/mcp-router" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/mcp-router" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/mcp-router" hreflang="ja" lang="ja">日本語</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="icon-btn" href="https://discord.gg/vGSnD3ZKQF" aria-label="Discord の magpie" title="Discord に参加"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
<main class="wrap doc">
|
||||
<aside class="toc">
|
||||
<p>MCP ハブ</p>
|
||||
<p>MCP ルーター</p>
|
||||
<a href="#overview">概要</a>
|
||||
<a href="#on">オンにする</a>
|
||||
<a href="#apps">ほかのアプリ</a>
|
||||
@@ -80,9 +80,9 @@
|
||||
</aside>
|
||||
|
||||
<article>
|
||||
<p class="eyebrow" id="overview">ドキュメント · MCP ハブ</p>
|
||||
<h1>MCP ハブ</h1>
|
||||
<p class="lede">magpie の <span class="ui">ライブラリ</span> に追加した MCP サーバーは、通常はサーバーごとに一つずつ、各エージェントの設定に書き込まれます。<b>MCP ハブ</b> をオンにすると、各エージェントには代わりに <code>magpie</code> という一つのサーバーだけが渡され、magpie が各呼び出しを裏のライブラリのサーバーに渡します。<b>既定ではオフ</b>です。</p>
|
||||
<p class="eyebrow" id="overview">ドキュメント · MCP ルーター</p>
|
||||
<h1>MCP ルーター</h1>
|
||||
<p class="lede">magpie の <span class="ui">ライブラリ</span> に追加した MCP サーバーは、通常はサーバーごとに一つずつ、各エージェントの設定に書き込まれます。<b>MCP ルーター</b> をオンにすると、各エージェントには代わりに <code>magpie</code> という一つのサーバーだけが渡され、magpie が各呼び出しを裏のライブラリのサーバーに渡します。<b>既定ではオフ</b>です。</p>
|
||||
<ul>
|
||||
<li><b>設定は一度。</b>ライブラリで一度書いたサーバーが、一つのエントリですべてのエージェントとアプリに届きます。</li>
|
||||
<li><b>動かすのも一度。</b>コマンドのサーバー(<code>npx …</code> のようにプログラムとして起動するもの)は、エージェントごとではなく magpie の中で一つだけ動きます。10 分間呼び出しのないサーバーは止まり、次の呼び出しでまた起動します。</li>
|
||||
@@ -93,21 +93,21 @@
|
||||
<h2 id="on"><a class="anchor" href="#on">オンにする</a></h2>
|
||||
<ol class="steps">
|
||||
<li><b>ページを開く</b><span class="ui">ライブラリ</span> → <span class="ui">MCP</span> を開きます。</li>
|
||||
<li><b>スイッチを入れる</b>サーバー一覧の下の <span class="ui">MCP ハブ</span> をオンにします。ライブラリのサーバーにチェックが入っていて、HTTP(Streamable HTTP)でサーバーにつなげるエージェントには、magpie のゲートウェイの <code>/mcp/magpie/hub/<agent></code> を指す <code>magpie</code> エントリが一つ渡され、それらのサーバーの個別のエントリは設定から外されます。</li>
|
||||
<li><b>スイッチを入れる</b>サーバー一覧の下の <span class="ui">MCP ルーター</span> をオンにします。ライブラリのサーバーにチェックが入っていて、HTTP(Streamable HTTP)でサーバーにつなげるエージェントには、magpie のゲートウェイの <code>/mcp/magpie/hub/<agent></code> を指す <code>magpie</code> エントリが一つ渡され、それらのサーバーの個別のエントリは設定から外されます。</li>
|
||||
<li><b>エージェントを再起動</b>エージェントは次に起動したときに変更を読みます。</li>
|
||||
</ol>
|
||||
<p>オフにすると、各サーバーの個別のエントリが書き戻され、magpie が書いた <code>magpie</code> エントリだけが外れ、ハブが起動したサーバーはすべて止まります。コマンドラインでは:</p>
|
||||
<p>オフにすると、各サーバーの個別のエントリが書き戻され、magpie が書いた <code>magpie</code> エントリだけが外れ、ルーターが起動したサーバーはすべて止まります。コマンドラインでは:</p>
|
||||
<div class="code">
|
||||
<span class="lang">ターミナル</span>
|
||||
<button class="copy" data-copy="ex-cli">コピー</button>
|
||||
<pre id="ex-cli">magpie library mcp hub on
|
||||
magpie library mcp hub off</pre>
|
||||
<pre id="ex-cli">magpie library mcp router on
|
||||
magpie library mcp router off</pre>
|
||||
</div>
|
||||
<p><code>magpie library</code> で、ハブを渡されたエージェントと個別のエントリを残すエージェントが、理由とともに一覧できます。</p>
|
||||
<p><code>magpie library</code> で、ルーターを渡されたエージェントと個別のエントリを残すエージェントが、理由とともに一覧できます。</p>
|
||||
|
||||
<h2 id="apps"><a class="anchor" href="#apps">ほかのアプリ</a></h2>
|
||||
<p>ハブがオンのとき、<span class="ui">ほかのアプリ</span> の行に <code>/mcp/magpie/hub</code> で終わるアドレスが出ます。ここではライブラリのすべてのサーバーを提供します。<span class="ui">接続…</span> を押すと、Cursor、VS Code、Windsurf、JSON の MCP 設定を受け付けるアプリ向けのエントリがコピーできるシートが開きます。アプリのウィンドウでは、Cursor と VS Code には <span class="ui">追加</span> もあり、そのアプリが開いて確認を求めます。別のコンピュータのアプリには、ネットワークからのほかのリクエストと同じくゲートウェイのキーが必要です(<a href="/docs/ja/remote">リモート magpie</a> を参照)。</p>
|
||||
<div class="callout"><b>コマンドのサーバーはこのコンピュータで動きます。</b>ネットワーク上でゲートウェイのキーを持つ人は、ハブを通してあなたの権限でそれを呼び出せます。キーは信頼できる人にだけ渡してください。</div>
|
||||
<p>ルーターがオンのとき、<span class="ui">ほかのアプリ</span> の行に <code>/mcp/magpie/hub</code> で終わるアドレスが出ます。ここではライブラリのすべてのサーバーを提供します。<span class="ui">接続…</span> を押すと、Cursor、VS Code、Windsurf、JSON の MCP 設定を受け付けるアプリ向けのエントリがコピーできるシートが開きます。アプリのウィンドウでは、Cursor と VS Code には <span class="ui">追加</span> もあり、そのアプリが開いて確認を求めます。別のコンピュータのアプリには、ネットワークからのほかのリクエストと同じくゲートウェイのキーが必要です(<a href="/docs/ja/remote">リモート magpie</a> を参照)。</p>
|
||||
<div class="callout"><b>コマンドのサーバーはこのコンピュータで動きます。</b>ネットワーク上でゲートウェイのキーを持つ人は、ルーターを通してあなたの権限でそれを呼び出せます。キーは信頼できる人にだけ渡してください。</div>
|
||||
|
||||
<h2 id="kept"><a class="anchor" href="#kept">自分のエントリを残すエージェント</a></h2>
|
||||
<p>次のエージェントは各サーバーの個別のエントリを残し、ライブラリのページにどれがなぜかが表示されます:</p>
|
||||
@@ -136,7 +136,7 @@ magpie library mcp hub off</pre>
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
@@ -776,7 +776,7 @@ claude mcp add --transport http magpie-tools http://127.0.0.1:3425/mcp/magpie/to
|
||||
</div>
|
||||
<p>設定 → プラグインには各プラグインのツールがこの名前で表示され、サーバーのアドレスをコピーできます。<code>args</code> は zod のフィールド定義(<code>tool.schema</code> は zod)、zod オブジェクト、または JSON Schema オブジェクトです。エージェントにはこれが示され、magpie は <code>execute</code> の前に呼び出しの引数をこれで検証します。引数が正しくなければ、その引数を示すエラーを返します。<code>ctx</code> は OpenCode と同じで、<code>agent</code> は呼び出したエージェントです。ツールの実行時間は 55 秒までで、時間切れになると <code>ctx.abort</code> が発火します。</p>
|
||||
<p>このサーバーは組み込みプラグイン <span class="ui">プラグインのツール</span> が提供します。オンのプラグインがツールを提供している間はオンのままで、オフのときはツールが一覧に出ず、呼び出しにはオフであることが返ります。ゲートウェイキーでの呼び出しはそのキーの上限に数えられます。ツールはプロバイダープラグインと同じくあなたの権限でプラグインホスト内で動き、結果は呼び出したエージェントにだけ返ります。</p>
|
||||
<p>ツールを提供するプラグインは、ライブラリの MCP タブにもそれぞれ独立したサーバーとして現れ、プラグインの短い名前(<code>search1api</code>)が付きます。アドレスを手で追加する必要はありません。<a href="mcp-hub.html">MCP ハブ</a>がオンなら、そのツールはハブを使うすべてのエージェントに <code>search1api__search</code> として出ます。ほかのライブラリのサーバーと同じく、エージェントごとにオン・オフでき、ツールを一つずつ止めることもできます。削除すると、プラグインを外して追加し直すまで戻りません。</p>
|
||||
<p>ツールを提供するプラグインは、ライブラリの MCP タブにもそれぞれ独立したサーバーとして現れ、プラグインの短い名前(<code>search1api</code>)が付きます。アドレスを手で追加する必要はありません。<a href="mcp-router.html">MCP ルーター</a>がオンなら、そのツールはルーターを使うすべてのエージェントに <code>search1api__search</code> として出ます。ほかのライブラリのサーバーと同じく、エージェントごとにオン・オフでき、ツールを一つずつ止めることもできます。削除すると、プラグインを外して追加し直すまで戻りません。</p>
|
||||
|
||||
<h2 id="agents"><a class="anchor" href="#agents">エージェントプラグイン</a></h2>
|
||||
<p>プラグインは<em>エージェント</em>を追加することもできます。magpie に組み込みの設定がないエージェントです。そのエージェントがモデルをどこに書くか、magpie のゲートウェイを使うために他に何を書くかを伝えます。するとエージェントは magpie 自身のものと同じように<span class="ui">エージェント</span>ページに並びます。その行で magpie のモデルを選ぶと、magpie はモデルをゲートウェイのアドレスとエージェント専用のキーと一緒に設定へ書き込み、スイッチを切るとすべてユーザーの元の状態に戻します。下の例は <a href="https://aider.chat">Aider</a> を追加します。</p>
|
||||
@@ -995,7 +995,7 @@ document.getElementById(<span class="s">"calls"</span>).textContent = `${s.calls
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
@@ -217,7 +217,7 @@
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
@@ -158,7 +158,7 @@ magpie provider refresh office <span class="c"># 一覧を再取得</span></pr
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
@@ -331,7 +331,7 @@ IP-CIDR6,::1/128,DIRECT,no-resolve</pre>
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-hub">MCP ハブ</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-hub">MCP hub</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
@@ -173,7 +173,7 @@
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-hub">MCP hub</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>MCP hub · magpie docs</title>
|
||||
<meta name="description" content="What magpie's MCP hub does: one magpie MCP server per agent in place of the Library's servers, command servers run once, and one address for other apps.">
|
||||
<title>MCP router · magpie docs</title>
|
||||
<meta name="description" content="What magpie's MCP router does: one magpie MCP server per agent in place of the Library's servers, command servers run once, and one address for other apps.">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
<script>
|
||||
@@ -27,14 +27,14 @@
|
||||
<script>try{if(/Linux/.test(navigator.userAgent)&&!/Android/.test(navigator.userAgent)||localStorage.getItem("omarchy")||/[?&]omarchy=/.test(location.search))document.write('<script src="/omarchy.js"><\/script>')}catch(e){}</script>
|
||||
<link rel="icon" href="/favicon.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/img/icon-256.png">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/mcp-hub">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/mcp-hub">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/mcp-hub">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/mcp-router">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/mcp-router">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/mcp-router">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
<meta property="og:title" content="MCP hub">
|
||||
<meta property="og:title" content="MCP router">
|
||||
<meta property="og:description" content="Set up each MCP server once in magpie's Library and serve it to every agent and app through one address.">
|
||||
<meta property="og:image" content="https://usemagpie.ai/img/og.png">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/mcp-hub">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/mcp-router">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
</head>
|
||||
<body>
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-hub">MCP hub</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
@@ -58,9 +58,9 @@
|
||||
<div class="langs">
|
||||
<button class="icon-btn lang" type="button" aria-label="Language" title="Language" aria-haspopup="true" aria-expanded="false" aria-controls="langs"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><circle cx="8" cy="8" r="6.25"/><path d="M1.75 8h12.5M8 1.75c1.7 1.75 2.55 3.83 2.55 6.25S9.7 12.5 8 14.25M8 1.75C6.3 3.5 5.45 5.58 5.45 8S6.3 12.5 8 14.25"/></svg></button>
|
||||
<div class="lang-menu" id="langs" hidden>
|
||||
<a href="/docs/mcp-hub" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/mcp-hub" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/mcp-hub" hreflang="ja" lang="ja">日本語</a>
|
||||
<a href="/docs/mcp-router" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/mcp-router" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/mcp-router" hreflang="ja" lang="ja">日本語</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="icon-btn" href="https://discord.gg/vGSnD3ZKQF" aria-label="magpie on Discord" title="Join us on Discord"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
<main class="wrap doc">
|
||||
<aside class="toc">
|
||||
<p>MCP hub</p>
|
||||
<p>MCP router</p>
|
||||
<a href="#overview">Overview</a>
|
||||
<a href="#on">Turn it on</a>
|
||||
<a href="#apps">Other apps</a>
|
||||
@@ -80,9 +80,9 @@
|
||||
</aside>
|
||||
|
||||
<article>
|
||||
<p class="eyebrow" id="overview">Docs · MCP hub</p>
|
||||
<h1>MCP hub</h1>
|
||||
<p class="lede">The MCP servers you add in magpie’s <span class="ui">Library</span> are normally written into each agent’s own config, one entry per server. With the <b>MCP hub</b> on, each agent is given a single server named <code>magpie</code> instead, and magpie passes each call on to the Library server behind it. It is <b>off by default</b>.</p>
|
||||
<p class="eyebrow" id="overview">Docs · MCP router</p>
|
||||
<h1>MCP router</h1>
|
||||
<p class="lede">The MCP servers you add in magpie’s <span class="ui">Library</span> are normally written into each agent’s own config, one entry per server. With the <b>MCP router</b> on, each agent is given a single server named <code>magpie</code> instead, and magpie passes each call on to the Library server behind it. It is <b>off by default</b>.</p>
|
||||
<ul>
|
||||
<li><b>Set up once.</b> A server written once in the Library reaches every agent and app through one entry.</li>
|
||||
<li><b>Run once.</b> A command server (one started as a program, such as <code>npx …</code>) runs once in magpie, not once in each agent. A server with no calls for 10 minutes is stopped and starts again on the next call.</li>
|
||||
@@ -93,21 +93,21 @@
|
||||
<h2 id="on"><a class="anchor" href="#on">Turn it on</a></h2>
|
||||
<ol class="steps">
|
||||
<li><b>Open the page</b>Go to <span class="ui">Library</span> → <span class="ui">MCP</span>.</li>
|
||||
<li><b>Switch it on</b>Below the server list, turn on <span class="ui">MCP hub</span>. Each agent that has Library servers ticked and can reach a server over HTTP (Streamable HTTP) gets one <code>magpie</code> entry at <code>/mcp/magpie/hub/<agent></code> on magpie’s gateway, and those servers’ own entries are taken out of its config.</li>
|
||||
<li><b>Switch it on</b>Below the server list, turn on <span class="ui">MCP router</span>. Each agent that has Library servers ticked and can reach a server over HTTP (Streamable HTTP) gets one <code>magpie</code> entry at <code>/mcp/magpie/hub/<agent></code> on magpie’s gateway, and those servers’ own entries are taken out of its config.</li>
|
||||
<li><b>Restart your agents</b>An agent reads the change when it starts again.</li>
|
||||
</ol>
|
||||
<p>Turning it off writes each server’s own entry back, removes only the <code>magpie</code> entry magpie wrote, and stops every server the hub started. From the command line:</p>
|
||||
<p>Turning it off writes each server’s own entry back, removes only the <code>magpie</code> entry magpie wrote, and stops every server the router started. From the command line:</p>
|
||||
<div class="code">
|
||||
<span class="lang">Terminal</span>
|
||||
<button class="copy" data-copy="ex-cli">Copy</button>
|
||||
<pre id="ex-cli">magpie library mcp hub on
|
||||
magpie library mcp hub off</pre>
|
||||
<pre id="ex-cli">magpie library mcp router on
|
||||
magpie library mcp router off</pre>
|
||||
</div>
|
||||
<p><code>magpie library</code> lists which agents are given the hub and which keep their own entries, with why.</p>
|
||||
<p><code>magpie library</code> lists which agents are given the router and which keep their own entries, with why.</p>
|
||||
|
||||
<h2 id="apps"><a class="anchor" href="#apps">Other apps</a></h2>
|
||||
<p>With the hub on, the <span class="ui">Other apps</span> row shows an address ending in <code>/mcp/magpie/hub</code>, which serves every server in the Library. <span class="ui">Connect…</span> opens a sheet with a ready entry to copy for Cursor, VS Code, Windsurf or any app that takes a JSON MCP config; in the app window, Cursor and VS Code also have <span class="ui">Add</span>, which opens the app to confirm. An app on another computer needs a gateway key, as every request from your network does (see <a href="/docs/remote">Remote magpie</a>).</p>
|
||||
<div class="callout"><b>Command servers run on this computer.</b> Anyone holding a gateway key on your network can call them through the hub, with your rights here. Only share keys with people you trust.</div>
|
||||
<p>With the router on, the <span class="ui">Other apps</span> row shows an address ending in <code>/mcp/magpie/hub</code>, which serves every server in the Library. <span class="ui">Connect…</span> opens a sheet with a ready entry to copy for Cursor, VS Code, Windsurf or any app that takes a JSON MCP config; in the app window, Cursor and VS Code also have <span class="ui">Add</span>, which opens the app to confirm. An app on another computer needs a gateway key, as every request from your network does (see <a href="/docs/remote">Remote magpie</a>).</p>
|
||||
<div class="callout"><b>Command servers run on this computer.</b> Anyone holding a gateway key on your network can call them through the router, with your rights here. Only share keys with people you trust.</div>
|
||||
|
||||
<h2 id="kept"><a class="anchor" href="#kept">Agents that keep their own entries</a></h2>
|
||||
<p>These agents keep each server’s own entry, and the Library page says which and why:</p>
|
||||
@@ -136,7 +136,7 @@ magpie library mcp hub off</pre>
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-hub">MCP hub</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-hub">MCP hub</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
@@ -776,7 +776,7 @@ claude mcp add --transport http magpie-tools http://127.0.0.1:3425/mcp/magpie/to
|
||||
</div>
|
||||
<p>Settings → Plugins lists each plugin’s tools by these names and copies the server’s address. <code>args</code> is a zod shape (<code>tool.schema</code> is zod), a zod object or a JSON Schema object. The agent is shown it, and magpie checks a call’s arguments against it before <code>execute</code> runs; a wrong argument is answered as an error naming it. <code>ctx</code> is OpenCode’s, with <code>agent</code> the agent that called. A tool has 55 seconds, and <code>ctx.abort</code> fires when they are up.</p>
|
||||
<p>The built-in plugin <span class="ui">Plugin tools</span> serves the server. It stays on while a plugin that is on gives a tool; off, no tool is listed and a call says so. A call made with a gateway key counts against that key’s limits. A tool runs in the plugin host with your rights, as a provider plugin does, and its answer goes only to the agent that called it.</p>
|
||||
<p>Each plugin that gives tools is also a server of its own in the Library’s MCP tab, named by the plugin’s short name (<code>search1api</code>), so you don’t have to add the address by hand. With the <a href="mcp-hub.html">MCP hub</a> on, its tools are in the hub of every agent the hub is given, as <code>search1api__search</code>; switch it on or off per agent, or turn single tools off, as with any Library server. Removed, it comes back only when you remove the plugin and add it again.</p>
|
||||
<p>Each plugin that gives tools is also a server of its own in the Library’s MCP tab, named by the plugin’s short name (<code>search1api</code>), so you don’t have to add the address by hand. With the <a href="mcp-router.html">MCP router</a> on, its tools are in the router of every agent the router is given, as <code>search1api__search</code>; switch it on or off per agent, or turn single tools off, as with any Library server. Removed, it comes back only when you remove the plugin and add it again.</p>
|
||||
|
||||
<h2 id="agents"><a class="anchor" href="#agents">Agent plugins</a></h2>
|
||||
<p>A plugin can also add an <em>agent</em>: one magpie has no setup of its own for. It says where the agent keeps its model and what else to write there for the agent to use magpie’s gateway. The agent is then on the <span class="ui">Agents</span> page like magpie’s own: pick one of magpie’s models in its row and magpie writes it into the agent’s config, with the gateway’s address and a key of the agent’s own; switch it off and everything goes back to how the user had it. The example below adds <a href="https://aider.chat">Aider</a>.</p>
|
||||
@@ -995,7 +995,7 @@ document.getElementById(<span class="s">"calls"</span>).textContent = `${s.calls
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-hub">MCP hub</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-hub">MCP hub</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
@@ -217,7 +217,7 @@
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-hub">MCP hub</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-hub">MCP hub</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
@@ -158,7 +158,7 @@ magpie provider refresh office <span class="c"># fetch its list again</span></
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-hub">MCP hub</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-hub">MCP hub</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
@@ -331,7 +331,7 @@ IP-CIDR6,::1/128,DIRECT,no-resolve</pre>
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-hub">MCP hub</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
@@ -222,7 +222,7 @@ docker logs magpie</pre>
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
@@ -266,7 +266,7 @@ href = <span class="s">"https://usemagpie.ai/import#"</span> + urlencode({
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
<a href="https://discord.gg/vGSnD3ZKQF">Discord</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
@@ -157,7 +157,7 @@ curl -s http://127.0.0.1:3425/v1/models -H "Authorization: Bearer magpie-acme"</
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
@@ -329,7 +329,7 @@ The number of its kind (0 for none):</pre>
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
@@ -173,7 +173,7 @@
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>MCP 聚合 · magpie 文档</title>
|
||||
<meta name="description" content="magpie 的 MCP 聚合是做什么的:每个 Agent 只配一个 magpie MCP 服务器来代替资源库里的服务器,命令型服务器只运行一份,其他应用用一个地址接入。">
|
||||
<title>MCP 路由 · magpie 文档</title>
|
||||
<meta name="description" content="magpie 的 MCP 路由是做什么的:每个 Agent 只配一个 magpie MCP 服务器来代替资源库里的服务器,命令型服务器只运行一份,其他应用用一个地址接入。">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
<script>
|
||||
@@ -27,14 +27,14 @@
|
||||
<script>try{if(/Linux/.test(navigator.userAgent)&&!/Android/.test(navigator.userAgent)||localStorage.getItem("omarchy")||/[?&]omarchy=/.test(location.search))document.write('<script src="/omarchy.js"><\/script>')}catch(e){}</script>
|
||||
<link rel="icon" href="/favicon.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/img/icon-256.png">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/mcp-hub">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/mcp-hub">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/mcp-hub">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/mcp-router">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/mcp-router">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/mcp-router">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
<meta property="og:title" content="MCP 聚合">
|
||||
<meta property="og:title" content="MCP 路由">
|
||||
<meta property="og:description" content="MCP 服务器在 magpie 资源库里配一次,通过一个地址给所有 Agent 和应用使用。">
|
||||
<meta property="og:image" content="https://usemagpie.ai/img/og.png">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/zh/mcp-hub">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/zh/mcp-router">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
</head>
|
||||
<body>
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
@@ -58,9 +58,9 @@
|
||||
<div class="langs">
|
||||
<button class="icon-btn lang" type="button" aria-label="语言" title="语言" aria-haspopup="true" aria-expanded="false" aria-controls="langs"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><circle cx="8" cy="8" r="6.25"/><path d="M1.75 8h12.5M8 1.75c1.7 1.75 2.55 3.83 2.55 6.25S9.7 12.5 8 14.25M8 1.75C6.3 3.5 5.45 5.58 5.45 8S6.3 12.5 8 14.25"/></svg></button>
|
||||
<div class="lang-menu" id="langs" hidden>
|
||||
<a href="/docs/mcp-hub" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/mcp-hub" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/mcp-hub" hreflang="ja" lang="ja">日本語</a>
|
||||
<a href="/docs/mcp-router" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/mcp-router" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/mcp-router" hreflang="ja" lang="ja">日本語</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="icon-btn" href="https://discord.gg/vGSnD3ZKQF" aria-label="magpie on Discord" title="Join us on Discord"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
<main class="wrap doc">
|
||||
<aside class="toc">
|
||||
<p>MCP 聚合</p>
|
||||
<p>MCP 路由</p>
|
||||
<a href="#overview">概述</a>
|
||||
<a href="#on">打开</a>
|
||||
<a href="#apps">其他应用</a>
|
||||
@@ -80,9 +80,9 @@
|
||||
</aside>
|
||||
|
||||
<article>
|
||||
<p class="eyebrow" id="overview">文档 · MCP 聚合</p>
|
||||
<h1>MCP 聚合</h1>
|
||||
<p class="lede">你在 magpie <span class="ui">资源库</span> 里添加的 MCP 服务器,平时会写进每个 Agent 自己的配置,一个服务器一条。打开 <b>MCP 聚合</b> 后,每个 Agent 只拿到一个名为 <code>magpie</code> 的服务器,magpie 再把每次调用转给后面对应的资源库服务器。<b>默认关闭</b>。</p>
|
||||
<p class="eyebrow" id="overview">文档 · MCP 路由</p>
|
||||
<h1>MCP 路由</h1>
|
||||
<p class="lede">你在 magpie <span class="ui">资源库</span> 里添加的 MCP 服务器,平时会写进每个 Agent 自己的配置,一个服务器一条。打开 <b>MCP 路由</b> 后,每个 Agent 只拿到一个名为 <code>magpie</code> 的服务器,magpie 再把每次调用转给后面对应的资源库服务器。<b>默认关闭</b>。</p>
|
||||
<ul>
|
||||
<li><b>配一次。</b>资源库里写好一次的服务器,通过一个条目给所有 Agent 和应用使用。</li>
|
||||
<li><b>只运行一份。</b>命令型服务器(以程序启动的,比如 <code>npx …</code>)在 magpie 里只运行一份,而不是每个 Agent 各起一份。10 分钟没有调用的服务器会被停掉,下次调用时再启动。</li>
|
||||
@@ -93,21 +93,21 @@
|
||||
<h2 id="on"><a class="anchor" href="#on">打开</a></h2>
|
||||
<ol class="steps">
|
||||
<li><b>打开页面</b>进入 <span class="ui">资源库</span> → <span class="ui">MCP</span>。</li>
|
||||
<li><b>打开开关</b>在服务器列表下方打开 <span class="ui">MCP 聚合</span>。每个勾选了资源库服务器、且能通过 HTTP(Streamable HTTP)连接服务器的 Agent,会得到一个 <code>magpie</code> 条目,地址是 magpie 网关上的 <code>/mcp/magpie/hub/<agent></code>,那些服务器原来的条目会从它的配置里移除。</li>
|
||||
<li><b>打开开关</b>在服务器列表下方打开 <span class="ui">MCP 路由</span>。每个勾选了资源库服务器、且能通过 HTTP(Streamable HTTP)连接服务器的 Agent,会得到一个 <code>magpie</code> 条目,地址是 magpie 网关上的 <code>/mcp/magpie/hub/<agent></code>,那些服务器原来的条目会从它的配置里移除。</li>
|
||||
<li><b>重启 Agent</b>Agent 重新启动后才会读到改动。</li>
|
||||
</ol>
|
||||
<p>关闭后,每个服务器自己的条目会写回去,只移除 magpie 写入的那个 <code>magpie</code> 条目,聚合启动的服务器也会全部停掉。命令行:</p>
|
||||
<p>关闭后,每个服务器自己的条目会写回去,只移除 magpie 写入的那个 <code>magpie</code> 条目,MCP 路由启动的服务器也会全部停掉。命令行:</p>
|
||||
<div class="code">
|
||||
<span class="lang">终端</span>
|
||||
<button class="copy" data-copy="ex-cli">复制</button>
|
||||
<pre id="ex-cli">magpie library mcp hub on
|
||||
magpie library mcp hub off</pre>
|
||||
<pre id="ex-cli">magpie library mcp router on
|
||||
magpie library mcp router off</pre>
|
||||
</div>
|
||||
<p><code>magpie library</code> 会列出哪些 Agent 用上了聚合、哪些保留各自的条目,以及原因。</p>
|
||||
<p><code>magpie library</code> 会列出哪些 Agent 用上了 MCP 路由、哪些保留各自的条目,以及原因。</p>
|
||||
|
||||
<h2 id="apps"><a class="anchor" href="#apps">其他应用</a></h2>
|
||||
<p>聚合打开后,<span class="ui">其他应用</span> 一行显示一个以 <code>/mcp/magpie/hub</code> 结尾的地址,它提供资源库里的所有服务器。<span class="ui">连接…</span> 会打开一个面板,里面有给 Cursor、VS Code、Windsurf 或任何接受 JSON MCP 配置的应用准备好的条目,可直接复制;在应用窗口里,Cursor 和 VS Code 还有 <span class="ui">添加</span>,会打开对应应用让你确认。另一台电脑上的应用需要网关密钥,和局域网里的其他请求一样(见 <a href="/docs/zh/remote">远程 magpie</a>)。</p>
|
||||
<div class="callout"><b>命令型服务器运行在这台电脑上。</b>局域网里持有网关密钥的人都能通过聚合调用它们,权限就是你在这台电脑上的权限。密钥只给信任的人。</div>
|
||||
<p>MCP 路由打开后,<span class="ui">其他应用</span> 一行显示一个以 <code>/mcp/magpie/hub</code> 结尾的地址,它提供资源库里的所有服务器。<span class="ui">连接…</span> 会打开一个面板,里面有给 Cursor、VS Code、Windsurf 或任何接受 JSON MCP 配置的应用准备好的条目,可直接复制;在应用窗口里,Cursor 和 VS Code 还有 <span class="ui">添加</span>,会打开对应应用让你确认。另一台电脑上的应用需要网关密钥,和局域网里的其他请求一样(见 <a href="/docs/zh/remote">远程 magpie</a>)。</p>
|
||||
<div class="callout"><b>命令型服务器运行在这台电脑上。</b>局域网里持有网关密钥的人都能通过 MCP 路由调用它们,权限就是你在这台电脑上的权限。密钥只给信任的人。</div>
|
||||
|
||||
<h2 id="kept"><a class="anchor" href="#kept">保留各自条目的 Agent</a></h2>
|
||||
<p>以下 Agent 会保留每个服务器自己的条目,资源库页面会写明是哪些、为什么:</p>
|
||||
@@ -136,7 +136,7 @@ magpie library mcp hub off</pre>
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
@@ -776,7 +776,7 @@ claude mcp add --transport http magpie-tools http://127.0.0.1:3425/mcp/magpie/to
|
||||
</div>
|
||||
<p>设置 → 插件里会按这些名字列出每个插件的工具,并能复制服务器地址。<code>args</code> 可以是 zod 字段表(<code>tool.schema</code> 就是 zod)、zod 对象或 JSON Schema 对象。智能体会看到它,magpie 在 <code>execute</code> 运行前按它检查调用的参数;参数不对时回一个写明是哪个参数的错误。<code>ctx</code> 与 OpenCode 的相同,<code>agent</code> 是发起调用的智能体。每个工具最多运行 55 秒,到时 <code>ctx.abort</code> 触发。</p>
|
||||
<p>这个服务器由内置插件 <span class="ui">插件工具</span> 提供。只要有已开启的插件提供工具,它就保持开启;关闭时不列出任何工具,调用会说明它已关闭。用网关密钥发起的调用计入该密钥的限额。工具和提供方插件一样,以你的权限在插件宿主里运行,结果只回给调用它的智能体。</p>
|
||||
<p>每个提供工具的插件也会在资料库的 MCP 页里成为一个独立的服务器,以插件的短名命名(如 <code>search1api</code>),不用再手动添加地址。开启 <a href="mcp-hub.html">MCP 聚合</a>时,它的工具会出现在每个接入聚合的智能体里,名为 <code>search1api__search</code>;和资料库里其他服务器一样,可以按智能体开关,或单独关掉某个工具。删掉后,只有把插件移除再重新添加才会再出现。</p>
|
||||
<p>每个提供工具的插件也会在资料库的 MCP 页里成为一个独立的服务器,以插件的短名命名(如 <code>search1api</code>),不用再手动添加地址。开启 <a href="mcp-router.html">MCP 路由</a>时,它的工具会出现在每个接入路由的智能体里,名为 <code>search1api__search</code>;和资料库里其他服务器一样,可以按智能体开关,或单独关掉某个工具。删掉后,只有把插件移除再重新添加才会再出现。</p>
|
||||
|
||||
<h2 id="agents"><a class="anchor" href="#agents">Agent 插件</a></h2>
|
||||
<p>插件还可以添加一个 <em>Agent</em>:magpie 没有内置接入的那种。它说明这个 Agent 把模型写在哪里,以及还要写些什么才能让 Agent 走 magpie 的网关。这样它就和 magpie 内置的 Agent 一样出现在 <span class="ui">Agent</span> 页:在它那一行选一个 magpie 的模型,magpie 就把模型连同网关地址和这个 Agent 自己的 key 写进它的配置;关掉开关,一切恢复成用户原来的样子。下面的例子添加 <a href="https://aider.chat">Aider</a>。</p>
|
||||
@@ -995,7 +995,7 @@ document.getElementById(<span class="s">"calls"</span>).textContent = `${s.calls
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
@@ -217,7 +217,7 @@
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
@@ -158,7 +158,7 @@ magpie provider refresh office <span class="c"># 重新获取列表</span></pr
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
@@ -331,7 +331,7 @@ IP-CIDR6,::1/128,DIRECT,no-resolve</pre>
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-hub">MCP 聚合</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
|
||||
@@ -60,6 +60,9 @@ const SHORT = {
|
||||
|
||||
// The bare docs paths open the getting-started guide.
|
||||
const DOCS = { "/docs": "/docs/start", "/docs/zh": "/docs/zh/start", "/docs/ja": "/docs/ja/start" };
|
||||
// pages that moved, from the old path (no .html) to the new one: the MCP
|
||||
// hub was renamed the MCP router
|
||||
const MOVED = { "/docs/mcp-hub": "/docs/mcp-router", "/docs/zh/mcp-hub": "/docs/zh/mcp-router", "/docs/ja/mcp-hub": "/docs/ja/mcp-router" };
|
||||
// the languages the docs are written in besides English
|
||||
const DOC_LANGS = ["zh", "ja"];
|
||||
|
||||
@@ -131,6 +134,8 @@ export default {
|
||||
}
|
||||
const guide = DOCS[url.pathname.replace(/\/+$/, "")];
|
||||
if (guide) return Response.redirect(new URL(guide, url).toString(), 302);
|
||||
const moved = MOVED[url.pathname.replace(/(\.html)?\/*$/, "")];
|
||||
if (moved) return Response.redirect(new URL(moved + url.search, url).toString(), 301);
|
||||
// an English docs page, to a browser whose language has its own: as /
|
||||
// does, until a language is picked
|
||||
const doc = url.pathname.match(/^\/docs\/([a-z-]+)(\.html)?$/);
|
||||
|
||||
@@ -172,6 +172,18 @@ test("docs: the bare docs paths open each language's guide", async () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("docs: the MCP hub's old pages go to the MCP router's, keeping the query", async () => {
|
||||
const env = { ASSETS: { fetch: async () => new Response("asset") } };
|
||||
for (const [from, to] of [["/docs/mcp-hub", "/docs/mcp-router"], ["/docs/mcp-hub.html", "/docs/mcp-router"], ["/docs/zh/mcp-hub/", "/docs/zh/mcp-router"], ["/docs/ja/mcp-hub.html?x=1", "/docs/ja/mcp-router?x=1"]]) {
|
||||
const res = await worker.fetch(new Request("https://usemagpie.ai" + from), env, ctx);
|
||||
assert.equal(res.status, 301, from);
|
||||
const got = new URL(res.headers.get("Location"));
|
||||
assert.equal(got.pathname + got.search, to, from);
|
||||
}
|
||||
const res = await worker.fetch(new Request("https://usemagpie.ai/docs/mcp-router"), env, ctx);
|
||||
assert.equal(await res.text(), "asset");
|
||||
});
|
||||
|
||||
// #661: the update window showed no notes while GitHub's API limited the
|
||||
// worker, and the failure was kept for five minutes.
|
||||
const ask = (path, env = {}) => worker.fetch(new Request("https://usemagpie.ai" + path), env, ctx);
|
||||
|
||||
Reference in New Issue
Block a user