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.
Build the acp-mcp binary
cd acp-server
go build -o acp-mcp ./cmd/acp-mcpThe binary is a standalone executable with no external dependencies.
What tools does acp-mcp expose?
| MCP Tool name | ACP Interface | Auth required |
|---|---|---|
| propose_passage | propose_passage | Session token |
| approve_draft | approve_draft | Owner token |
| reject_draft | reject_draft | Owner token |
| approve_agent | approve_agent | Owner token |
| reject_agent | reject_agent | Owner token |
| leave_covenant | leave_covenant | Session token |
| get_token_balance | get_token_balance | Session token |
| get_token_history | get_token_history | Session token |
| get_concentration_status | get_concentration_status | Session token |
| list_members | list_members | Session token |
| configure_token_rules | configure_token_rules | Owner token |
| configure_anti_gaming | configure_anti_gaming | Owner token |
| generate_settlement_output | generate_settlement_output | Owner token |
| confirm_settlement_output | confirm_settlement_output | Owner token |
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:
{
"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:
{
"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)
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)
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 interactLangChain (Ollama / Qwen / any LangChain model)
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_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
| Variable | Required | Description |
|---|---|---|
| ACP_SERVER_URL | Yes | Full URL of your running acp-server instance |
| ACP_SESSION_TOKEN | For contributor interfaces | Session token issued by the owner |
| ACP_OWNER_TOKEN | For admin interfaces | Owner token (shown once at Covenant creation) |
| ACP_COVENANT_ID | Yes | Default Covenant ID used when not specified per-call |
| ACP_AGENT_ID | Yes | Agent identity for this MCP client instance |