Getting Started
Installation
Install the adapter and check the supported runtime versions.
Requirements
- Elysia
>=1.4.0 - Node.js
>=20.11or Bun>=1.1 - TypeScript
>=5.8for TypeScript projects - Native ESM
Install with Bun
bun add @mwillbanks/elysia-mcp-adapter elysiaOr use your Node.js package manager:
npm install @mwillbanks/elysia-mcp-adapter elysiaelysia is a peer dependency. @elysiajs/openapi and @sinclair/typebox are supported optional peers when your application already uses them.
Add the plugin
import { mcp } from '@mwillbanks/elysia-mcp-adapter'
import { Elysia } from 'elysia'
const app = new Elysia().use(mcp())This installs three fluent methods on the Elysia instance and registers the MCP HTTP endpoint:
.mcpTool().mcpResource().mcpPrompt()
The default endpoint is /mcp. Continue to the Quick Start to expose a route.