Unified Configuration Manager for AI Coding Tools
Manage MCP (Model Context Protocol) server configurations for multiple AI coding assistants from a single TOML file. Eliminate configuration duplication and keep your AI tools synchronized.
- Single Source of Truth: Define all MCP servers in one TOML configuration
- Multi-Tool Support: Generate configs for Cursor, opencode.ai, Codex, and Claude Code
- Environment Variables: Expand
${SHELL_VAR}and{CONFIG_VAR}references - Atomic Operations: Safe file writes with automatic backups
- Diff Preview: See changes before applying
- State Tracking: SHA-256 hashing tracks generated files
- Circular Reference Detection: Prevents infinite variable expansion loops
- Cross-Platform: Works on macOS, Linux, and Windows
| Tool | Format | Server Types | Config Path |
|---|---|---|---|
| Cursor | JSON | STDIO only | ~/.config/Cursor/User/globalStorage/.../mcp.json |
| opencode.ai | JSON | STDIO + HTTP | ~/.config/opencode/mcp.json |
| Codex | TOML | STDIO + HTTP | ~/.config/codex/mcp_config.toml |
| Claude Code | JSON | STDIO + HTTP | ~/.config/claude/mcp.json |
Download pre-built binaries from Releases.
Available platforms:
- macOS (Intel and Apple Silicon)
- Linux x64
- Windows x64
git clone https://github.com/tftio/multi-agent-config.git
cd multi-agent-config
cargo install --path .# Initialize configuration with template
multi-agent-config init
# Edit the configuration
# File location: ~/.config/multi-agent-config/config.toml
# Validate your configuration
multi-agent-config validate
# Preview changes
multi-agent-config diff
# Apply configuration to all tools
multi-agent-config compile
# Compile for specific tools only
multi-agent-config compile --tool cursor --tool codexLocation: ~/.config/multi-agent-config/config.toml
[settings]
version = "1.0"
default_targets = ["cursor", "opencode", "codex"]
# Environment variables
[env]
GITHUB_TOKEN = "${GITHUB_PERSONAL_ACCESS_TOKEN}"
API_BASE = "https://api.example.com"
# STDIO MCP Server
[mcp.servers.github-mcp]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
enabled = true
targets = ["all"]
[mcp.servers.github-mcp.env]
GITHUB_PERSONAL_ACCESS_TOKEN = "{GITHUB_TOKEN}"
# HTTP MCP Server (opencode, codex, claude-code only)
[mcp.servers.remote-api]
url = "{API_BASE}/mcp"
bearer_token = "{GITHUB_TOKEN}"
targets = ["opencode", "codex", "claude-code"]
# Tool-specific server
[mcp.servers.cursor-only]
command = "node"
args = ["server.js"]
targets = ["cursor"]
disabled = false # Cursor-specific
autoApprove = ["read"] # Cursor-specific${VAR}- Expands from shell environment{VAR}- Expands from[env]section- Nested expansion supported (up to 10 levels)
- Circular references detected and rejected
targets = ["all"]- Include for all toolstargets = ["cursor", "codex"]- Include for specific tools onlyenabled = false- Disable server globally
Create template configuration:
multi-agent-config init
# Overwrite existing config
multi-agent-config init --forceCheck configuration validity:
multi-agent-config validate
# Verbose output
multi-agent-config validate --verboseGenerate tool-specific configurations:
# Compile for all tools
multi-agent-config compile
# Compile for specific tools
multi-agent-config compile --tool cursor
# Dry run (show what would be done)
multi-agent-config compile --dry-run
# Verbose output
multi-agent-config compile --verbosePreview changes without writing:
# Show diff for all tools
multi-agent-config diff
# Show diff for specific tool
multi-agent-config diff --tool cursor# Show version
multi-agent-config version
# Show license information
multi-agent-config license
# Health check
multi-agent-config doctor
# Generate shell completions
multi-agent-config completions bash > /usr/local/etc/bash_completion.d/multi-agent-config- Rust 1.85.0 or later
- just - Task runner
- peter-hook - Git hooks manager
- versioneer - Version management
# Quick development check
just dev
# Run tests
just test
# Full CI pipeline
just ci# Run all tests
cargo test --all --verbose
# Run with coverage (Linux only)
cargo tarpaulin --all --out Html --engine llvm --timeout 300- clippy: Aggressive linting with pedantic and nursery checks
- rustfmt: Nightly formatter for consistent code style
- cargo-audit: Security vulnerability scanning
- cargo-deny: License and dependency compliance
Hooks automatically run on commit/push:
- Pre-commit: Format check, clippy
- Pre-push: Tests, security audit, version validation
# Install hooks
just install-hooksconfig: TOML parsing and validationexpand: Variable expansion with circular detectiontransform: Tool-specific format transformersfile_ops: Atomic writes, backups, state tracking, diffscli: Command implementations and output formatting
Unified TOML → Parse → Validate → Expand Variables →
Transform per Tool → Backup → Atomic Write → Track State
Licensed under the MIT License. See LICENSE for details.
See CHANGELOG.md for version history.
- Issues: GitHub Issues
- Email: jfb@workhelix.com