
A MCP (Model Context Protocol) server that provides AI assistants with tools to interact with Trac project management instances — managing tickets, wiki pages, and milestones
概览
Standalone MCP server that gives AI agents full access to Trac project management -- tickets, wiki, milestones, and search -- via the Model Context Protocol. When trac-mcp-server is driven through auto-pm, auto-pm reads its connection settings from .auto_pm/config.yml in your project root (rather than the environment variables above). Run auto-pm setup in your project directory to generate the file; the resulting .auto_pm/config.yml carries trac.url, trac.username, a ${TRAC_PASSWORD} reference, and component mappings. Configuration via environment variables, .env file, or YAML config file (.trac_mcp/config.yaml): For YAML config file format and advanced options, see Configuration Reference. For the http transport specifically, including multi-identity auth, see HTTP Transport. Any MCP client that supports stdio transport can launch trac-mcp-server as a subprocess. Pass Trac credentials via environment variables.
README
以下为原文 README 节选,完整内容请查看原文。
trac-mcp-server
Standalone MCP server that gives AI agents full access to Trac project management – tickets, wiki, milestones, and search – via the Model Context Protocol.
Quick Start
Requires Python 3.10 or later.
pip install .
Set your Trac connection:
export TRAC_URL="https://trac.example.com"
export TRAC_USERNAME="your-username"
export TRAC_PASSWORD="your-password"
Run the server:
trac-mcp-server
Using auto-pm? When trac-mcp-server is driven through auto-pm, auto-pm reads its connection settings from
.auto_pm/config.ymlin your project root (rather than the environment variables above). Runauto-pm setupin your project directory to generate the file; the resulting.auto_pm/config.ymlcarriestrac.url,trac.username, a${TRAC_PASSWORD}reference, and component mappings.
Configuration
Configuration via environment variables, .env file, or YAML config file (.trac_mcp/config.yaml):
| Variable | Required | Default | Description |
|---|---|---|---|
TRAC_URL |
Yes | – | Trac instance URL |
TRAC_USERNAME |
Yes | – | Trac username |
TRAC_PASSWORD |
Yes | – | Trac password |
TRAC_INSECURE |
No | false |
Skip SSL verification (development only) |
TRAC_DEBUG |
No | false |
Enable debug logging |
TRAC_MAX_PARALLEL_REQUESTS |
No | 5 |
Max parallel XML-RPC requests |
TRAC_MAX_BATCH_SIZE |
No | 500 |
Max items per batch operation (1-10000) |
TRAC_RPC_TIMEOUT |
No | 60 |
Read timeout in seconds for XML-RPC requests (5-300) |
TRAC_ALLOWED_INSTANCES |
No | – | Comma-separated instances (/path on the TRAC_URL host, or absolute URL) the default identity may reach; unset = unrestricted. TRAC_URL must be on the list (ticket #110) |
TRAC_MCP_TRANSPORT |
No | stdio |
MCP transport: stdio or http |
TRAC_MCP_HOST |
No | 127.0.0.1 |
Bind host for the http transport |
TRAC_MCP_PORT |
No | 8080 |
Bind port for the http transport |
TRAC_MCP_AUTH_TOKEN |
No | – | Bearer token required by the http transport |
TRAC_IDENTITIES |
No | – | Path to a file mapping per-caller bearer tokens to their own Trac username/password (http transport only) |
For YAML config file format and advanced options, see Configuration Reference. For the http transport specifically, including multi-identity auth, see HTTP Transport.
MCP Client Integration
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"trac": {
"command": "trac-mcp-server",
"env": {
"TRAC_URL": "https://trac.example.com",
"TRAC_USERNAME": "your-username",
"TRAC_PASSWORD": "your-password"
}
}
}
}
Claude Code
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"trac": {
"command": "trac-mcp-server",
"env": {
"TRAC_URL": "https://trac.example.com",
"TRAC_USERNAME": "your-username",
"TRAC_PASSWORD": "your-password"
}
}
}
}