Pytest Mcp Server
About
A Model Context Protocol (MCP) server for debugging pytest failures using systematic debugging principles.
Details
- Author
- tosin2013
- Downloads
- 533
- Categories
- Other, Developer Tools
Jump to
- Register and list test failures
- Get detailed failure information
- Apply systematic debugging principles
- Analyze failure patterns
- Generate debugging prompts for LLMs
- Get pytest documentation guidance
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Pytest Mcp ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install globally via npm install -g pytest-mcp-server. Add to an MCP client (e.g., Claude Desktop) with command pytest-mcp-server start or run as HTTP server using pytest-mcp-server start-http. Data directory is configurable via the DATA_DIR environment variable (default ./data).
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"pytest mcp server": {
"pytest-mcp-server": {
"command": "pytest-mcp-server",
"args": [
"start"
],
"env": {
"DATA_DIR": "./pytest-data"
}
}
}
}
}
McpServers
{
"pytest-mcp-server": {
"command": "pytest-mcp-server",
"args": [
"start"
],
"env": {
"DATA_DIR": "./pytest-data"
}
}
}
Pytest MCP Server
A Model Context Protocol (MCP) server for debugging pytest failures using systematic debugging principles.
✅ Status: Production Ready
This MCP server is fully functional and ready for use. All 8 tools work correctly with proper error handling and response formatting that complies with the official MCP specification.
🧪 Testing Status
✅ Server Functionality: Perfect
- All tools work correctly with valid inputs - Proper error handling for invalid inputs - Compliant with MCP error reporting standards - Successfully tested with direct JSON-RPC calls - Compatible with MCP Inspector and real MCP clients⚠️ Framework Testing Limitation: Known Issue
- MCP Testing Framework shows 1 validation error due to a bug in mcp-framework 0.2.13 - Root Cause: mcp-framework returns validation errors with"type": "error" instead of MCP-compliant "type": "text"
- Impact: Testing framework validation fails, but server works perfectly in real usage
- Status: Documented issue, affects testing only, not production functionality
This is a known pattern documented in the official Standardized Error Reporting Formats for Model Context Protocol Servers document regarding SDK implementation challenges.
🛠 Tools Available
1. register_pytest_failure - Register a new test failure
2. list_failures - List all registered failures
3. get_failure_info - Get detailed information about a specific failure
4. debug_with_principle - Apply debugging principles systematically
5. analyze_failures - Analyze patterns in test failures
6. generate_debug_prompt - Generate LLM prompts for debugging
7. pytest_docs_guide - Get pytest documentation guidance
8. example_tool - Example tool for testing
🚀 Quick Start
Installation
npm install -g pytest-mcp-server
Usage with Claude Desktop
Add to your Claude Desktop MCP configuration:
{
"mcpServers": {
"pytest-mcp-server": {
"command": "pytest-mcp-server",
"args": ["start"],
"env": {
"DATA_DIR": "./pytest-data"
}
}
}
}
Usage as HTTP Server
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





