
MCP测试客户端
STDIO用于开发测试的MCP中间件
用于开发测试的MCP中间件
An MCP middleware that acts as both a server (to Claude) and a client (to servers under test) for testing MCP servers during development.
The MCP Test Client has a dual role:
┌─────────────┐ ┌───────────────────┐ ┌────────────────┐
│ │ Tools │ │ Client │ │
│ Claude │─────────>│ MCP Test Client │─────────>│ Server Under │
│ │ │ │ │ Test │
└─────────────┘ └───────────────────┘ └────────────────┘
This architecture lets you test MCP servers without registering them directly with Claude.
The MCP Test Client is implemented with:
The current implementation is Phase 1 of the design plan, with future enhancements planned for Phases 2 and 3.
# Install dependencies npm install # Build the TypeScript project npm run build
The MCP Test Client is registered with Claude via the claude-mcp-local
script. You can use the following tools:
mcp__mcp-test__mcp_test_deploy_server({ name: "my-server", source_path: "/path/to/server", env_vars: { "API_KEY": "${API_KEY}" } })
mcp__mcp-test__mcp_test_call_tool({ server_name: "my-server", tool_name: "tool_name", arguments: { // Tool-specific arguments } })
mcp__mcp-test__mcp_test_run_tests({ server_name: "my-server" })
mcp__mcp-test__mcp_test_get_logs({ server_name: "my-server", lines: 100 })
mcp__mcp-test__mcp_test_list_servers({})
mcp__mcp-test__mcp_test_stop_server({ server_name: "my-server" })
Run the CLI interface for testing:
# Use npm script npm run test # Or run directly node dist/test-runner.js
This provides an interactive menu for deploying, testing, and managing MCP servers.
The MCP Test Client supports this workflow:
Planned enhancements include:
See notes/mcp_test_client_design.md
for the complete design document.