Skip to main content
MCP App Inspector

Overview

The sunpeak inspector replicates MCP App host runtimes (ChatGPT, Claude) for local development and testing. It works with any MCP server — no sunpeak project required.
Inspect any MCP server:
sunpeak inspect --server http://localhost:8000/mcp
sunpeak inspect --server "python my_server.py"
See sunpeak inspect CLI Reference for all options.

Why Use the Inspector?

  • Instant feedback — HMR means changes appear immediately. No cache issues, no reloading the host.
  • Every host, theme, and device — toggle ChatGPT/Claude, light/dark, mobile/tablet/desktop, inline/PiP/fullscreen from the sidebar or URL params.
  • Automated testing — the inspector is the test runtime for E2E tests. Load simulations via URL, assert with Playwright.
  • No deployment needed — develop and test locally without tunnels or host accounts.

Simulations

Simulations are JSON fixtures that define reproducible tool states for the inspector — tool input, tool result, and server tool mocks.
// tests/simulations/show-example.json
{
  "tool": "show-example",
  "userMessage": "Show me an example",
  "toolInput": { "query": "example" },
  "toolResult": {
    "structuredContent": { "items": [] }
  }
}
The inspector loads simulations from tests/simulations/ automatically. Select a simulation from the sidebar dropdown to render your resource with that mock data. Select “None (call server)” to call the real tool handler instead. See Simulations API Reference for the complete JSON schema and conventions. The inspector sidebar lets you configure: All sidebar settings are reflected in the URL, making them shareable and usable in automated tests via createInspectorUrl.

Using the Inspector in Tests

The inspector doubles as the test runtime for automated E2E tests. See MCP App Testing Framework for the full testing story.
import { createInspectorUrl } from 'sunpeak/inspector';

test('renders in dark mode on Claude', async ({ page }) => {
  await page.goto(createInspectorUrl({
    simulation: 'show-albums',
    theme: 'dark',
    host: 'claude',
  }));
  // assert against the rendered resource
});

Dive Deeper

sunpeak inspect

Inspect any MCP server (standalone, no project needed).

Simulations API Reference

JSON schema, conventions, and auto-discovery.

Inspector API Reference

Full component documentation and configuration options.