Skip to main content
Glama
agiulucom42-del

mcp-boilerplate

🧩 MCP Server Template Boilerplate

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

npm version License: MIT CI


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
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


License

MIT © HUQAN


Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agiulucom42-del/mcp-boilerplate'

If you have feedback or need assistance with the MCP directory API, please join our Discord server