Documentation Index
Fetch the complete documentation index at: https://sunpeak.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Node.js 20+ is required, even if your MCP server is written in Python, Go, or another language. The testing framework runs on Node.js and Playwright.
- Your MCP server running locally (HTTP or stdio)
1. Try the inspector (optional)
Before writing tests, try the inspector to verify sunpeak can connect to your server:- HTTP server
- Python (stdio)
- Go (stdio)
- Node.js (stdio)
http://localhost:3000, where you can call your tools and see them rendered in simulated ChatGPT and Claude runtimes. Browse your tools, switch hosts and themes, and verify everything connects.
2. Scaffold test infrastructure
Once the inspector works, scaffold automated tests:tests/sunpeak/ directory with its own package.json.
Install dependencies:
- Non-JS project
- JS/TS project
3. Run the smoke test
sunpeak test auto-discovers tests/sunpeak/playwright.config.ts when no root-level config exists. You can run it from your project root without cd-ing into the test directory.
The scaffolded smoke test verifies that the inspector can connect to your server and load. You should see one passing test.
4. Write your first real test
Open the scaffolded smoke test (smoke.test.ts) and add a test for one of your tools. Replace your-tool with an actual tool name from your server:
mcp and inspector fixtures handle all the plumbing: starting the inspector, connecting to your server, navigating to the tool, and traversing the double-iframe sandbox. Each test runs automatically against both ChatGPT and Claude hosts.
There are two fixtures: mcp for protocol-level testing (callTool, listTools, etc., returning raw MCP data) and inspector for UI testing (renderTool, which renders the result in the inspector). When you pass input to renderTool, the tool is called on your real server and the result is rendered. Without input, the tool uses pre-baked simulation fixture data (if available) for fast, deterministic tests. See Simulations for more on when to use each approach.
5. Add more test levels
The scaffolded files include templates for all four testing levels:| Level | File | Command | Cost |
|---|---|---|---|
| E2E | smoke.test.ts | sunpeak test | Free |
| Visual | visual.test.ts | sunpeak test --visual | Free |
| Live | live/example.test.ts | sunpeak test --live | Host credits |
| Evals | evals/example.eval.ts | sunpeak test --eval | API keys |
Language-specific tips
Python
Python
For stdio servers, pass the full command including any virtual environment activation:HTTP servers (FastAPI, Flask) are the simplest option because you start them separately and sunpeak just connects to the URL.
Go
Go
Rust
Rust
Next steps
E2E Testing
Write Playwright tests against simulated hosts.
Visual Regression
Screenshot comparison across themes and hosts.
Live Testing
Test against real ChatGPT and Claude.
Evals
Multi-model tool calling reliability.