Skip to main content

ACP-MCP Bridge Server

PyPI version Python 3.11+ License: MIT

A bridge server that connects Agent Communication Protocol (ACP) agents with Model Context Protocol (MCP) clients, enabling seamless integration between ACP-based AI agents and MCP-compatible tools like Claude Desktop.

✨ Features

  • 🔄 Protocol Bridge: Seamlessly connects ACP agents with MCP clients
  • 🚀 Multiple Transports: Supports STDIO, SSE, and Streamable HTTP
  • 🤖 Agent Discovery: Automatic discovery and registration of ACP agents
  • 🧠 Smart Routing: Intelligent routing of requests to appropriate agents
  • 🔄 Async Support: Full support for synchronous and asynchronous operations
  • 💬 Interactive Sessions: Support for multi-turn agent interactions
  • 🌐 Multi-Modal: Handle text, images, and other content types

🚀 Quick Start

Installation

# Install from PyPI
pip install acp-mcp-server

# Or use uvx for isolated execution
uvx acp-mcp-server

Basic Usage

# Run with STDIO (default, for Claude Desktop)
acp-mcp-server

# Run with SSE transport
acp-mcp-server --transport sse --port 8000

# Run with HTTP transport
acp-mcp-server --transport streamable-http --host 0.0.0.0 --port 9000

# Connect to different ACP server
acp-mcp-server --acp-url http://localhost:8001

Using with Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "acp-bridge": {
      "command": "uvx",
      "args": ["acp-mcp-server"]
    }
  }
}

📋 Requirements

  • Python 3.11+
  • Running ACP server with agents
  • FastMCP for protocol implementation

🔧 Configuration

Environment Variables

  • ACP_BASE_URL: ACP server URL (default: http://localhost:8000)

Command Line Options

usage: acp-mcp-server [-h] [--transport {stdio,sse,streamable-http}] [--host HOST] [--port PORT] [--path PATH] [--acp-url ACP_URL] [--version]

options:
  -h, --help            show this help message and exit
  --transport {stdio,sse,streamable-http}
                        Transport protocol (default: stdio)
  --host HOST           Host address for HTTP transports (default: 127.0.0.1)
  --port PORT           Port number for HTTP transports (default: 8000)
  --path PATH           URL path for HTTP transports (default: /mcp)
  --acp-url ACP_URL     ACP server URL (default: http://localhost:8000)
  --version             show program's version number and exit

🛠️ Available Tools

The bridge server provides several MCP tools:

Agent Management

  • discover_acp_agents: Discover available ACP agents
  • get_agent_info: Get detailed information about specific agents

Agent Execution

  • run_acp_agent: Execute agents in sync/async modes
  • get_async_run_result: Retrieve results from async executions
  • list_active_runs: List all active agent runs

Smart Routing

  • smart_route_request: Intelligently route requests to best agents
  • test_routing: Test routing logic without execution
  • add_routing_rule: Add custom routing rules
  • list_routing_strategies: View all routing strategies

Interactive Sessions

  • start_interactive_agent: Start interactive agent sessions
  • provide_user_input: Provide input to waiting agents
  • list_pending_interactions: View pending interactions

Message Processing

  • convert_acp_message: Convert between ACP and MCP formats
  • analyze_message_content: Analyze message structure and content

🏗️ Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   MCP Client    │    │  ACP-MCP Bridge │    │   ACP Agents    │
│ (Claude Desktop)│◄──►│     Server      │◄──►│ (echo, chat,    │
│                 │    │                 │    │  translate...)  │
└─────────────────┘    └─────────────────┘    └─────────────────┘
       │                         │                       │
   MCP Protocol            Protocol Bridge         ACP Protocol
  (STDIO/SSE/HTTP)        (FastMCP + aiohttp)    (HTTP/WebSocket)

🔌 Transport Modes

STDIO (Default)

Perfect for Claude Desktop integration:

acp-mcp-server

SSE (Server-Sent Events)

For web applications and streaming:

acp-mcp-server --transport sse --port 8000

Streamable HTTP

For REST API integration:

acp-mcp-server --transport streamable-http --port 9000

🧪 Development

Setup Development Environment

git clone https://github.com/GongRzhe/ACP-MCP-Server
cd ACP-MCP-Server
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -e ".[dev]"

Running Tests

pytest

Code Formatting

black acp_mcp_server/
isort acp_mcp_server/

📚 Examples

Basic Agent Execution

from acp_mcp_server import ACPMCPServer

# Create server instance
server = ACPMCPServer("http://localhost:8000")

# Run with STDIO for Claude Desktop
server.run()

# Or run with HTTP for web integration
server.run(transport="streamable-http", port=9000)

Custom ACP Integration

# Connect to custom ACP server
server = ACPMCPServer("http://my-acp-server:8001")
server.run(transport="sse", port=8080)

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

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

🔗 Related Projects

📞 Support

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acp_mcp_server-0.0.1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acp_mcp_server-0.0.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file acp_mcp_server-0.0.1.tar.gz.

File metadata

  • Download URL: acp_mcp_server-0.0.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for acp_mcp_server-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5e7deb21cb357a1af839245b19a64948fd3b8fa59bb2f6f6179a0f903cf01613
MD5 df6bdeb839ee692b3f0d1fe3316a8fc9
BLAKE2b-256 2ea0daf7a2fe40418d1e6bc369ba771f1bc5e67371449f1f7f9c7ebf3c6b9fc7

See more details on using hashes here.

File details

Details for the file acp_mcp_server-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: acp_mcp_server-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for acp_mcp_server-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c0029a441008eb8d53f7b3665e16d237eb922b7b63e3565285e93e88e175156a
MD5 9c70726940a368e6296bd709e9a838ae
BLAKE2b-256 6150155dcd36d3b910aea5669f788409c02075c4c5ea10a32025762217561e19

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

This release

0.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page