
steviec/mcp-server-tester
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCP サーバーがディレクトリとエージェントによって呼び出されたときに正しく動作していることを確認するための CLI ベースのテスター
概要
MCP Server テスターは、MCP サーバーの自動テストのためのツールです。 一貫して機能する信頼性の高いMCPサーバーを構築し、仕様に準拠しているよりも困難です。 - インスペクターツールは、初期サーバーの構築とテストに役立ちますが、レグレッションからあなたを保護しません - ツールは、直接テストで完璧に機能しますが、LMはそれらを誤って使用し、現実世界で非一貫性に使用 - ほとんどのMCP SDKは完全にスペックに準拠していません、そしてそれは欠落しているものを知ることは困難です - スペックは急速に進化し、最高のプラクティスで現在の滞在を困難にしています mcp-server-tester は、これらのコアの問題を解決するのに役立つ 3 つのフォーカスされたコマンドを提供する実装agnostic CLI テストツールです。 - - ツールが直接MCP呼び出しで正しく動作していることを確認するテストを実行 - LLMが確実に理解し、正しくツールを使用することができるテストを実行 - - プロトコルが進化する自動化されたサーバースペック検証(進行中の作業) ツールを直接 API 呼び出しで正しくテストします。 テスト...
概要(AI 翻訳)
MCP Server テスターは、MCP サーバーの自動テストのためのツールです。
#このツールはなぜですか?
一貫して機能する信頼性の高いMCPサーバーを構築し、仕様に準拠しているよりも困難です。
- インスペクターツールは、初期サーバーの構築とテストに役立ちますが、退会からあなたを保護しません
- ツールは、直接テストで完璧に機能しますが、LMSはそれらを誤って使用し、現実世界で意図的に使用しています
- ほとんどのMCP SDKは完全に仕様に準拠していないため、欠落しているものを知るのは難しい
- スペックは急速に進化し、最高の慣行で現在の滞在を困難にする
[[mcp-server-tester]は、これらのコアの問題を解決するのに役立つ3つのフォーカスされたコマンドを提供する実装アグノスティックCLIテストツールです。
-[tools - ツールが直接MCP呼び出しで正しく動作していることを確認するテストを実行
-[evals - LLMを検証するテストを実行して、ツールを正しく理解して使用できるようにします
-[compliance - プロトコルが進化する自動サーバーのスペック検証 (進行中の作業)
お問い合わせ
コマンド
[tools - 直接MCPツールのテスト
ツールを直接 API 呼び出しで正しくテストします。
サンプル出力:
[evals - LLM統合テスト
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Server Tester
The MCP Server Tester is a tool for automated testing of MCP servers.
Why this tool?
Building reliable MCP servers that work consistently and are spec-compliant is harder than it should be:
- the Inspector tool helps to build and test the intial server, but won’t protect you from regressions
- tools works perfectly in direct testing, but LLMs use them incorrectly and inconsistently in the real world
- most MCP SDKs aren’t fully spec-compliant, and it’s hard to know what’s missing
- the spec evolves rapidly, making it hard to stay current with best practices
The mcp-server-tester is a implementation-agnostic CLI testing tool that provides three focused commands that help solve these core issues:
tools- Run tests that verify your tools work correctly with direct MCP callsevals- Run tests that verify LLMs can consistently understand and use your tools correctlycompliance- Automated server spec validation as the protocol evolves (Work in Progress)
Commands
tools - Direct MCP Tool Testing
Test your tools work correctly with direct API calls:
npx mcp-server-tester tools tool-tests.yaml --server-config filesystem-server-config.json
Sample output:
✅ Tool Discovery: Found 3 tools (read_file, write_file, delete_file)
✅ Write file successfully
✅ Read file returns content
✅ Write and read workflow
❌ Handle invalid path - Expected error containing 'permission' but got 'access denied'
✅ Delete file cleanup
Results: 5/6 tests passed
evals - LLM Integration Testing
Test that LLMs can discover and use your tools effectively:
npx mcp-server-tester evals eval-tests.yaml --server-config filesystem-server-config.json
Sample output:
🤖 Testing with claude-3-5-haiku-latest
✅ LLM can create and read files
✅ File manipulation workflow
✅ Error handling test
❌ Documentation query task: FAILED
Prompt: "How do I search for configuration files in the project?"
• Required tool 'search_docs' was not called (actual calls: list_files)
❌ Lists all available tools: FAILED
Prompt: "Please list all available file management tools you have access to."
• LLM judge failed: Score: 0.3/1.0 (threshold: 0.8). Assistant did not provide complete tool list.
Results: 3/5 tests passed
Note: Requires ANTHROPIC_API_KEY environment variable.
compliance - MCP Specification Compliance Testing (WIP)
Test that your server is spec compliant:
npx mcp-server-tester compliance --server-config filesystem-server-config.json
See the Compliance Command (WIP) section below for details and example output.
Quick Start
-
Create server config (
filesystem-server-config.json):{ "mcpServers": { "filesystem": { "command": "node", "args": ["./filesystem-server.js"] } } } -
Create tool and eval test files manually:
インストール
npx mcp-server-tester tools tool-tests.yaml --server-config filesystem-server-config.json設定
{
"mcpServers": {
"filesystem": {
"command": "node",
"args": ["./filesystem-server.js"]
}
}
}