createMcpServer(deps)
McpServerDeps
| Field | Type | Required | Description |
|---|---|---|---|
runtime | Runtime | Yes | Execution runtime (local or Vercel) |
allTools | ToolDefinition[] | Yes | Full tool catalog |
searchTools | (query, limit) => ToolDefinition[] | Yes | Search function |
elicitation | ElicitationEngine | No | Local elicitation engine |
resumeRemote | (executionId, approved, data?) => Promise<unknown> | No | Remote resume callback |
Created tools
The returnedMcpServer exposes four tools:
| Tool | Description | See |
|---|---|---|
run | Execute TypeScript in sandbox | run |
search_tools | Fuzzy search tool catalog | search_tools |
read_tool | Get tool definition by path | read_tool |
resume | Resolve pending elicitation | resume |
Usage with stdio transport
McpServer class from @modelcontextprotocol/sdk.