Skip to main content

This MCP returns the identity of the currently logged in user.

Project description

Identity Aware MCP Server for Tailscale

TailscaleMCPIdentityHero

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_remyguercio_tailscale_mcp_echo-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_remyguercio_tailscale_mcp_echo-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_remyguercio_tailscale_mcp_echo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 90bcbe217121b735b7eed25896ce170ebd95a3b511b58fad9d254b8194b35bf7
MD5 d58ccdeaa3a6e41736934929c9c9f703
BLAKE2b-256 55663befbea8594714dc594a76083cacba83603dd11d25a7f0641a19f19b1d52

See more details on using hashes here.

File details

Details for the file iflow_mcp_remyguercio_tailscale_mcp_echo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_remyguercio_tailscale_mcp_echo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_remyguercio_tailscale_mcp_echo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67490875e9f28cf8831e03dcc5a4e6f4c1881847a9806e26cf7487fa2e945bb8
MD5 41003bf308942408cd6816f979fd2581
BLAKE2b-256 d9da0ea8e77a89646f9c5095132034a4713b3c5476e708957b80ca4f8e0784ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page