Sponsored by Deepsite.site

MCP Agent Connector

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

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.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
ChatWiseThe second fastest AI chatbot™
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp
WindsurfThe new purpose-built IDE to harness magic
CursorThe AI Code Editor
DeepChatYour AI Partner on Desktop
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
Playwright McpPlaywright MCP server