A Model Context Protocol (MCP) server wrapper that allows you to override tool descriptions for testing AI agent adoption and behavior.
This tool enables A/B testing of tool descriptions to measure their impact on AI agent adoption rates. By changing only the descriptions while keeping functionality identical, you can determine which descriptions lead to better tool usage by AI agents.
# Wrap an existing MCP server with custom descriptions
./mcp-wrapper --descriptions my-descriptions.json /path/to/upstream-mcp-server
# Or use environment variable for upstream command
export MCP_UPSTREAM_COMMAND="/path/to/upstream-mcp-server --some-flag"
./mcp-wrapper --descriptions my-descriptions.json
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"wrapped-server": {
"command": "/path/to/mcp-wrapper",
"args": ["--descriptions", "/path/to/descriptions.json", "/path/to/upstream-server"]
}
}
}
Create a JSON file with tool names as keys and new descriptions as values:
{
"tool_name": "New description for this tool",
"another_tool": "Different description to test AI agent adoption",
"file_read": "📖 Intelligent file content retrieval with contextual analysis capabilities"
}
Original: "file_read": "Read file contents"
Descriptive: "file_read": "📖 Intelligent file content retrieval with contextual analysis capabilities"
Action-oriented: "file_read": "🔍 Extract and analyze file contents for processing"
Problem-focused: "file_read": "📋 Solve file access needs with comprehensive content reading"
See sample-descriptions.json
for examples of enhanced descriptions that use:
- Emojis for visual appeal
- Power words ("Advanced", "Intelligent", "Comprehensive")
- Benefit statements ("perfect for testing", "optimized for AI")
- Technical specificity ("semantic filtering", "algorithmic support")
go mod init mcp-description-wrapper
go get github.com/mark3labs/mcp-go
go build -o mcp-wrapper
MCP_DEBUG=1
: Enable debug loggingMCP_UPSTREAM_COMMAND
: Default upstream command if not provided as argument
- Baseline: Run your MCP server normally and measure tool usage
- Treatment: Use the wrapper with enhanced descriptions
- Metrics: Compare adoption rates, usage frequency, and task completion
- Variables: Test different description styles (technical vs. friendly, short vs. detailed, etc.)
The wrapper:
- Starts the upstream MCP server as a subprocess
- Intercepts tool discovery requests
- Replaces descriptions from the JSON file
- Proxies all tool calls to the upstream server unchanged
- Returns results transparently
This ensures functionality remains identical while only descriptions change.