RT

remyguercio/tailscale-mcp-echo

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

24 stars 7 forks 品質 62 トレンド 10BSD-3-Clause

アイデンティティは、Tailscale が提供する MCP サーバーの例を認識しています.

概要

プライベートテールスケールネットワーク(Tailnet)内で動作するMCPサーバーを識別する。 この例は、tailscale サービスの背後にあるアプリケーションに渡される ID ヘッダを活用します。 開始点として、ID が認識している MCP サーバー (ユーザーのメールに記録されたアクセス) を作成でき、代わりに内部 API やサービスにアクセスすることができます。 1。 すでにテールネットのセットアップを持っていない場合は、サインアップする必要があります。 2. API の auth キーを作成し、このプロジェクトのルートにある .env ファイルに保存します。TS AUTHKEY=tskey-auth-... 3。 Dockerが既にインストールされていると、Docker がサーバーを起動するように構成します。 2つの容器を回転させます。 MCP サーバーとテールスケールを実行しているテールスケールコンテナは、テールネットにプロキシとして機能します。 HTTP MCP サーバをストリーミングする直接アクセスをサポートする MCP クライアントがある場合、 [https://ts-mcp-echo.yourtailnetname.ts.] を指し、サーバーに接続できるようにする必要があります

概要(AI 翻訳)

プライベートテールスケールネットワーク(Tailnet)内で動作するMCPサーバーを識別する。 この例では、 [tailscale serve] の後ろで実行されているアプリケーションに渡される ID ヘッダーを使用します。

開始点として、ID が認識している MCP サーバー (ユーザーのメールに記録されたアクセス) を作成でき、代わりに内部 API やサービスにアクセスすることができます。

指示

サーバーの起動

1。 すでにテールネットのセットアップを持っていない場合は、サインアップする必要があります。 2. API の auth キーを作成し、このプロジェクトのルートにある [.env] ファイルに次の形式を保存します。[TS_AUTHKEY=tskey-auth-...] 3。 Dockerが既にインストールされていると、[docker compose up]を実行して、サーバーを起動します。

2つの容器を回転させます。 MCP サーバーとテールネットにプロキシとして tailscale serve を実行しているテールスケールコンテナ。

サーバーを使用する

HTTP MCP サーバーをストリーミングする直接アクセスをサポートする MCP クライアントがある場合、 [https://ts-mcp-echo.yourtailnetname.ts.net/mcp] にすることでサーバーに接続できるようにする必要があります。

####Claudeデスクトップ

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

Identity Aware MCP Server for Tailscale

Create an identiy aware MCP server that runs inside your private Tailscale network (Tailnet). This example leverages identity headers that are passed through to applications running behind tailscale serve.

Using this as starting point you can create MCP servers that are identity aware (with access to the logged in user’s email) and can access internal APIs or services on thier behalf.

Instructions

Starting the Server

  1. If you don’t already have a Tailnet setup you’ll need to signup for one.
  2. Create an API auth key and save it into a .env file in the root of this project with the following format: TS_AUTHKEY=tskey-auth-...
  3. With Docker already installed, run docker compose up to start the server.

This will spin up two containers. The MCP server and a Tailscale container running tailscale serve as a proxy to your tailnet.

Using the Server

If you have an MCP Client that supports direct access to Streaming HTTP MCP servers, then you should be able to connect to the server by pointing it to https://ts-mcp-echo.yourtailnetname.ts.net/mcp.

Claude Desktop

Claude desktop does not currently support remote MCP servers (only stdio), but you can use the mcp-remote tool (or any other proxy) to connect to it.

  1. Install mcp-remote with npm install -g mcp-remote

  2. Add the following configuration to your claude_desktop_config.json file:

        {
            "mcpServers": {
                "tailscale-remote-echo-example": {
                    "command": "npx",
                    "args": [
                        "mcp-remote",
                        "https://ts-mcp-echo.yourtailnetname.ts.net/mcp"
                    ]
                }
            }
        }
    

    You can find your tailnet name by visiting the Tailscale admin console DNS page.

  3. Restart Claude Desktop.

  4. You should now see a new MCP server called tailscale-remote-echo-example with a greet tool.

  5. Ask Claude Who am I logged into my tailnet as? allow the tool, and wait for the response!

GitHub で README 全文を見る

インストール

npx mcp-remote https://ts-mcp-echo.yourtailnetname.ts.net/mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "tailscale-remote-echo-example": { "command": "npx", "args": [ "mcp-remote", "https://ts-mcp-echo.yourtailnetname.ts.net/mcp" ] } } }