MCP Openapi Typescript Stack

Documents a portable TypeScript MCP server pattern: OpenAPI-generated Ky client + Zod request schemas, dual transports (stdio and streamable HTTP), optional multi-tenant credentials via AsyncLocalStorage, library-first public API with optional CLI, and authentication modeling (e.g. HTTP Basic from two-part secrets, Bearer/OAuth tokens, APIs that accept both). Use when scaffolding or refactoring any MCP server that wraps a REST API with @hey-api/openapi-ts (or similar codegen), when comparing this layout to FastMCP or other stacks, or after mcp-builder when the stack is TypeScript + generated SDK + MCP SDK, or when configuring or debugging @hey-api/openapi-ts (plugins, CLI, Zod validators, Ky client), or when adding opt-in env-gated debug logs for HTTP credential / tenant resolution.

atomicpages 4a625a6 5 files · 59.4 KB Updated

File contents

atomicpages/mcp-skills/tree/main/skills/mcp-openapi-typescript-stack commit 4a625a6edf

Frequently asked questions

npx skillmds@latest add atomicpages/mcp-openapi-typescript-stack