Node Boilerplate MCP Server

Demonstrates building an MCP server in Node.js with custom tools for seamless integration with AI-assisted environments.

Local serverstdioPython★ 75

What is the Node Boilerplate MCP Server?

Demonstrates building an MCP server in Node.js with custom tools for seamless integration with AI-assisted environments.

What the server does

This project demonstrates an MCP server implemented in JavaScript using Node.js. It defines two tools: add, which takes two numeric inputs and returns their sum, and getApiKey, which retrieves the API key from the API_KEY environment variable. It also provides a predefined prompt add_numbers that allows AI models to infer the usage of the addition tool.

  • MCP Integration: — Exposes tool functionality to LLM-based IDEs
  • Addition Tool: — Accepts two numeric parameters and returns their sum
  • MCP Prompt: — Provides a predefined prompt ("add_numbers") that allow AI models to infer tool usage
  • Env Var Retrieval: — Demonstrates how to load an example environment variable from the configuration file
  • Input Validation: — Uses Zod for schema validation
  • Standard I/O Transport: — Connects via StdioServerTransport for integration with development environments

Credentials and setup notes

  • Node.js: Version 20 or higher is required.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Node Boilerplate MCP Server

{
  "mcpServers": {
    "existing-server": {
      "command": "python",
      "args": ["/path/to/existing/server.py"]
    },
    "MCP Server Boilerplate": {
      "command": "node",
      "args": ["/home/john/mcp-server-node/mcp-server.js"],
      "env": {
        "API_KEY": "abc-1234567890"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js: Version 20 or higher is required.
VariableDescriptionRequired
API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • “Use Node Boilerplate to Returns.”

Frequently asked questions

MCP (Model Context Protocol) is a framework that enables seamless integration of custom tools into AI IDEs, allowing LLMs to leverage external functionality.