Skip to content

Allow agents/subagents to load and remove MCP servers #554

@szmania

Description

@szmania

Description

Currently, MCP servers can only be managed at the primary agent level. This task aims to enable agents and subagents to dynamically load and remove MCP servers using dedicated tools.

Proposed Solution

Introduce two new tools:

  1. /load-mcp: Allows agents/subagents to load MCP servers dynamically.
  2. /remove-mcp: Allows agents/subagents to remove/unload MCP servers dynamically.

Requirements

  • Ensure that agents/subagents can invoke these tools to manage their own MCP server connections.
  • Maintain isolation and security: agents/subagents should only manage servers relevant to their scope.
  • Validate that the tools work seamlessly with the existing MCP server infrastructure.
  • Ensure proper error handling and feedback for invalid or unauthorized operations.

Acceptance Criteria

  • Agents can load MCP servers using /load-mcp.
  • Agents can remove MCP servers using /remove-mcp.
  • Subagents can load MCP servers using /load-mcp.
  • Subagents can remove MCP servers using /remove-mcp.
  • Proper validation and error messages for invalid operations.
  • Documentation updated to reflect new capabilities.

Dependencies

  • Existing MCP server infrastructure in cecli.
  • Agent/Subagent command handling system.

Notes

  • This feature should align with the existing /load-mcp and /remove-mcp commands available at the primary level.
  • Ensure backward compatibility with existing MCP server management.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions