Skip to main content
Glama
abe-source

MCP TypeScript Boilerplate

by abe-source

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

Related MCP server: TypeScript MCP Server Boilerplate

Adapting this to a new service

  1. src/config.ts — rename API_KEY to <SERVICE>_API_KEY, set the real BASE_URL

  2. src/apiClient.ts — match the target API's auth scheme (header name, Bearer vs custom) and error response shape

  3. src/endpoints/ — one function per endpoint, delete example.ts

  4. src/tools/ — one tool per file (schema + result formatting), delete example.ts, register real tools in tools/index.ts

  5. package.json — rename, update bin, description, repo URLs

Build

npm install
cp .env.example .env   # fill in API_KEY
npm run build
npm start

Design notes

  • client.ts has zero domain knowledge — it should not need to change between projects

  • apiClient.ts is the only layer that knows about auth and this API's error format

  • endpoints/ returns typed data, tools/ formats that data as MCP content — don't blend the two

  • stdio transport, so this works with Claude Desktop, Claude Code, and any other MCP-compatible client without extra setup

Install Server
A
license - permissive license
A
quality
B
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.

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    A boilerplate project for quickly developing MCP servers using TypeScript SDK, with example implementations of calculator and greeting tools, plus resource handling capabilities.
    Last updated
  • F
    license
    B
    quality
    C
    maintenance
    A TypeScript MCP server boilerplate providing example tools and resources for rapid development of custom Model Context Protocol servers.
    Last updated
    8
  • F
    license
    -
    quality
    D
    maintenance
    A TypeScript MCP server boilerplate providing example tools and resources for rapid development and testing of Model Context Protocol servers.
    Last updated

View all related MCP servers

Related MCP Connectors

  • A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…

  • An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform

  • MCP (Model Context Protocol) server for Appwrite

View all MCP Connectors

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/abe-source/mcp-typescript-boilerplate'

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