klieo-tools-mcp
MCP (Model Context Protocol) adapter for klieo-core's Tool trait.
Part of the klieo Rust agent framework.
Features
- Wraps any MCP server's tools as
Arc<dyn Tool>ready to register in klieo - stdio transport (subprocess) supported; HTTP/SSE transports planned
- Schema and argument pass-through — the MCP server's JSON schema is used as-is
- Tool names are namespaced as
mcp:<server_id>.<original_name> - Secure-by-default subprocess spawning: child receives an empty environment
unless you explicitly allowlist variables via
StdioConnectOptions
Usage
[]
= "3"
Connect to an MCP server via stdio
use ;
use ChainedInvoker;
async
Forwarding environment variables to the subprocess
use StdioConnectOptions;
// Forward only the variables the MCP server needs.
let opts = StdioConnectOptions ;
Security note: the default empty allowlist prevents leaking API keys or cloud credentials to untrusted MCP server subprocesses. Call
StdioConnectOptions::inherit_parent_env()only for servers you fully control.
Status
3.x — stable.
See docs/SEMVER.md.
License
MIT — see LICENSE.