Traefik MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Traefik MCP ServerList all routers configured for the Docker provider"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Traefik MCP Server
A Model Context Protocol (MCP) server for managing and interacting with Traefik reverse proxy instances through AI assistants.
Overview
This MCP server enables AI assistants to query and manage Traefik configurations, monitor service health, and perform administrative tasks through natural language interactions.
Related MCP server: ContainMind
Features
🔍 Query Traefik routers, services, and middlewares
📊 Get comprehensive Traefik overview and statistics
⚙️ View detailed configuration for individual components
🔒 Support for both API key and basic authentication
🚀 Async operations for optimal performance
🛠️ Provider-specific filtering (Docker, file, etc.)
Installation
Prerequisites
Python 3.10 or higher
uv package manager
A running Traefik instance with API enabled
Option 1: Local Development Setup
Clone the repository:
git clone <repository-url> cd traefik-mcpCreate virtual environment and install dependencies:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -e ".[dev]"Configure environment variables:
cp .env.example .env # Edit .env with your Traefik API URL and credentials
Option 2: Docker Setup
Clone the repository:
git clone <repository-url> cd traefik-mcpBuild the Docker image:
docker build -t traefik-mcp .Run the container:
# Basic run docker run -it --rm traefik-mcp # With environment variables docker run -it --rm \ -e TRAEFIK_API_URL=http://traefik:8080 \ -e TRAEFIK_BASIC_AUTH_USERNAME=admin \ -e TRAEFIK_BASIC_AUTH_PASSWORD=admin \ traefik-mcp # Background service docker run -d --name traefik-mcp \ -e TRAEFIK_API_URL=http://traefik:8080 \ -e TRAEFIK_BASIC_AUTH_USERNAME=admin \ -e TRAEFIK_BASIC_AUTH_PASSWORD=admin \ traefik-mcp
Configuration
Set the following environment variables:
Required
TRAEFIK_API_URL: URL of your Traefik API endpoint (e.g.,http://localhost:8080)
Authentication (choose one)
TRAEFIK_API_KEY: API key for Bearer token authenticationTRAEFIK_BASIC_AUTH_USERNAME: Username for basic authenticationTRAEFIK_BASIC_AUTH_PASSWORD: Password for basic authentication
Optional
MCP_LOG_LEVEL: Logging level (default: INFO)
Note: API key authentication takes precedence over basic authentication if both are configured.
Usage
Running the Server
uv run traefik-mcpIntegration with AI Clients
Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"traefik": {
"command": "/path/to/traefik-mcp/.venv/bin/traefik-mcp",
"args": [],
"env": {
"TRAEFIK_API_URL": "http://localhost:8080",
"TRAEFIK_BASIC_AUTH_USERNAME": "admin",
"TRAEFIK_BASIC_AUTH_PASSWORD": "admin"
}
}
}
}Claude Desktop (Docker)
{
"mcpServers": {
"traefik": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"traefik-mcp"
],
"env": {
"TRAEFIK_API_URL": "http://localhost:8080",
"TRAEFIK_BASIC_AUTH_USERNAME": "admin",
"TRAEFIK_BASIC_AUTH_PASSWORD": "admin"
}
}
}
}Alternative (using uv)
{
"mcpServers": {
"traefik": {
"command": "uv",
"args": [
"--directory",
"/path/to/traefik-mcp",
"run",
"traefik-mcp"
],
"env": {
"TRAEFIK_API_URL": "http://localhost:8080"
}
}
}
}Available Tools
The MCP server provides the following tools:
get_traefik_overview: Get comprehensive overview of all Traefik componentslist_routers: List all HTTP routers (optional provider filter)get_router_details: Get detailed configuration for a specific routerlist_services: List all HTTP services (optional provider filter)get_service_details: Get detailed configuration for a specific servicelist_middlewares: List all HTTP middlewares (optional provider filter)
Example Usage
Once configured with Claude Desktop, you can ask questions like:
"Show me all routers in my Traefik setup"
"What services are running behind the traefik.test router?"
"List all middlewares configured for Docker provider"
"Give me an overview of my Traefik instance"
Development
Running Tests
pytestCode Formatting
black src/ tests/
ruff check src/ tests/Type Checking
mypy src/Troubleshooting
Common Issues
Server shows 0 routers/services
Ensure your Traefik API is accessible at the configured URL
Verify authentication credentials are correct
Check that Traefik API is enabled in your configuration
Authentication failures
Verify basic auth credentials match your Traefik configuration
If using API key, ensure it's correctly formatted
API key takes precedence over basic auth if both are set
Connection errors
Check that
TRAEFIK_API_URLis reachable from the MCP serverVerify Traefik is running and API is enabled
Check network/firewall settings
Testing the Server
You can test the MCP server manually:
# Set environment variables and run
export TRAEFIK_API_URL="http://localhost:8080"
export TRAEFIK_BASIC_AUTH_USERNAME="admin"
export TRAEFIK_BASIC_AUTH_PASSWORD="admin"
uv run traefik-mcpProject Status
✅ Phase 1 Complete - Core functionality implemented
Traefik API integration with authentication
All query tools working correctly
Support for both API key and basic authentication
Comprehensive error handling
🚧 Phase 2 Planned - Management features
Dynamic configuration updates
Service health monitoring
Advanced filtering and search
See TASKS.md for current development tasks and PLANNING.md for project roadmap.
Contributing
Contributions are welcome! Please read our contributing guidelines and submit pull requests.
License
MIT License - See LICENSE file for details
Resources
Available Tools
6 toolsget_router_detailsC
Get detailed configuration for a specific router
| Name | Required | Description | Default |
|---|---|---|---|
| router_name | Yes | Name of the router | |
| provider | No | Optional provider name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves configuration details but doesn't describe what 'detailed configuration' includes (e.g., settings, status, metadata), whether it's a read-only operation, potential error conditions, or response format. This leaves significant gaps for a tool that likely returns structured data about network infrastructure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse. Every part of the sentence earns its place by conveying essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of router configuration and the lack of annotations and output schema, the description is insufficient. It doesn't explain what 'detailed configuration' entails, how the data is returned, or any behavioral aspects like permissions or side effects. For a tool that likely returns technical details, more context is needed to guide effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with clear documentation for both parameters ('router_name' and optional 'provider'). The description adds no parameter-specific information beyond what the schema provides, such as examples or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, but the description doesn't enhance parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get detailed configuration') and target resource ('for a specific router'), making the purpose immediately understandable. It distinguishes from siblings like 'list_routers' by focusing on a single router's details rather than listing all routers. However, it doesn't explicitly contrast with 'get_service_details' or 'get_traefik_overview' beyond the resource type.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'get_router_details' over 'list_routers' (for details vs. listing) or 'get_service_details' (for router vs. service details), nor does it specify prerequisites like authentication or context requirements. Usage is implied by the name but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_service_detailsC
Get detailed configuration for a specific service
| Name | Required | Description | Default |
|---|---|---|---|
| service_name | Yes | Name of the service | |
| provider | No | Optional provider name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Get' implies a read operation, it doesn't specify whether this requires authentication, has rate limits, returns structured vs. raw data, or handles errors. For a tool with zero annotation coverage, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a simple retrieval tool and front-loads the core purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete for a tool that retrieves configuration details. It doesn't explain what 'detailed configuration' includes, the format of returned data, or any prerequisites. For a configuration retrieval tool, this leaves too much unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters ('service_name' and optional 'provider'). The description adds no additional parameter context beyond implying configuration retrieval for a service. This meets the baseline when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get detailed configuration') and resource ('for a specific service'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_router_details' or 'list_services', which likely retrieve similar configuration data for different resources.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. With siblings like 'list_services' (which likely lists services) and 'get_router_details' (which gets router configurations), there's no indication of when this specific service-details tool is appropriate or what distinguishes it from other retrieval tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_traefik_overviewB
Get an overview of the Traefik instance configuration
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves configuration overview data, implying a read-only operation, but doesn't specify details like response format, data scope (e.g., live vs. static config), error handling, or performance considerations. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that directly states the tool's purpose without any wasted words. It is front-loaded with the core action and resource, making it highly efficient and easy to parse. Every part of the sentence earns its place by conveying essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is adequate as a basic overview. It explains what the tool does at a high level, which is sufficient for this low-complexity context. However, it lacks details on output format or behavioral traits, which could be helpful even for simple tools, keeping it at a minimum viable level.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics beyond the schema, and it appropriately avoids mentioning any. This meets the baseline for tools with no parameters, warranting a score of 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('overview of the Traefik instance configuration'), making the purpose specific and understandable. It distinguishes from siblings like get_router_details or list_routers by focusing on a high-level overview rather than detailed lists or specific components. However, it doesn't explicitly contrast with all siblings, so it's not a perfect 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like list_routers or get_router_details. It lacks explicit context, exclusions, or named alternatives, leaving the agent to infer usage based on tool names alone. This minimal guidance is insufficient for optimal tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_middlewaresC
List all HTTP middlewares in Traefik
| Name | Required | Description | Default |
|---|---|---|---|
| provider | No | Optional provider name to filter by |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is a list operation, implying it's read-only and non-destructive, but doesn't specify aspects like pagination, rate limits, authentication requirements, or what the output format looks like. This leaves significant gaps for an agent to understand how to use it effectively.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., list format, fields included), behavioral constraints, or how it relates to sibling tools. For a tool with one parameter but lacking structured metadata, more context is needed for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the single parameter 'provider' documented as 'Optional provider name to filter by'. The description doesn't add any meaning beyond this, such as examples of provider names or filtering behavior. With high schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('List') and resource ('all HTTP middlewares in Traefik'), making the purpose unambiguous. It doesn't explicitly differentiate from sibling tools like 'list_routers' or 'list_services', but the resource specificity provides implicit differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'list_routers' or 'list_services', nor does it mention prerequisites or context for usage. It simply states what the tool does without operational context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_routersC
List all HTTP routers in Traefik
| Name | Required | Description | Default |
|---|---|---|---|
| provider | No | Optional provider name to filter by |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('List all HTTP routers') but doesn't describe what the output looks like (e.g., format, pagination), error conditions, or any constraints beyond the optional provider filter. This leaves significant gaps for a tool with no output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with zero wasted content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'list all' entails (e.g., pagination, limits), the return format, or how it differs from sibling tools. For a tool with no structured output information, more context is needed to be fully helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the single parameter 'provider' documented as 'Optional provider name to filter by'. The description doesn't add any meaning beyond this, such as examples of provider names or filtering behavior, so it meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('List') and resource ('all HTTP routers in Traefik'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'get_router_details' or 'get_traefik_overview', but the scope ('all') provides some implicit distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'get_router_details' (for specific routers) or 'get_traefik_overview' (for broader context). It lacks any explicit when/when-not instructions or prerequisite information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_servicesB
List all HTTP services in Traefik
| Name | Required | Description | Default |
|---|---|---|---|
| provider | No | Optional provider name to filter by |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure but only states what the tool does ('List all HTTP services'). It doesn't mention whether this is a read-only operation, potential rate limits, authentication requirements, or what the output format looks like (e.g., list structure, pagination). This leaves significant behavioral gaps for the agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one optional parameter and no output schema, the description is minimally adequate. However, it lacks context about the return format (e.g., what 'services' include, list structure) and behavioral traits like safety or performance, which would help the agent use it more effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the single parameter 'provider' documented as 'Optional provider name to filter by'. The description doesn't add any parameter details beyond this, so it meets the baseline of 3 where the schema does the heavy lifting but doesn't compensate with extra context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('List') and resource ('all HTTP services in Traefik'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_service_details' or 'get_traefik_overview', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'get_service_details' for specific services or 'get_traefik_overview' for broader context. It lacks explicit when-to-use or when-not-to-use instructions, leaving the agent to infer usage from tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
- First observed
get_router_details - First observed
get_service_details - First observed
get_traefik_overview - First observed
list_middlewares - First observed
list_routers - First observed
list_services
TDQS
Every tool has a clearly distinct purpose targeting specific resources in Traefik: three 'get' tools for detailed configuration of routers, services, and the overall instance, and three 'list' tools for enumerating middlewares, routers, and services. There is no overlap or ambiguity in functionality.
All tool names follow a consistent verb_noun pattern with clear and descriptive naming. The verbs 'get' and 'list' are used appropriately, and nouns like 'router_details', 'service_details', and 'traefik_overview' maintain a uniform structure throughout.
With 6 tools, the server is well-scoped for managing a Traefik instance. It provides essential read operations for configuration overview and details, which is appropriate for monitoring and inspection purposes without being overly complex or sparse.
The tool set covers read operations thoroughly for routers, services, middlewares, and overall configuration, but there are notable gaps for write operations like creating, updating, or deleting resources. This limits the server to inspection-only workflows, which may be insufficient for full management.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Manage hosts, redirects, SSL, and traffic analytics from Claude and other AI assistants.
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Inspect and control your Northflank projects, services, jobs, and builds from your AI assistant.
Deploy, monitor, and manage your OpenClaw AI assistants via natural language.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Docker containers, deploy stacks, and monitor services across multiple Docker hosts from one centralized location. Supports container lifecycle management, Docker Compose operations, and infrastructure orchestration through natural language commands.6MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage and analyze containers across Docker and Podman through natural language, providing unified inspection, monitoring, and diagnostics.3-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Nginx Proxy Manager instances through natural language, covering 28 tools for proxy hosts, certificates, streams, and more.MIT
- AlicenseBqualityCmaintenanceEnables AI agents to manage Nginx Proxy Manager (reverse proxies, streams, redirects, and Let's Encrypt certificates) through natural language commands.3030MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/theupriser/treafik-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server