mcp-boilerplate

mcp-boilerplate

Production-ready template for building MCP servers with TypeScript, featuring example tools and resources, and Claude Desktop integration.

Category
Visit Server

README

<div align="center">

🧩 MCP Server Template Boilerplate

Production-ready MCP server starter with TypeScript, realistic examples, and Claude Desktop integration.

GitHub Release ![README Score](https://img.shields.io/badge/README%20Score-73%2F100 B-yellow?style=flat-square) License: MIT ![README Score](https://img.shields.io/badge/README%20Score-73%2F100 B-yellow?style=flat-square) CI

</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)
  • tsup configured 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

  1. Add Tools: Edit the CallToolRequestSchema handler in src/index.ts
  2. Add Resources: Edit ReadResourceRequestSchema and ListResourcesRequestSchema
  3. Change Name: Update the name in new 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

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.

Official
Featured