Skip to main content

Documentation Index

Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

veryfront/mcp

MCP server exposing tools, prompts, and resources.

Import

import {
  createMCPServer,
  registerTool,
  registerPrompt,
  registerResource,
  buildFormElicitation,
  buildUrlElicitation,
} from "veryfront/mcp";

Examples

import { createMCPServer } from "veryfront/mcp";
import { tool } from "veryfront/tool";
import { z } from "zod";

// Tools auto-register with MCP when defined
tool({
  id: "search",
  description: "Search docs",
  inputSchema: z.object({ query: z.string() }),
  execute: async ({ query }) => ({ results: [] }),
});

// Start MCP server — registered tools are exposed automatically.
// `auth` is required: use bearer for production, or the explicit
// `{ type: "none", allowUnauthenticated: true }` opt-in for local dev only.
const server = createMCPServer({
  enabled: true,
  auth: { type: "none", allowUnauthenticated: true },
});

API

createMCPServer(config)

Create mcpserver. Returns: MCPServer

Exports

Functions

NameDescriptionSource
buildFormElicitationBuilds form elicitation.source
buildUrlElicitationBuilds URL elicitation.source
clearMCPRegistryClear MCP registry.source
createMCPServerCreate mcpserver.source
formatSSEEventStateless SSE formatting utilities per the Server-Sent Events standard. Used by the Streamable HTTP transport for MCP.source
formatSSEPrimingEventEvent emitted for format ssepriming.source
formatSSERetryFormats sseretry.source
getMCPRegistryReturn MCP registry.source
getMCPStatsReturn MCP stats.source
registerPromptRegisters prompt.source
registerResourceRegisters resource.source
registerToolRegisters tool.source

Classes

NameDescriptionSource
MCPServerImplement mcpserver.source
SessionManagerManages MCP sessions for the Streamable HTTP transport. Sessions are created during initialization and validated on subsequent requests.source
TaskStoreImplement task store.source

Types

NameDescriptionSource
ElicitationRequestRequest payload for elicitation.source
FormElicitationOptionsOptions accepted by form elicitation.source
IntegrationLoaderConfigConfiguration used by integration loader.source
MCPServerConfigConfiguration used by mcpserver.source
MCPStatsPublic API contract for MCP stats.source
MCPToolGeneric MCP tool definitionsource
TaskPublic API contract for task.source
ToolAnnotationsBehavioral hints for MCP clients (MCP 2025-11-25). Guides auto-approval, confirmation prompts, and caching.source
ToolListEntryWire format for a single tool in a tools/list response.source
UrlElicitationOptionsOptions accepted by URL elicitation.source
Reference modules: User guides: Architecture: