Exports Tailscale network metrics and monitoring data to Datadog for centralized observability and alerting.
Sends Tailscale network alerts and notifications to Discord channels via webhooks for device connection events and network monitoring.
Enables creation and export of Grafana dashboards for Tailscale network monitoring, including comprehensive network overview, device activity tracking, security monitoring, and network topology visualization dashboards.
Integrates with PagerDuty for incident management and alerting based on Tailscale network events and security monitoring.
Exports custom metrics for Tailscale network monitoring including device activity, network traffic, API performance, and health statistics that can be scraped by Prometheus for monitoring and alerting.
Sends Tailscale network alerts and notifications to Slack channels for device connection events and network monitoring.
Provides comprehensive management of Tailscale networks including device management (authorization, SSH access, tagging, exit nodes), DNS configuration (MagicDNS, custom records), file sharing via Taildrop, security auditing, monitoring and metrics collection, ACL management, and network topology visualization.
TailscaleMCP
A FastMCP 2.12 compliant server for managing Tailscale networks with modern Python tooling and comprehensive CI/CD.
๐ Features
๐ง Portmanteau Tools: Consolidated tools following the database-mcp pattern to avoid tool explosion
tailscale_device: Comprehensive device management (list, authorize, rename, tag, SSH, search, stats, exit nodes, subnet routing, user management, auth keys)tailscale_network: DNS and network management (MagicDNS, DNS records, resolution, policies, statistics)tailscale_monitor: Monitoring and metrics (status, Prometheus metrics, topology, health reports, Grafana dashboards)tailscale_file: File sharing via Taildrop (send, receive, transfer management, statistics)tailscale_security: Security and compliance (scanning, auditing, threat detection, policy management, alerting)tailscale_automation: Workflow automation (workflows, scripts, batch operations, scheduling)tailscale_backup: Backup and disaster recovery (backup creation, restoration, scheduling, testing)tailscale_performance: Performance monitoring (latency, bandwidth, optimization, capacity planning)tailscale_reporting: Advanced reporting (custom reports, analytics, scheduling, export)tailscale_integration: Third-party integrations (webhooks, Slack, Discord, PagerDuty, Datadog)
๐ Comprehensive Monitoring Stack: Complete observability with Grafana, Prometheus, and Loki
Real-time dashboards for network visualization and device monitoring
Structured logging with JSON format for easy parsing and analysis
Prometheus metrics for performance monitoring and alerting
Log aggregation with Loki for centralized log analysis
Docker Compose setup for easy deployment and management
๐ Grafana Dashboards: 4 comprehensive dashboards for different monitoring needs
Network Overview: Device status, traffic, API performance
Logs Dashboard: Error analysis, log streams, security events
Device Activity: Activity heatmaps, geolocation, timelines
Comprehensive Monitoring: Combined overview of all metrics and logs
๐ Network Topology: Visual network topology and device relationships
โก Prometheus Metrics: Export metrics for monitoring systems with custom metrics
๐ฅ Health Reports: Automated health analysis and recommendations
๐ Structured Logging: JSON-formatted logs with rich context for Loki integration
Modern Tooling: FastMCP 2.12, Ruff, Pytest, structured logging
Container Ready: Docker support with development and production images
CI/CD: Comprehensive GitHub Actions pipeline with security scanning
๐ฏ Usage
Portmanteau Tools
The TailscaleMCP server uses portmanteau tools following the database-mcp pattern to avoid tool explosion. Each tool combines multiple related operations:
Device Management (tailscale_device)
Network Management (tailscale_network)
Monitoring (tailscale_monitor)
File Sharing (tailscale_file)
Security Management (tailscale_security)
Automation (tailscale_automation)
Backup & Recovery (tailscale_backup)
Performance Monitoring (tailscale_performance)
Advanced Reporting (tailscale_reporting)
Third-Party Integrations (tailscale_integration)
๐ฆ Installation
From PyPI (Recommended)
From Source
Using Docker
๐ง Quick Start
Basic Usage
Using as Context Manager
๐ Monitoring Stack
Complete Observability Solution
The TailscaleMCP server includes a comprehensive monitoring stack with Grafana, Prometheus, and Loki for complete observability of your Tailscale network.
Features
๐ Real-time Dashboards: 4 comprehensive Grafana dashboards for different monitoring needs
๐ Structured Logging: JSON-formatted logs with rich context for easy analysis
โก Prometheus Metrics: Custom metrics for device activity, network traffic, and API performance
๐ Log Aggregation: Centralized log collection and analysis with Loki
๐ณ Docker Compose: Easy deployment and management of the entire monitoring stack
Quick Start with Monitoring
Available Dashboards
Network Overview: Device status, network traffic, API performance metrics
Logs Dashboard: Error analysis, log streams, security event monitoring
Device Activity: Activity heatmaps, geolocation mapping, device timelines
Comprehensive Monitoring: Combined overview of all metrics and logs
Monitoring Documentation
For detailed information about the monitoring stack, see:
General MCP Monitoring Standards
For comprehensive monitoring standards and reusable templates for all heavyweight MCP servers:
Specialized Monitoring Cases
For specialized monitoring documentation for specific use cases:
Tapo Cameras MCP Monitoring - Home surveillance and security monitoring
Tapo Cameras Dashboard Templates - Specialized Grafana dashboards for home security
Mobile Monitoring Integration
For mobile monitoring solutions:
RebootX Integration - Mobile infrastructure monitoring with RebootX app for iPad
RebootX Integration Guide - Tailscale MCP specific RebootX integration
RebootX On-Prem Setup Guide - Complete setup with fixed IP configuration
โ๏ธ Configuration
Environment Variables
Variable | Description | Required |
| Your Tailscale API key | Yes |
| Your Tailnet name | Yes |
| Logging level (DEBUG, INFO, WARNING, ERROR) | No (default: INFO) |
| Prometheus metrics port | No (default: 9091) |
| Log file path | No (default: logs/tailscale-mcp.log) |
Example Configuration
๐ Grafana Dashboard Integration
TailscaleMCP includes comprehensive Grafana dashboard support inspired by the zydepoint/tailscale-dashboard project. You can create beautiful, interactive dashboards for monitoring your Tailscale network.
Dashboard Types
Comprehensive Dashboard: Complete network overview with device status, health scores, bandwidth usage, and historical trends
Network Topology Dashboard: Visual network topology with device relationships and connection maps
Security Dashboard: Security-focused monitoring with ACL overview, access patterns, and security alerts
Creating Dashboards
Monitoring Features
Real-time Metrics: Device counts, health scores, bandwidth usage
Network Topology: Visual representation of device connections
Health Reports: Automated analysis with alerts and recommendations
Prometheus Integration: Export metrics for monitoring systems
Example Dashboard Demo
Run the included demo script to see all dashboard features:
This will create:
Comprehensive monitoring dashboard
Network topology visualization
Security monitoring dashboard
Prometheus metrics export
Deployment instructions
๐๏ธ Modular Architecture
The TailscaleMCP server is built with a clean, modular architecture that separates concerns and makes the codebase maintainable and extensible.
Project Structure
Tool Categories
๐ง Device Management Tools (device_tools.py)
List and search devices
Device authorization and management
SSH access configuration
Device tagging and grouping
Exit node and subnet router management
๐ Monitoring Tools (monitoring_tools.py)
Network status and health monitoring
Prometheus metrics export
Network topology visualization
Grafana dashboard creation and export
Health reports and analytics
๐ Taildrop Tools (taildrop_tools.py)
Secure file sharing between devices
Transfer management and monitoring
File expiration and cleanup
Transfer statistics and analytics
๐ DNS Tools (dns_tools.py)
MagicDNS configuration
Custom DNS record management
DNS resolution and caching
Network policy management
ACL (Access Control List) management
Benefits of Modular Architecture
Maintainability: Each tool category is isolated and focused
Extensibility: Easy to add new tools without affecting existing functionality
Testability: Individual modules can be tested in isolation
Code Reusability: Tool modules can be reused across different contexts
Error Isolation: Issues in one module don't affect others
๐ ๏ธ Development
Prerequisites
Python 3.11+
uv (recommended) or pip
Docker (optional)
Setup Development Environment
Development Commands
Docker Development
๐งช Testing
The project uses pytest with comprehensive test coverage:
๐ Code Quality
This project maintains high code quality standards:
Ruff: Fast Python linter and formatter
MyPy: Static type checking
Pytest: Comprehensive testing framework
Pre-commit: Automated code quality checks
Bandit: Security linting
Safety: Dependency vulnerability scanning
๐ CI/CD Pipeline
The project includes a comprehensive CI/CD pipeline with:
Linting: Ruff, MyPy, and security checks
Testing: Multi-Python version testing with coverage
Security: Bandit and Safety scanning
Building: Package and Docker image building
Deployment: Automatic PyPI publishing on releases
๐ณ Docker Support
Production Image
Development Image
Docker Compose
๐ API Reference
Core Classes
TailscaleMCPServer
Main server class for managing Tailscale networks.
Available Tools
list_devices(online_only: bool = False, filter_tags: List[str] = None)get_device(device_id: str)get_network_status()get_dns_config()list_acls(detailed: bool = False)enable_exit_node(device_id: str, advertise_routes: List[str] = None)disable_exit_node(device_id: str)enable_subnet_router(device_id: str, subnets: List[str])disable_subnet_router(device_id: str)
Exception Handling
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Development Workflow
Setup development environment:
make setupMake your changes
Run tests:
make testRun linting:
make lintFormat code:
make formatCommit with conventional commits
Push and create PR
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Support
Documentation: GitHub Wiki
Issues: GitHub Issues
Discussions: GitHub Discussions
๐ Acknowledgments
FastMCP for the excellent MCP framework
Tailscale for the amazing networking platform
Ruff for fast Python tooling
All contributors and users of this project
Made with โค๏ธ by the TailscaleMCP team
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables comprehensive management of Tailscale networks including device management, DNS configuration, file sharing via Taildrop, security monitoring, and network automation with built-in Grafana/Prometheus observability stack.
- ๐ Features
- ๐ฏ Usage
- ๐ฆ Installation
- ๐ง Quick Start
- ๐ Monitoring Stack
- โ๏ธ Configuration
- ๐ Grafana Dashboard Integration
- ๐๏ธ Modular Architecture
- ๐ ๏ธ Development
- ๐งช Testing
- ๐ Code Quality
- ๐ CI/CD Pipeline
- ๐ณ Docker Support
- ๐ API Reference
- ๐ค Contributing
- ๐ License
- ๐ Support
- ๐ Acknowledgments