Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies = [
"openai>=1.93.3",
"tiktoken>=0.11.0",
"jsonschema>=4.0.0",
"referencing>=0.36.2",
]

[dependency-groups]
Expand All @@ -22,6 +23,7 @@ dev = [

[project.scripts]
mcp-interviewer = "mcp_interviewer.cli:cli"
mcp-interviewer-agent = "mcp_interviewer.agent_cli:cli"

[build-system]
requires = ["hatchling"]
Expand Down Expand Up @@ -52,6 +54,12 @@ target-version = "py311"
[tool.ruff.lint]
select = ["F", "I", "UP"]

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]

[tool.poe.tasks]
format = "ruff format src"
formatcheck = "ruff format --check src"
Expand Down
34 changes: 34 additions & 0 deletions src/mcp_interviewer/agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# MCP Interviewer Agent

An agent that automatically improves your MCP server tools.

Given an MCP Server, the MCP Interviewer Agent will produce a FastMCP proxy server (written in Python) that exposes your original server's tools through a more agent-ergonomic interface with improved names, descriptions, and schemas.

## Usage

```bash
# Creates an improved server.py in ./agent_workspace/
mcp-interviewer-agent <your mcp-server command>

# With custom output path (parent directory becomes the working directory)
mcp-interviewer-agent "npx @org/mcp-server-foo" \
--output ./my_project/improved_server.py \
--max-turns 50

# Run your improved server:
python ./agent_workspace/server.py
```

## How it works

1. **Initial Analysis**: Runs mcp-interviewer with --test and --judge flags on your original server
2. **Continuous Improvement**: The agent autonomously:
- Reads the analysis reports (mcp-interview.md and .json)
- Identifies constraint violations and quality issues
- Writes a FastMCP proxy server.py that wraps your original tools
- Tests the proxy with mcp-interviewer
- Refines the SAME server.py file based on test results
- Repeats until all issues are resolved
3. **Completion**: Agent calls the 'stop' tool when satisfied, or stops at max turns

The agent works continuously in a single directory, iteratively improving one server.py file until it passes all constraints and quality checks.
6 changes: 6 additions & 0 deletions src/mcp_interviewer/agent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""MCP Interviewer Agent - Automatically improves MCP servers."""

from .agent import AgentRunner
from .config import AgentConfig

__all__ = ["AgentRunner", "AgentConfig"]
Loading