MCP TypeScript Boilerplate
A TypeScript boilerplate for building MCP servers using the official SDK, with a layered architecture for easy adaptation to different APIs.
README
<p align="center"> <img src="assets/hero.svg" alt="mcp-typescript-boilerplate" width="100%" /> </p>
<p align="center"> <a href="https://github.com/abe-source/mcp-typescript-boilerplate/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-4ade80.svg" alt="MIT License"></a> <img src="https://img.shields.io/badge/node-%3E%3D18-4ade80.svg" alt="Node >= 18"> <img src="https://img.shields.io/badge/TypeScript-7-4ade80.svg" alt="TypeScript 7"> <img src="https://img.shields.io/badge/MCP-server-4ade80.svg" alt="MCP Server"> </p>
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.