Declare
Place MCP intent and structured schemas beside the TypeScript methods they describe.
TypeScript · MCP · Explicit contracts
Published @theorvane/type-mcp@0.2.2 turns strict TypeScript declarations into a validated runtime, while applications retain ownership of hosting and policy.
import { z } from "zod";
import { McpServer, McpTool } from "@theorvane/type-mcp";
@McpServer({ name: "catalog", version: "0.2.0" })
class CatalogTools {
@McpTool({ input: z.object({ id: z.string() }) })
findProduct({ id }: { id: string }) { return { id, available: true }; }
}Contract inspection
Definitions stay inspectable before the runtime boundary your application owns.
Place MCP intent and structured schemas beside the TypeScript methods they describe.
Check definitions before runtime compilation so contracts are inspectable.
Build the official MCP SDK surface through explicit instance resolution.
Connect stdio or Streamable HTTP at the application edge, where hosting and authorization remain yours.
Architecture
Integration boundary
@theorvane/type-mcp/langchain is a tools-only adapter that converts decorated MCP tools to LangChain tools backed by structured schemas.
Use those tools with a consumer-owned LangGraph ToolNode. Your application owns graph topology, model choice, authorization, state, persistence, and deployment.
Get started