| Crates.io | rhaicp |
| lib.rs | rhaicp |
| version | 1.0.0 |
| created_at | 2026-01-06 11:10:10.626586+00 |
| updated_at | 2026-01-06 11:10:10.626586+00 |
| description | An ACP agent that executes Rhai scripts with MCP tool access |
| homepage | |
| repository | https://github.com/nikomatsakis/rhaicp |
| max_upload_size | |
| id | 2025661 |
| size | 118,339 |
An ACP agent that executes Rhai scripts with MCP tool access.
Rhaicp provides a scriptable agent that:
<userRequest>...</userRequest> blocks)say(text) to stream responses back to the clientmcp::list_tools(server) and mcp::call_tool(server, tool, args) for MCP server access# Run as an ACP agent over stdio
cargo run -- acp
say(text)Streams text back to the client:
say("Hello, ");
say("World!");
mcp::list_tools(server)Lists available tools from an MCP server:
let tools = mcp::list_tools("my-server");
for tool in tools {
say(tool + "\n");
}
mcp::call_tool(server, tool, args)Calls a tool on an MCP server:
let result = mcp::call_tool("my-server", "echo", #{ message: "hello" });
say(result.content);
If your prompt contains <userRequest>...</userRequest> tags, only the content inside those tags is executed as Rhai. Otherwise, the entire prompt is treated as a Rhai script.
cargo test