Transport-level routing for MCP/ACP protocols
We appreciate your patience. The service is temporarily operating in an external runtime environment.
Transport-level routing for MCP/ACP protocols
We appreciate your patience. The service is temporarily operating in an external runtime environment.
Full implementation of the Agent Client Protocol using the official @agentclientprotocol/sdk.
The ACP Worker provides complete support for the Agent Client Protocol (ACP), enabling seamless integration with ACP-compliant agents and MCP servers. It runs as a child process of stdio Bus kernel, handling protocol messages via NDJSON over stdin/stdout.
Location: workers-registry/acp-worker/
Create a configuration file for stdio Bus kernel:
{"pools": [{"id": "acp-registry","command": "npx","args": ["@stdiobus/workers-registry","acp-worker"],"instances": 1}]}
For production deployments with higher load:
{"pools": [{"id": "acp-registry","command": "npx","args": ["@stdiobus/workers-registry","acp-worker"],"instances": 4}],"limits": {"max_input_buffer": 4194304,"max_output_queue": 16777216,"backpressure_timeout_sec": 120}}
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the worker pool |
command | string | Path to Node.js executable |
args | string[] | Arguments including launcher path and worker name |
instances | number | Number of worker instances (≥1) |
The ACP Worker can connect to MCP servers to execute tools and access resources. This enables agents to leverage MCP server capabilities through the ACP protocol.
Configure MCP servers in your ACP Worker setup:
import { ACPAgent } from '@stdiobus/workers-registry/workers/acp-worker';// MCP servers are configured within the ACP Worker implementation// See workers-registry/acp-worker/src/mcp/ for integration details
The tool execution flow follows this pattern:
The ACP Worker maintains session affinity to ensure stateful interactions are routed to the same worker instance.
Messages with the same sessionId are automatically routed to the same worker instance:
{"jsonrpc": "2.0","id": "1","method": "prompt","sessionId": "sess-123","params": {"prompt": "Hello, agent!"}}
initialize request to establish connectionsessionIdsessionId route to the same worker{"jsonrpc": "2.0","id": "1","method": "initialize","params": {"clientInfo": {"name": "my-client","version": "1.0.0"}}}
{"jsonrpc": "2.0","id": "1","result": {"serverInfo": {"name": "acp-registry""version": "0.1.0"},"capabilities": {"prompts": true,"tools": true}}}
{"jsonrpc": "2.0","id": "2","method": "prompt","sessionId": "sess-123","params": {"prompt": "What is the weather today?","context": {}}}
To build the ACP Worker from source:
cd node_modules/@stdiobus/workers-registry/workers-registry/acp-workernpm installnpm run build
The compiled output will be in the dist/ directory.
Send a test message to verify the ACP Worker is running:
echo '{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"clientInfo":{"name":"test","version":"1.0"}}}' | nc localhost 9000
{"jsonrpc":"2.0","id":"1","result":{"serverInfo":{"name":"acp-registry""version":"0.1.0"},"capabilities":{"prompts":true,"tools":true}}}
// Import ACP worker (default export)import worker from '@stdiobus/workers-registry';// Import specific ACP workerimport acpWorker from '@stdiobus/workers-registry/workers/acp-worker';
import type { ACPAgent } from '@stdiobus/workers-registry/workers/acp-worker';// Use types for type-safe developmentconst agent: ACPAgent = /* ... */;
If the ACP Worker crashes frequently, increase restart limits:
{"limits": {"max_restarts": 10,"restart_window_sec": 120}}