Skip to content

[Feature]: Remove duplicated mcp module from agentmesh in next major release, use agentmesh-mcp canonical export #2088

@Ricky-G

Description

@Ricky-G

Follow on from #2013

Package

agent-mesh

Problem Statement

Currently, the agentmesh and agentmesh-mcp crates in agent-governance-rust/ each carry an identical copy of the mcp module (~5,500 lines/code files), causing maintenance drag and significant risk for external consumers who might hit subtle type mismatches due to parallel type definitions in separate namespaces. We have deprecated the duplicate export via agentmesh::mcp for the moment, but the duplicate files remain in tree. This causes redundancy and increases maintenance risk, patching burden, and general confusion.

Proposed Solution

For the next major release, delete the entire agentmesh/src/mcp directory and its contents.

  • Instead, add a dependency on agentmesh-mcp in agentmesh and re-export its mcp types as needed (if desired at all).
  • Ensure any in-tree/internal users of agentmesh::mcp::* are migrated to use the canonical re-export path or the direct dependency.
  • Update documentation to clarify the canonical crate and type paths.

This will ensure there is exactly one canonical definition and home for the MCP types, eliminate future maintenance risks, and clarify API usage for downstream consumers.

Alternatives Considered

  1. Keep the deprecated duplicate. Minimal surface change today, but accumulates technical debt and uncertainty over time.
  2. Document but do not delete. Intentionally diverge over time and document, but this is not justified unless there is a strong release-cadence or gating reason.
  3. Remove deprecated export earlier. This would immediately break consumers using the agentmesh::mcp path.

Option 1 is a near-term stopgap only; option 2 is not advised unless driven by release/cadence needs; option 3 is semver-breaking and should be reserved for a major release.

Priority

Important

Contribution

  • I would be willing to submit a PR for this feature

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions