@samveys/mcp

An MCP server exposing app info, routes, schema, config and the last error to AI agents

Version
1.0.3Nov 5, 2026
Install
pnpm add @samveys/mcp

This list was read from version 1.0.2; run pnpm sync to refresh it.

Import
import { createMcpHandler, mcp, recordLastError, serveMcp, PROTOCOL_VERSIONS } from '@samveys/mcp'

Function (4)

createMcpHandler Function

Handles one JSON-RPC message; returns the response, or undefined for notifications.

function createMcpHandler(options: McpServerOptions): (message: unknown) => Promise<object | undefined>;

Exported from packages/mcp/src/server.ts

mcp Function

`svs mcp` for AI coding agents. Register it with an agent, e.g. `{ "mcpServers": { "app": { "command": "npx", "args": ["svs", "mcp"] } } }`.

function mcp(options?: McpPluginOptions): import("@samveys/core").Plugin<McpPluginOptions>;

Exported from packages/mcp/src/plugin.ts

recordLastError Function

No documentation comment.

function recordLastError(error: unknown): void;

Exported from packages/mcp/src/server.ts

serveMcp Function

Serves MCP over stdio until `input` ends. Logs must go to stderr: stdout carries the protocol.

function serveMcp(options: McpServerOptions & {

Exported from packages/mcp/src/server.ts

Value (1)

PROTOCOL_VERSIONS Value

No documentation comment.

const PROTOCOL_VERSIONS: readonly ['2025-06-18', '2025-03-26', '2024-11-05'];

Exported from packages/mcp/src/server.ts

Interface (4)

McpGuideline Interface

No documentation comment.

interface McpGuideline {
    /** Prompt name, e.g. `samveys-orm`. */
    readonly name: string;
    readonly description: string;
    readonly text: string;
}

Exported from packages/mcp/src/server.ts

McpPluginOptions Interface

No documentation comment.

interface McpPluginOptions {
    readonly tools?: readonly McpTool[];
    readonly guidelines?: readonly McpGuideline[];
}

Exported from packages/mcp/src/plugin.ts

McpServerOptions Interface

No documentation comment.

interface McpServerOptions {
    readonly app: AppContext;
    readonly version?: string;
    /** Extra tools from packages or the app. */
    readonly tools?: readonly McpTool[];
    /** Agent guidelines served as MCP prompts. */
    readonly guidelines?: readonly McpGuideline[];
}

Exported from packages/mcp/src/server.ts

McpTool Interface

No documentation comment.

interface McpTool {
    readonly name: string;
    readonly description: string;
    readonly inputSchema: Readonly<Record<string, unknown>>;
    run(args: Readonly<Record<string, unknown>>): Promise<unknown> | unknown;
}

Exported from packages/mcp/src/server.ts