Skip to content

Conversation

@guyernest
Copy link
Collaborator

Summary

This PR aligns the mcp-tester tool with WASM MCP server implementations, ensuring both Cloudflare Workers and Fermyon Spin deployments work correctly with comprehensive testing support.

Changes

🔧 MCP Tester Improvements

  • Fixed JSON-RPC notification handling by detecting absence of 'id' field in requests
  • Added verbose flag support (--verbose) for detailed test output
  • Fixed scenario executor assertions to properly handle null error fields
  • Modified scenario executor to return actual tool response content instead of debug strings

🏗️ WASM Server Architecture

  • Separated platform-specific implementations:
    • Cloudflare Workers wrapper using worker crate
    • Fermyon Spin wrapper using spin-sdk
    • Both share the same WasmMcpServer core logic
  • Fixed HTTP transport to handle empty 200 responses without Content-Type headers

🧪 Testing Infrastructure

  • Created comprehensive scenario test files:
    • calculator-simple.json - Basic arithmetic operations
    • calculator-test.yaml - Full test suite with error cases
    • minimal-test.json - Quick connectivity check
  • All scenarios now pass on both deployment platforms

📚 Documentation Updates

  • Updated all README files with scenario testing instructions
  • Used placeholder URLs (<your-worker-name>, <your-app-name>) for user deployments
  • Added clear instructions for users to deploy their own instances

Test Results

Both deployment platforms now pass all tests:

╔════════════════════════════════════════════════════════════╗
║              MCP SERVER TESTING TOOL v0.1.0               ║
╚════════════════════════════════════════════════════════════╝

SUMMARY
════════════════════════════════════════════════════════════
| Total Tests | 14    |
| Passed      | 14    |

Overall Status: PASSED

Testing

Test with mcp-tester after deploying your own instance:

# Cloudflare deployment
./target/release/mcp-tester scenario \
  https://<your-worker-name>.workers.dev \
  examples/wasm-mcp-server/test-scenarios/calculator-test.yaml

# Fermyon deployment  
./target/release/mcp-tester scenario \
  https://<your-app-name>.fermyon.app/ \
  examples/wasm-mcp-server/test-scenarios/calculator-test.yaml

Deploy Your Own

Cloudflare Workers

cd examples/wasm-mcp-server/deployments/cloudflare
make deploy
# Your instance: https://<your-worker-name>.workers.dev

Fermyon Spin

cd examples/wasm-mcp-server/deployments/fermyon-spin
spin deploy
# Your instance: https://<your-app-name>.fermyon.app/

🤖 Generated with Claude Code

- Fixed JSON-RPC notification handling in WASM servers (detect absence of 'id' field)
- Added verbose flag support in mcp-tester for detailed output
- Separated platform-specific WASM implementations (Cloudflare vs Fermyon)
- Fixed HTTP transport to handle empty 200 responses without Content-Type
- Created comprehensive scenario test files for calculator tool
- Fixed scenario executor assertions to handle null error fields correctly
- Modified scenario executor to return actual tool response content
- Updated all README files with scenario testing instructions using placeholders

This ensures full alignment between mcp-tester and WASM MCP server deployments,
with both Cloudflare Workers and Fermyon Spin now passing all test scenarios.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@guyernest guyernest merged commit ecec2d0 into paiml:main Sep 25, 2025
12 checks passed
@guyernest guyernest deleted the feature/server-refactoring-wasi-target branch September 25, 2025 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant