Product vision

Status: Product target. The current implementation provides decorator metadata storage, definition validation, an async-capable instance-resolver seam, compiler support for tools/static resources/prompts, runtime tool-input validation, safe handler errors, the Node stdio helper, and the Fetch Streamable HTTP adapter.

Problem

Teams building MCP servers in TypeScript often assemble protocol registration, runtime validation, HTTP transport, and framework integration by hand. The resulting code is repetitive, hard to discover in large applications, and becomes tightly coupled to a chosen framework too early.

Product statement

@theorvane/type-mcp lets TypeScript teams declare MCP servers, tools, resources, and prompts on familiar classes, then compiles those declarations to the official MCP SDK. It prioritizes a small framework-neutral core and interoperable tools for LangChain and consumer-owned LangGraph flows.

Primary users

  1. TypeScript platform/backend developers adding MCP endpoints to existing services.
  2. Agent-application developers that need LangChain tools without forcing MCP core consumers to install agent dependencies.
  3. Next.js/Web Standard developers that need a protocol-correct Streamable HTTP entry point.

MVP user outcomes

Success criteria

CriterionEvidence
Declarative clarityA runnable example defines and invokes a tool with a decorated class.
Protocol correctnessIntegration tests exercise initialize, list, and call paths through the official SDK transports.
Safe boundariesTests prove invalid inputs and thrown handlers do not expose stack traces.
Framework neutralityCore and HTTP have no agent-framework dependency/import; the isolated LangChain subpath uses its explicit peer only.
Developer confidenceStrict typecheck, tests, builds, and CI pass from a clean install.

Product principles