A self-contained MCP client CLI for discovering and calling Model Context Protocol servers
npx @tomasko/mcpbox --versionnpm install -g @tomasko/mcpbox
# or
curl -LsSf https://raw.githubusercontent.com/tomasky/mcpbox/master/install.sh | bash
# or, with the MoonBit toolchain: builds from source into ~/.moon/bin
moon install kupas/mcpbox/cmd/mcpboxmcpbox listmcpbox list --allmcpbox call context7.resolve-library-id query="React hooks docs" libraryName=reactmcpbox list --http-url https://mcp.context7.com/mcp
mcpbox call adhoc.echo --stdio "python3 echo_server.py" name=hi count=5| Command | Purpose |
|---|---|
| mcpbox list [server ...] | List configured server names; --all starts them and shows tools |
| mcpbox call <server>.<tool> [key=value ...] | Call a tool |
| mcpbox config [filter ...] | Show config files and the resolved server set |
| mcpbox stop <server> | Close kept-alive sessions with this name |
| mcpbox stop all | Close all kept-alive sessions and exit the daemon |
| mcpbox version | Print the version |
| mcpbox help | Show help |
mcpbox list ct7 -b # start once; keep the MCP session alive
mcpbox call ct7.query-docs libraryId=/facebook/react query="hooks"
mcpbox list ct7 # reuse the running service automatically
mcpbox stop ct7 # stop every warm session named ct7
mcpbox stop all # stop every session and the service itself{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp"
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
"env": { "TOKEN": "${FS_TOKEN}" }
}
}
}moon build --target native --release
_build/native/release/build/cmd/mcpbox/mcpbox.exe --helpmoon check --target native --deny-warn
moon test --target native
moon info && moon fmtmoon build --target native
_build/native/debug/build/cmd/mcpbox/mcpbox.exe list \
--stdio "python3 tests/fixtures/echo_server.py"pub(all) suberror McpError {
McpError(String)
}pub(all) struct ServerInfo {
name : String
version : String
protocol_version : String
instructions : String
} derive(Debug)pub struct Session {
// private fields
}async fn Session::call_tool(self : Session, name : String, arguments : Json, timeout_ms : Int) -> CallResultfn expand_env(text : String) -> Stringfn first_line(text : String) -> Stringasync fn main_cli() -> Unitfn mcpbox_exit(code : Int) -> Unitlet protocol_version : Stringlet version : StringInstall
Download zipA self-contained MCP client CLI for discovering and calling Model Context Protocol servers