M
MCP Caller
作者 @AB498
MCP client CLI that starts an MCP server, performs the protocol handshake, and calls a tool by JSON input.
创建于 4/11/2026
更新于 about 8 hours ago
README
Repository documentation and setup instructions
mcp-caller
mcp-caller is a small MCP client CLI that starts an MCP server, performs the protocol handshake, and calls a tool by JSON input.
Install
npm install -g mcp-caller
Usage
Call a stdio MCP server:
npx -y mcp-caller \
--server-json '{"type":"stdio","command":"uvx","args":["--from","git+https://github.com/macsymwang/hello-mcp-server.git","hello-mcp-server"]}' \
--call-json '{"tool":"say_hello","params":{"name":"world"}}'
PowerShell:
npx -y mcp-caller `
--server-json '{"type":"stdio","command":"uvx","args":["--from","git+https://github.com/macsymwang/hello-mcp-server.git","hello-mcp-server"]}' `
--call-json '{"tool":"say_hello","params":{"name":"world"}}'
Call a remote streamable HTTP MCP server:
npx -y mcp-caller \
--server-json '{"type":"streamable-http","url":"https://gitmcp.io/idosal/git-mcp"}' \
--call-json '{"tool":"fetch_git_mcp_documentation","params":{}}'
PowerShell:
npx -y mcp-caller `
--server-json '{"type":"streamable-http","url":"https://gitmcp.io/idosal/git-mcp"}' `
--call-json '{"tool":"fetch_git_mcp_documentation","params":{}}'
Read JSON from files instead of inline values:
npx -y mcp-caller --server-file server.json --call-file call.json
Short call form:
npx -y mcp-caller --server-file server.json --tool say_hello --params-json '{"name":"world"}'
List callable tools:
npx -y mcp-caller --server-file server.json --list-tools
Inspect tools, prompts, and resources:
npx -y mcp-caller --server-file server.json --inspect --pretty
JSON Shapes
Server JSON:
{
"mcpServers": {
"name": {
"type": "stdio",
"command": "node",
"args": ["server.js"]
}
}
}
Or a single server object:
{
"type": "streamable-http",
"url": "https://example.com/mcp",
"headers": {}
}
Call JSON:
{
"tool": "tool-name",
"params": {}
}
Notes
- The CLI prints text content when the tool result contains text.
- Use
--prettyto format non-text JSON output. - The example probes are covered by test/cli.examples.test.js.
快速设置
此服务器的安装指南
安装包 (如果需要)
npx @modelcontextprotocol/server-mcp-caller
Cursor 配置 (mcp.json)
{
"mcpServers": {
"ab498-mcp-caller": {
"command": "npx",
"args": [
"ab498-mcp-caller"
]
}
}
}
作者服务器
其他服务器由 AB498