MCP server for AI agents
Methods become typed MCP tools for Claude, ChatGPT, Cursor, and other MCP-compatible clients.
Define a capability once. Photon exposes it to AI agents, command lines, embedded app UIs, and Beam.

bun add -g @portel/photon
photon new my-tool
photon mcp install my-toolPrefer a one-off run?
bunx @portel/photon new my-toolexport default class Hello {
greet(params: { name: string }) {
return `Hello, ${params.name}!`;
}
}That one file can run as a CLI command, a Beam web dashboard, and an MCP server.
| Start here | |
|---|---|
| Getting Started | Install, build, and run your first photon. |
| Core Concepts | Learn the mental model behind methods, comments, formats, state, settings, and surfaces. |
| From Method to Chat App | Follow the weather showcase across CLI, Beam, MCP, and embedded chat UI. |
| Output Formats | Browse visual formats for tables, charts, cards, dashboards, markdown, and more. |
| Docblock Tags | Reference every public docblock tag Photon understands. |
| Complete Developer Guide | Deep reference for authoring, deploying, and operating photons. |