
# API Reference

> The complete `h3-mcp` surface: exports, options, request context, and wire methods.

The runtime surface is deliberately small — one handler factory, four identity helpers, and one error class. Everything else is types you never have to import.

```ts
import { defineMcpHandler, defineTool } from "h3-mcp";
```

::card-group

::card
---

title: Exports
icon: ph:export-duotone
to: /api/exports
---

`defineMcpHandler`, the `define*` helpers, `McpJsonRpcError`, and the type index.
::

::card
---

title: Handler Options
icon: ph:sliders-duotone
to: /api/options
---

Every field of `HandlerOptions`, including dynamic resolution.
::

::card
---

title: Request Context
icon: ph:info-duotone
to: /api/request-context
---

`event.context.mcp` — everything about the request in flight.
::

::card
---

title: JSON-RPC Methods
icon: ph:list-numbers-duotone
to: /api/methods
---

What the handler answers, and on which era.
::

::

::read-more{to="/guide"}
New here? Start with the [guide](/guide) — this section assumes you already have a handler mounted.
::
