mcp-boilerplate
Production-ready template for building MCP servers with TypeScript, featuring example tools and resources, and Claude Desktop integration.
README
<div align="center">
š§© MCP Server Template Boilerplate
Production-ready MCP server starter with TypeScript, realistic examples, and Claude Desktop integration.


</div>
A production-ready boilerplate for building Model Context Protocol (MCP) servers using TypeScript and Node.js.
Features
- TypeScript pre-configured for modern module resolution (
NodeNext) tsupconfigured for lightning-fast builds- Clean MCP SDK setup using
StdioServerTransport - Example Tool (
web_fetch) ā fetches URLs and returns content as a resource - Example Resource (
file://read) ā reads local files securely - Claude Desktop integration guide
Quick Start
Installation
git clone https://github.com/agiulucom42-del/mcp-boilerplate.git
cd mcp-boilerplate
npm install https://github.com/agiulucom42-del/mcp-boilerplate
npm run build
Run the server
npm start
MCP servers using stdio communicate via standard input/output. npm start waits for JSON-RPC messages from an MCP client.
Integration with Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"my-server": {
"command": "node",
"args": ["/absolute/path/to/mcp-boilerplate/dist/index.js"]
}
}
}
Example Tool: web_fetch
The boilerplate ships with a realistic tool that fetches a URL and returns its content:
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name === "web_fetch") {
const url = String(request.params.arguments?.url);
const response = await fetch(url);
const text = await response.text();
return {
content: [{ type: "text", text: text.slice(0, 10000) }]
};
}
throw new Error("Tool not found");
});
Example Resource: file://read
Safely read files from an allowed directory:
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
const path = request.params.uri.replace("file://", "");
const content = await fs.readFile(path, "utf-8");
return {
contents: [{ uri: request.params.uri, text: content }]
};
});
How to Customize
- Add Tools: Edit the
CallToolRequestSchemahandler insrc/index.ts - Add Resources: Edit
ReadResourceRequestSchemaandListResourcesRequestSchema - Change Name: Update the
nameinnew Server()instantiation
š HUQAN Ecosystem
mcp-boilerplate is part of the HUQAN trust infrastructure for AI. Sister projects:
| Tool | What it does |
|---|---|
| env-sentinel | š“ Stop leaking API keys |
| readme-score | š Score your README quality |
| repo-risk-scan | š”ļø Scan repo before giving to agent |
| pr-scope-check | š Block PR scope creep |
| llm-diff | š Compare LLM outputs |
| token-budget | š° Track LLM API costs |
| axiom-verify | ā Validate LLM JSON outputs |
| mcp-boilerplate | š§© MCP server starter You are here |
CLI Reference
Scaffold a Model Context Protocol server in seconds
- $repoName init <project-name>
n- $repoName init --typescriptn- $repoName init --pythonn- $repoName list-templatesn- $repoName --help`n
Contributing
Contributions welcome! Please read CONTRIBUTING.md before submitting.
See CHANGELOG.md for version history.
License
MIT Ā© HUQAN
<div align="center"> <a href="https://www.buymeacoffee.com/huqan">ā Buy me a coffee</a> </div>
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
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.