atxtechbro / atxtechbro/dotfiles

feat[mcp]: add testing infrastructure for MCP servers

Open
#736 0 comments 0 reactions 0 assignees View on GitHub
enhancement mcp
Dominant language
Shell
Stars
27
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## Context
While fixing issue #734, I attempted to create a test script for the git_batch function but encountered Python import issues with the MCP server structure. This revealed a gap in our testing capabilities for MCP servers.

## Problem
- Python import paths are complex due to the nested src/mcp_server_* structure
- No standardized way to test MCP server functions in isolation
- Difficult to verify fixes without a proper test harness
- Can't easily run regression tests when modifying MCP servers

## Proposed Solution
Create a testing infrastructure that:
1. Provides a standard test runner for MCP servers
2. Handles Python path setup automatically
3. Includes example tests for each MCP server
4. Supports both unit tests (individual functions) and integration tests (full server behavior)

## Implementation Ideas
```
mcp/
├── servers/
│ ├── git-mcp-server/
│ │ ├── src/
│ │ └── tests/
│ │ ├── __init__.py
│ │ ├── test_git_operations.py
│ │ └── test_git_batch.py
│ └── ...
└── test-runner.py # Central test runner that handles paths
```

## Benefits
- Easier to verify bug fixes (like #734)
- Catch regressions before they reach production
- Lower barrier to contribution - tests document expected behavior
- Better code quality through test-driven development

## Related
- Discovered during PR #735
- Would have made issue #734 easier to fix and verify

Keywords: mcp, testing, infrastructure, python imports, test runner

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing issue #734 and PR #735, then inspect the nested src/mcp_server_* layout described in this issue. Determine how the proposed mcp/test-runner.py and per-server tests should cover unit and integration behavior, including git_batch. Done means the runner handles imports and example tests can run consistently for each MCP server.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.