MCP.so
Sign In
Servers

Boilerplate MCP Server

@aashari

TypeScript Model Context Protocol (MCP) server boilerplate providing IP lookup tools/resources. Includes CLI support and extensible structure for connecting AI systems (LLMs) to external data sources like ip-api.com. Ideal template for creating new MCP integrations via Node.js.

Overview

What is Boilerplate MCP Server?

Boilerplate MCP Server is a production-ready foundation for developing custom Model Context Protocol (MCP) servers in TypeScript. It provides a complete layered architecture pattern, working example implementation, and comprehensive developer infrastructure to connect AI assistants with external APIs and data sources.

How to use Boilerplate MCP Server?

Clone the repository, install dependencies, and build the project. Run in CLI mode (npm run cli -- get-ip-details), STDIO transport (npm run mcp:stdio), HTTP transport (npm run mcp:http), or development with MCP Inspector (npm run mcp:inspect). Transport mode is configured via the TRANSPORT_MODE environment variable.

Key features of Boilerplate MCP Server

  • Security First: DNS rebinding protection and localhost-only binding
  • Dual Transport Support: STDIO and Streamable HTTP with automatic fallback
  • Layered Architecture: Six clean layers for maintainable code
  • Type Safety: Full TypeScript with Zod v4.3.6 schema validation
  • All MCP Primitives: Tools, resources, and prompts with examples
  • TOON Output Format: 30–60% fewer tokens than JSON

Use cases of Boilerplate MCP Server

  • Build custom MCP servers for any external API or data source
  • Develop and test AI assistant tools using the included IP geolocation example
  • Integrate with Claude Desktop or Cursor AI via STDIO transport
  • Rapidly prototype with MCP Inspector’s debugging UI
  • Serve multiple concurrent connections via HTTP transport

FAQ from Boilerplate MCP Server

What is MCP?

Model Context Protocol (MCP) is an open standard for securely connecting AI systems to external tools and data sources.

What are the prerequisites?

Node.js version 20.x or higher and Git for version control.

What transport modes are supported?

STDIO transport (JSON‑RPC via stdin/stdout) and Streamable HTTP transport with Server‑Sent Events (SSE), running on port 3000 by default.

What security measures are implemented?

Built‑in protection includes DNS rebinding protection, localhost‑only binding, and secure error handling that avoids leaking sensitive information. Authentication (e.g., mTLS, OAuth 2.0, bearer tokens) is required when deploying on a network.

What output formats are available?

Default TOON (Token‑Oriented Object Notation), standard JSON (via --output-format json), and JMESPath filtering (--jq) to extract specific fields.

Tags

More from Developer Tools