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.1.tar.gz.

File metadata

  • Download URL: iflow_mcp_remyguercio_tailscale_mcp_echo-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 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.1.tar.gz
Algorithm Hash digest
SHA256 6be3749372f443ca0d50ca061333be6fe7e9a4e810f4a4092aa02d2922a2c5e1
MD5 045f3e915beee507543b75ee3bbfabd8
BLAKE2b-256 ba24dc5099ab98c837c7e2ec0c702feeb8c55ccf10a2cc3a0780d498cb1444b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: iflow_mcp_remyguercio_tailscale_mcp_echo-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 421f83cc88140e694b1714a96132eded1c69c474add4261877c33e883a82de89
MD5 3dffe05f9945ba9a72382f33b830bcbe
BLAKE2b-256 23582500497990c835e65c9ade84e1634347de387a70839e2224ba0a30aea545

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