Custom Agent Integration
Connect any MCP-capable agent framework to the Route6 MCP server running inside the Docker container.
The MCP server listens on localhost:3000 inside the container (accessible
from the host at localhost:3000 when you run with -p 3000:3000).
# pip install mcp anthropic
import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def main():
params = StdioServerParameters(
command="docker",
args=["exec", "-i", "route6-agent", "node", "/app/mcp-server.js"],
)
async with stdio_client(params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
print(f"Available tools: {[t.name for t in tools.tools]}")
result = await session.call_tool("identity_get", arguments={})
print(result.content[0].text)
asyncio.run(main())