Skip to content

Standardize MCP server config across AI agents#61

Merged
codeaholicguy merged 4 commits intomainfrom
feature-mcp-config
Apr 17, 2026
Merged

Standardize MCP server config across AI agents#61
codeaholicguy merged 4 commits intomainfrom
feature-mcp-config

Conversation

@codeaholicguy
Copy link
Copy Markdown
Owner

Summary

  • Define MCP servers once in .ai-devkit.json (or YAML templates), generate agent-specific configs via ai-devkit install
  • Support Claude Code (.mcp.json) and Codex (.codex/config.toml), extensible to more agents via mcpConfigPath in environment definitions
  • Support stdio, http (streamable-http), and sse (deprecated) transport types
  • Safe merge with existing configs, interactive prompt for conflicts, CI-safe with --overwrite flag

How it works

  1. Define servers in a template or .ai-devkit.json, example:
mcpServers:
  memory:
    transport: stdio
    command: npx
    args: ["-y", "@ai-devkit/memory"]
  notion:
    transport: http
    url: https://mcp.notion.com/mcp
  1. ai-devkit init -t template.yaml → persists mcpServers to .ai-devkit.json
  2. ai-devkit install → generates .mcp.json and .codex/config.toml from config
  3. Existing agent configs are preserved, only managed servers are added/updated

Key design decisions

  • Single source of truth: mcpServers lives in .ai-devkit.json
  • Abstract base class: BaseMcpGenerator handles shared plan/apply diff-merge logic; subclasses only provide format-specific I/O
  • CI-safe: non-interactive mode skips conflicts by default; --overwrite forces overwrite; detected via shared isInteractiveTerminal() util
  • mcpConfigPath on EnvironmentDefinition: add the path to enable MCP for a new agent

@codeaholicguy codeaholicguy merged commit 4ece4cd into main Apr 17, 2026
7 checks passed
@codeaholicguy codeaholicguy deleted the feature-mcp-config branch April 17, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant