mcp_agent_connector

Enables any MCP-compliant agentic platform (Claude, Grok, TypingMind, Cursor, etc.) to auto-discover generated MCP servers and sync capabilities from build metadata.

GitHubスター

0

ユーザー評価

未評価

お気に入り

0

閲覧数

12

フォーク

0

イシュー

0

README
MCP Agent Connector

GitHub
GitHub last commit
GitHub issues

Introduction

The MCP Agent Connector is a powerful open-source library designed to enable any MCP-compliant agentic platform (such as Claude, Grok, TypingMind, Cursor, etc.) to auto-discover generated MCP servers and sync capabilities directly from build metadata. This library streamlines the integration process by automating the discovery of MCP servers and ensuring real-time synchronization with client environments.

Features
  • Auto-publish MCP server manifest: Automatically publishes a manifest of tools and resources available on the MCP server.
  • Supports mcp-agent and Lutra agents: Compatible with both mcp-agent and Lutra agent platforms, offering flexible integration options.
  • Metadata broadcast over local network (optional): Optionally broadcasts metadata over the local network to facilitate automatic discovery by compatible agents.
  • Claude agent mapping via Claude Desktop config: Maps Claude agents using configurations from Claude Desktop for seamless integration.
  • Real-time sync with client environment: Ensures that client environments are kept up-to-date with the latest capabilities and information from MCP servers.
Installation Instructions

To install the mcp_agent_connector library, you can use pip:

pip install mcp-agent-connector

Alternatively, if you prefer to clone the repository and install it manually, follow these steps:

  1. Clone the repository:

    git clone https://github.com/your-username/mcp_agent_connector.git
    
  2. Navigate into the project directory:

    cd mcp_agent_connector
    
  3. Install the library using pip:

    pip install .
    
Usage Examples
Example 1: Basic Initialization and Auto-publishing
from mcp_agent_connector import MCPAgentConnector

# Initialize the connector with default settings
connector = MCPAgentConnector()

# Start auto-publishing the MCP server manifest
connector.start()
Example 2: Custom Configuration for Claude Agent Mapping
from mcp_agent_connector import MCPAgentConnector, ClaudeConfig

# Define custom configuration for Claude agents
claude_config = ClaudeConfig(
    desktop_path="/path/to/claude/desktop/config",
    agent_mapping={"agent1": "server1", "agent2": "server2"}
)

# Initialize the connector with the custom configuration
connector = MCPAgentConnector(claude_config=claude_config)

# Start auto-publishing and mapping Claude agents
connector.start()
Example 3: Enabling Metadata Broadcast Over Local Network
from mcp_agent_connector import MCPAgentConnector, BroadcastConfig

# Define broadcast configuration
broadcast_config = BroadcastConfig(
    enabled=True,
    network_interface="eth0",
    broadcast_interval=60  # seconds
)

# Initialize the connector with broadcast configuration
connector = MCPAgentConnector(broadcast_config=broadcast_config)

# Start broadcasting and auto-publishing
connector.start()
API Documentation
Class: MCPAgentConnector
  • __init__(self, claude_config=None, broadcast_config=None)

    • Initializes the MCP Agent Connector.
    • Parameters:
      • claude_config: (Optional) An instance of ClaudeConfig for Claude agent mapping.
      • broadcast_config: (Optional) An instance of BroadcastConfig to enable metadata broadcasting over the local network.
  • start(self)

    • Starts the auto-publishing process and any additional configured features such as Claude agent mapping or metadata broadcasting.
Class: ClaudeConfig
  • __init__(self, desktop_path=None, agent_mapping=None)
    • Initializes configuration for Claude agents.
    • Parameters:
      • desktop_path: (Optional) Path to the Claude Desktop configuration file.
      • agent_mapping: (Optional) A dictionary mapping Claude agent names to MCP server names.
Class: BroadcastConfig
  • __init__(self, enabled=False, network_interface=None, broadcast_interval=30)
    • Initializes configuration for local network metadata broadcasting.
    • Parameters:
      • enabled: (Default: False) Boolean indicating whether broadcasting is enabled.
      • network_interface: (Optional) The network interface to use for broadcasting.
      • broadcast_interval: (Default: 30 seconds) Interval between broadcasts.
License

This project is licensed under the MIT License. See the LICENSE file for details.


Feel free to contribute to this open-source library by submitting pull requests or reporting issues on GitHub. We welcome any feedback and suggestions to improve mcp_agent_connector!

⚠️ Development Status

This library is currently in early development. Some tests may be failing with the following issues:


Contributions to fix these issues are welcome! Please submit a pull request if you have a solution.