Get the FREE Ultimate OpenClaw Setup Guide →

tailscale-network

A distributed model context server for AI agents, leveraging Tailscale for secure networking.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio cavanaughdesign-tailscale-network-mcp-server docker compose up -d \
  --env TAILSCALE_AUTH_KEY="<your-tailcale-auth-key>"

How to use

This MCP server implements a distributed Tailscale-enabled model context network designed to securely share and synchronize context data across central, regional, and edge components. It proxies interactions between an AI agent simulator and multiple context servers via a zero-trust Tailnet, enabling real-time updates, versioning, and caching across environments. Use the provided agent simulator and API endpoints to create, manage, and query conversation contexts, while the central authority coordinates versioning and consistency across regional servers and edge caches.

How to install

Prerequisites:

  • Docker and Docker Compose installed on your host
  • A Tailscale account and an auth key for secure networking
  • Optional: Node.js for local development if you want to run components individually

Setup steps:

  1. Clone the repository:
git clone https://github.com/yourusername/tailscale-model-context-server.git
cd tailscale-model-context-server
  1. Create a .env file (or set environment variables) with your Tailnet auth key placeholder:
# .env
TAILSCALE_AUTH_KEY=tskey-auth-xxxxxxxxxxxxxx
  1. Start the full system with Docker Compose (the docker-compose file orchestrates central, regional, edge caches, and agent simulator):
docker-compose up -d
  1. If you need to run components individually for local development, you can start specific services with Docker commands or npm scripts (if available in the repo). For example, to run the central server in isolation via Docker, you might use:
# example placeholder; adapt to your repo's actual service definitions
docker run -d --name central-server tailscale-model-context-server-central
  1. Access the AI Agent Simulator at:
http://localhost:8080
  1. To stop the system:
docker-compose down

Notes:

  • Ensure your Tailnet is properly configured and the auth key is valid.
  • If you modify environment variables, restart the affected services so changes take effect.

Additional notes

Tips and common issues:

  • If components fail to discover peers, verify that the Tailnet is connected and that the Tailscale daemon is running inside each container.
  • Check logs for authentication errors or network reachability between central, regional, and edge servers.
  • Use environment variables to tune Tailnet behavior (for example, Tailnet version or debug flags) as supported by your deployment.
  • When deploying to cloud environments, ensure security groups/firewall rules allow necessary Tailnet traffic across regions.
  • For local development, the Node.js runtime can be used to simulate agents or contexts if you install and run those components separately from the Docker-based orchestration.

Related MCP Servers

Sponsor this space

Reach thousands of developers