Skip to content

Integrate plugin MCP servers into apply #576

Description

@yacosta738

Goal

Extract MCP server declarations from supported plugins and merge them into AgentSync's existing MCP configuration pipeline.

Scope

  • Read supported plugin MCP declarations, including standard .mcp.json layouts.
  • Normalize server definitions into the existing McpServerConfig model.
  • Merge plugin servers with explicit [mcp_servers.*] entries using a documented precedence rule.
  • Generate the existing per-agent outputs, including Claude .mcp.json and Codex .codex/config.toml.
  • Respect [mcp] enablement, merge/overwrite strategy, and --agents filtering.
  • Include plugin origin in diagnostics and machine-readable output.
  • Handle unsupported app-bound/authenticated MCP declarations explicitly.

Security requirements

  • Never copy credentials from plugin content into committed configuration.
  • Do not execute server commands during apply.
  • Validate command, URL, headers, environment, and transport fields with existing safety rules.
  • Preserve unrelated user-managed MCP servers according to current merge semantics.

Dependencies

Blocked by #574 for the source/lock contract. Coordinate with #575 for plugin staging paths.

Acceptance criteria

  • A fixture plugin's MCP servers appear in the expected Claude and Codex outputs after agentsync apply.
  • Explicit repository MCP configuration wins or loses according to a tested, documented rule.
  • Dry-run reports changes without writing files.
  • Existing MCP configs and unrelated servers remain intact under merge mode.
  • Invalid or unsupported plugin MCP data fails with actionable diagnostics.
  • Unit, integration, and output-contract tests cover supported agents.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions