RH

r-huijts/mcp-server-tester

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

10 stars 4 forks 品質 64 トレンド 8MIT

Automated testing tool for Model Context Protocol (MCP) servers - WORK IN PROGRESS

概要

: This project is under active development and has not been thoroughly tested yet. Features may be incomplete, contain bugs, or change significantly. Use at your own risk in non-production environments only. A powerful, configuration-driven testing tool for Model Context Protocol (MCP) servers. This project provides a comprehensive solution for validating, benchmarking, and ensuring reliability of MCP servers that integrate with AI models like Claude. This tool is moving toward an alpha release and currently offers: - ✅ Basic configuration framework - ✅ MCP server connection and CLI support - ✅ Test generation using Claude AI - ✅ Natural language query generation for tests - ✅ Comprehensive response validation with multiple rules - ✅ Report generation in console, JSON, HTML, and Markdown formats - 🚧 Broader automated test coverage of the tester - 🚧 Production hardening and packaging improvements If you're interested in contributing, please feel free to open issues and submit pull...

README

以下は原文 README の抜粋です。原文を見る。

MCP Server Tester

⚠️ WORK IN PROGRESS: This project is under active development and has not been thoroughly tested yet. Features may be incomplete, contain bugs, or change significantly. Use at your own risk in non-production environments only.

A powerful, configuration-driven testing tool for Model Context Protocol (MCP) servers. This project provides a comprehensive solution for validating, benchmarking, and ensuring reliability of MCP servers that integrate with AI models like Claude.

Current Status

This tool is moving toward an alpha release and currently offers:

  • ✅ Basic configuration framework
  • ✅ MCP server connection and CLI support
  • ✅ Test generation using Claude AI
  • ✅ Natural language query generation for tests
  • ✅ Comprehensive response validation with multiple rules
  • ✅ Report generation in console, JSON, HTML, and Markdown formats
  • 🚧 Broader automated test coverage of the tester
  • 🚧 Production hardening and packaging improvements

If you’re interested in contributing, please feel free to open issues and submit pull requests.

Introduction

The Model Context Protocol (MCP) enables AI models to access external tools and data sources through standardized interfaces. As MCP servers grow in complexity and importance, ensuring their correct functionality becomes critical. The MCP Server Tester addresses this need by:

  • Automating tests for all tools exposed by an MCP server
  • Leveraging Claude AI to generate intelligent, contextually-relevant test cases
  • Validating responses against expected outcomes and schemas
  • Providing detailed reports to identify issues and performance bottlenecks

This tool is designed for MCP server developers, AI integration teams, and quality assurance professionals who need to ensure their MCP implementations are robust, reliable, and correctly follow the protocol specifications.

Concept

The Model Context Protocol is a standard that allows AI models to call external tools. An MCP server exposes one or more tools through a simple HTTP interface. Each tool describes its name, parameters, and response schema so that a model can invoke it safely.

mcp-server-tester automates the process of checking that an MCP server and its tools work correctly:

  1. Discovery – it queries the server for all available tools.
  2. Test generation – it uses Claude AI to create realistic test cases for each tool.
  3. Execution – it runs those tests against the server.
  4. Validation – it verifies the responses using configurable rules.
  5. Reporting – it summarizes the results in the console or in JSON, HTML, or Markdown formats.

The goal is to quickly spot mismatches between expected and actual behaviour so that you can fix issues before exposing the tools to production models.

Purpose

  • Reliability – catch bugs or inconsistent behaviour in your MCP server.
  • Regression testing – run the same set of tests whenever the server changes.
GitHub で README 全文を見る

インストール

npx -y @modelcontextprotocol/server-filesystem ./
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "numTestsPerTool": 3, "timeoutMs": 10000, "outputFormat": "console", "outputPath": "./reports/results.json", "verbose": false, "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "./"], "env": { "DEBUG": "true" } }, "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "your-github-token-here" } }, "dev-server": { "command": "node", "args": ["/absolute/path/to/your/dev-server.js"], "env": { "DEBUG": "true", "NODE_ENV": "development" } } } }