Skip to main content
MCP App in ChatGPT

Overview

The MCP (Model Context Protocol) server lets you serve your simulations to AI hosts like ChatGPT. Once running, the host can discover and render your MCP Apps. sunpeak includes an MCP server implementation that serves your apps out-of-the-box.

What is MCP?

MCP is the protocol AI hosts use to communicate with your servers. It handles:
  • Resource & Tool registration and discovery
  • Tool invocation and state synchronization

Quick Start

Start the development server:
sunpeak dev
This starts both the simulator and an MCP server with Hot Module Reload. The MCP server runs on port 8000 and serves your resources with automatic rebuilding.
Then connect to a host using a tunnel. See runMCPServer API Reference for the full connection flow.

Dive Deeper

runMCPServer API Reference

Complete configuration options and host connection guide.

Simulation API Reference

Complete simulation documentation.