Skip to main content

Bridge server connecting Agent Communication Protocol (ACP) agents with Model Context Protocol (MCP) clients

Project description

ACP-MCP-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

๐Ÿณ Docker

Quick Start with Docker

# Build the image
docker build -t acp-mcp-server .

# Run with Streamable HTTP transport
docker run -p 9000:9000 acp-mcp-server

# Run with SSE transport
docker run -p 8000:8000 acp-mcp-server \
  --transport sse --host 0.0.0.0 --port 8000

# Connect to custom ACP server
docker run -p 9000:9000 -e ACP_BASE_URL=http://my-acp-server:8001 acp-mcp-server

Using Docker Compose

# Run HTTP transport service
docker-compose up acp-mcp-http

# Run SSE transport service
docker-compose up acp-mcp-sse

# Run both services
docker-compose up

# Run development mode with live code reload
docker-compose --profile dev up acp-mcp-dev

Production Docker Image

For production deployments, use the multi-stage Dockerfile:

# Build production image
docker build -f Dockerfile.prod -t acp-mcp-server:prod .

# Run production container
docker run -d \
  --name acp-mcp-server \
  --restart unless-stopped \
  -p 9000:9000 \
  -e ACP_BASE_URL=http://your-acp-server:8000 \
  acp-mcp-server:prod

๐Ÿค 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

Project details


Download files

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

Source Distribution

iflow_mcp_gongrzhe_acp_mcp_server-0.0.5.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file iflow_mcp_gongrzhe_acp_mcp_server-0.0.5.tar.gz.

File metadata

  • Download URL: iflow_mcp_gongrzhe_acp_mcp_server-0.0.5.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_gongrzhe_acp_mcp_server-0.0.5.tar.gz
Algorithm Hash digest
SHA256 1c48dc50fcecc1afc38d0221e7620f0109af89ecce0a2fe07858ae83d38fc712
MD5 4b6fc96c78ae64b5788d758a6ec2bbf6
BLAKE2b-256 88390a584af959f0355fdf9144e39d6da33a7b5160814367ab44c38f0259f224

See more details on using hashes here.

File details

Details for the file iflow_mcp_gongrzhe_acp_mcp_server-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_gongrzhe_acp_mcp_server-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_gongrzhe_acp_mcp_server-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e0eb95af8058f09032af8606fc424198f886feeda140a6f36472c5899a88b6c8
MD5 bba39cea049e280387c0ce0581f3aca1
BLAKE2b-256 e2c79f895fab6eef862a18a991191653ff5e2f4fc6e6a2a056f812b4ebae834f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page