MCP Catalogs
Homemcp-server-node screenshot

mcp-server-node

by lucianoayres·75·Score 43

A Node.js MCP server implementation with simple math tools and environment variable retrieval.

developer-toolsai-llmother
20
Forks
0
Open issues
9 mo ago
Last commit
2d ago
Indexed

Overview

This MCP server demonstrates how to build a custom server in JavaScript using Node.js, featuring two tools: 'add' for mathematical operations and 'getApiKey' for retrieving environment variables. The server includes proper input validation using Zod and supports standard I/O transport for seamless integration with AI-assisted environments like Cursor IDE.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Adding mathematical capabilities to AI development environments
you:Providing secure API key retrieval for applications
you:Demonstrating MCP server implementation patterns for Node.js developers
you:What is the purpose of this MCP server?
you:How do I integrate this with Cursor IDE?

When to choose this

Choose this if you're looking for a clear Node.js example of how to implement MCP tools with validation and environment variable integration.

When NOT to choose this

Don't choose this if you need production-ready features or more complex tool implementations, as it's primarily a demonstration/example.

Tools this server exposes

2 tools extracted from the README
  • add

    Takes two numeric inputs and returns their sum

  • getApiKey

    Retrieves the API key from the API_KEY environment variable

Comparable tools

mcp-server-pythonmcp-typescript-servermcp-server-dotnet

Installation

Installation

  1. Clone the repository:
git clone <repository_url>
cd <repository_directory>
  1. Install dependencies:
npm install
  1. Run the server with MCP Inspector:
npm run inspector

Claude Desktop Configuration

Add to your Claude Desktop config.json:

{
  "mcpServers": {
    "node-mcp-server": {
      "command": "node",
      "args": ["/path/to/mcp-server-node/mcp-server.js"],
      "env": {
        "API_KEY": "your-api-key"
      }
    }
  }
}

FAQ

What is the purpose of this MCP server?
This server demonstrates how to build an MCP server in Node.js with custom tools and prompts, serving as an educational example for developers looking to extend AI environments with custom functionality.
How do I integrate this with Cursor IDE?
Add the server configuration to Cursor's settings under Tools & Integrations, specifying the node command, path to mcp-server.js, and any required environment variables like API_KEY.

Compare mcp-server-node with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.