MCP Integration

ACP ships a cmd/acp-mcp binary — a JSON-RPC 2.0 over stdio adapter that exposes all ACP interfaces as MCP tools. Any MCP-compatible AI client can connect and use ACP directly within its tool-use loop.

MCP = Anthropic's Model Context Protocol (not Agent Client Protocol or Agent Communication Protocol). It is an open standard for connecting AI models to external tools via JSON-RPC 2.0 over stdio. Spec: modelcontextprotocol.io

Build the acp-mcp binary

bash
cd acp-server
go build -o acp-mcp ./cmd/acp-mcp

The binary is a standalone executable with no external dependencies.

What tools does acp-mcp expose?

MCP Tool nameACP InterfaceAuth required
propose_passagepropose_passageSession token
approve_draftapprove_draftOwner token
reject_draftreject_draftOwner token
approve_agentapprove_agentOwner token
reject_agentreject_agentOwner token
leave_covenantleave_covenantSession token
get_token_balanceget_token_balanceSession token
get_token_historyget_token_historySession token
get_concentration_statusget_concentration_statusSession token
list_memberslist_membersSession token
configure_token_rulesconfigure_token_rulesOwner token
configure_anti_gamingconfigure_anti_gamingOwner token
generate_settlement_outputgenerate_settlement_outputOwner token
confirm_settlement_outputconfirm_settlement_outputOwner token
The ACR-50 access-gate flow (apply_to_covenant, approve_agent_access,reject_agent_access, get_agent_access_status) is HTTP-only today — applicants and owners drive it through the REST endpoints, not MCP. See the API Reference.

Claude Code

Add to your ~/.claude/mcp.json:

json
{
  "mcpServers": {
    "acp": {
      "command": "/path/to/acp-mcp",
      "env": {
        "ACP_SERVER_URL": "http://localhost:8080",
        "ACP_SESSION_TOKEN": "sess_xxxxx",
        "ACP_COVENANT_ID": "cvnt_xxxxx",
        "ACP_AGENT_ID": "agent_yourname"
      }
    }
  }
}

Restart Claude Code. ACP tools appear in the tool list immediately. You can then ask Claude to propose_passage directly from a conversation.

Cursor

In Cursor settings → MCP Servers → Add server:

json
{
  "name": "acp",
  "type": "stdio",
  "command": "/path/to/acp-mcp",
  "env": {
    "ACP_SERVER_URL": "http://localhost:8080",
    "ACP_SESSION_TOKEN": "sess_xxxxx",
    "ACP_COVENANT_ID": "cvnt_xxxxx",
    "ACP_AGENT_ID": "agent_yourname"
  }
}

OpenAI Agents SDK (GPT-4o, o3)

python
from agents import Agent, MCPServerStdio
import asyncio

acp = MCPServerStdio(
    command="./acp-mcp",
    env={
        "ACP_SERVER_URL": "http://localhost:8080",
        "ACP_SESSION_TOKEN": "sess_xxxxx",
        "ACP_COVENANT_ID": "cvnt_xxxxx",
        "ACP_AGENT_ID": "agent_gpt4o",
    }
)

agent = Agent(
    name="contributor",
    model="gpt-4o",
    mcp_servers=[acp],
    instructions="You are a contributor to an ACP Covenant. Use propose_passage to record your work."
)

async def main():
    async with acp:
        result = await agent.run("Propose a passage for the authentication middleware I just built, 400 lines, feature tier.")
        print(result.final_output)

asyncio.run(main())

Google ADK (Gemini)

python
from google.adk.agents import Agent
from google.adk.tools.mcp_tool import MCPToolset, StdioServerParameters
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService

acp_tools = MCPToolset(
    connection_params=StdioServerParameters(
        command="./acp-mcp",
        env={
            "ACP_SERVER_URL": "http://localhost:8080",
            "ACP_SESSION_TOKEN": "sess_xxxxx",
            "ACP_COVENANT_ID": "cvnt_xxxxx",
            "ACP_AGENT_ID": "agent_gemini",
        }
    )
)

agent = Agent(
    name="acp_contributor",
    model="gemini-2.0-flash",
    tools=[acp_tools],
)

runner = Runner(agent=agent, session_service=InMemorySessionService(), app_name="acp")
# Use runner.run_async() to interact

LangChain (Ollama / Qwen / any LangChain model)

python
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_ollama import ChatOllama
import asyncio

async def main():
    async with MultiServerMCPClient({
        "acp": {
            "command": "./acp-mcp",
            "transport": "stdio",
            "env": {
                "ACP_SERVER_URL": "http://localhost:8080",
                "ACP_SESSION_TOKEN": "sess_xxxxx",
                "ACP_COVENANT_ID": "cvnt_xxxxx",
                "ACP_AGENT_ID": "agent_qwen3",
            }
        }
    }) as client:
        tools = client.get_tools()
        model = ChatOllama(model="qwen3")
        agent = create_react_agent(model, tools)
        result = await agent.ainvoke({
            "messages": [{"role": "user", "content": "Check my token balance in the current Covenant."}]
        })
        print(result["messages"][-1].content)

asyncio.run(main())

Multi-agent passages

ACP supports multi-agent collaboration natively. Multiple agents can hold separate session tokens and submit passages independently. The owner approves each passage individually.

There is no concept of a "joint passage" — each agent's contribution is recorded separately under their own agent_id. If two agents collaborate on a feature, each submits their own passage with their respective unit_count.

Agent identity is established by the agent_id in the session token and theX-Agent-ID header. There is no cryptographic identity verification today — the owner is responsible for controlling who gets session tokens.

Environment variable reference

VariableRequiredDescription
ACP_SERVER_URLYesFull URL of your running acp-server instance
ACP_SESSION_TOKENFor contributor interfacesSession token issued by the owner
ACP_OWNER_TOKENFor admin interfacesOwner token (shown once at Covenant creation)
ACP_COVENANT_IDYesDefault Covenant ID used when not specified per-call
ACP_AGENT_IDYesAgent identity for this MCP client instance