TypeScript Boilerplate
БесплатноНе проверенA TypeScript boilerplate for building MCP servers using the official SDK, with a layered architecture for easy adaptation to different APIs.
Описание
A TypeScript boilerplate for building MCP servers using the official SDK, with a layered architecture for easy adaptation to different APIs.
README
MCP TypeScript Boilerplate
A starting point for building MCP servers with the official @modelcontextprotocol/sdk, no wrapper framework. Extracted from a working, published server (mcp-abuseipdb).
Layers
src/
config.ts env loading + validation — API key, base URL, timeout
client.ts generic fetch wrapper — no domain knowledge, rarely needs changes
apiClient.ts adds this API's auth header + error unwrapping, on top of client.ts
endpoints/ one file per API endpoint you call — HTTP shape only
example.ts
tools/
types.ts the Tool interface every tool file implements
example.ts one tool: schema + handler, calls into endpoints/
index.ts tool registry — tools[] array
server.ts wires the tool registry into an McpServer instance
index.ts entrypoint: loadConfig() → createServer() → connect stdio transport
Adapting this to a new service
src/config.ts— renameAPI_KEYto<SERVICE>_API_KEY, set the realBASE_URLsrc/apiClient.ts— match the target API's auth scheme (header name,Bearervs custom) and error response shapesrc/endpoints/— one function per endpoint, deleteexample.tssrc/tools/— one tool per file (schema + result formatting), deleteexample.ts, register real tools intools/index.tspackage.json— rename, updatebin, description, repo URLs
Build
npm install
cp .env.example .env # fill in API_KEY
npm run build
npm start
Design notes
client.tshas zero domain knowledge — it should not need to change between projectsapiClient.tsis the only layer that knows about auth and this API's error formatendpoints/returns typed data,tools/formats that data as MCPcontent— don't blend the two- stdio transport, so this works with Claude Desktop, Claude Code, and any other MCP-compatible client without extra setup
Установка TypeScript Boilerplate
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/abe-source/mcp-typescript-boilerplateFAQ
TypeScript Boilerplate MCP бесплатный?
Да, TypeScript Boilerplate MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для TypeScript Boilerplate?
Нет, TypeScript Boilerplate работает без API-ключей и переменных окружения.
TypeScript Boilerplate — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить TypeScript Boilerplate в Claude Desktop, Claude Code или Cursor?
Открой TypeScript Boilerplate на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare TypeScript Boilerplate with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
