L
lucianoayres/mcp-server-node
Example Node.js MCP server with a prompt and custom tools
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
Install & config
Client config (built from the install command this repo gives)
{
"mcpServers": {
"lucianoayres-mcp-server-node": {
"command": "npx",
"args": ["@modelcontextprotocol/inspector"]
}
}
}Parsed from the README we fetched on 2026-11-05; we have not executed it.
command/args come from the install command the repository states. When it is ambiguous, the project README wins.
VS Code (.vscode/mcp.json - the key is servers)
{
"servers": {
"lucianoayres-mcp-server-node": {
"command": "npx",
"args": ["@modelcontextprotocol/inspector"]
}
}
}Same server, but VS Code keeps it under <code>servers</code>.
Claude Code (command line)
claude mcp add --transport stdio lucianoayres-mcp-server-node -- npx @modelcontextprotocol/inspector
Claude Code does not read a config file; add the server with this command.
Key names differ by client: Clients & CLI
- Source
- collected from the abordage/awesome-mcp list · type: MCP server
- Harvest history
- first seen 2026-11-05 · last seen 2026-11-14 · seen 10× · listed by 10 sources
- Score
- score 1,003 · 10 sources · mcp
- Install
npx @modelcontextprotocol/inspector
FAQ (answers come from our records)
How do I install it?
The repository provides this install command:
npx @modelcontextprotocol/inspector. It comes from the repository itself; we cannot guarantee it runs as-is in your client.Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
first catalogued 2026-11-05;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.
# 🟢 MCP Server in Node.js
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
## Build and run a custom MCP Server in Node.js in just 2 minutes ⏱️
Overview · Features · Installation · Testing with MCP Inspector · Setting Environment Variables for Testing · Integrating with Cursor AI · Using the MCP Tool in Cursor (Agent Mode) · Code Overview · References & Resources · License
## Overview
MCP (Model Context Protocol) is a framework that allows you to integrate custom tools into AI-assisted development environments—such as Cursor AI. MCP servers expose functionality (like data retrieval or code analysis) so that an LLM-based IDE can call these tools on demand. Learn more about MCP in the Model Context Protocol Introduction.
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 APIKEY environment variable. It also provides a predefined prompt addnumbers that allows AI models to infer the usage of the addition tool.
## Requirements
Node.js: Version 20 or higher is required.
## Features
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 ("addnumbers") 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.
## Installation
1. Clone the Repository
bash
git clone
cd
2. Install Dependencies
You can install the project dependencies in one of two ways:
Option 1: Install using the existing package.json
Simply run:
bash
npm install
Option 2: Install dependencies manually
If you prefer, delete the existing package.json and install the required packages manually:
bash
npm install @modelcontextprotocol/sdk zod
Then, update the newly generated package.json file to include the following lines, which enables ES Modules and adds the mcp inspector command:
json
"type": "module",
"scripts": {
"inspector": "npx @modelcontextprotocol/inspector node ./mcp-server.js"
## Testing with MCP Inspector
The MCP Inspector is a debugging tool that lets you test your server's tools interactively before integrating with an IDE.
Option 1: Run directly with npx
bash
npx @modelcontextprotocol/inspector node ./mcp-server.js
Option 2: Use the npm script
bash
npm run inspector
This will:
1. Start the MCP inspector server
2. Open your browser to the inspector interface
3. Allow you to test tools, resources, and prompts
Open the MCP Server Inspector on the browser:
http://localhost:6274/
## Setting Environment Variables for Testing
To test the getApiKey tool with different API keys, you can set environment variables before running the inspector:
Linux/macOS (Bash/Zsh):
bash
# Temporary (current session only)
export APIKEY="your-test-key"
npm run inspector
# Or set for single command
APIKEY="your-test-key" npm run inspector
Windows (Command Prompt):
cmd
# Set for current session
set APIKEY=your-test-key
npm run inspector
Windows (PowerShell):
Overview · Features · Installation · Testing with MCP Inspector · Setting Environment Variables for Testing · Integrating with Cursor AI · Using the MCP Tool in Cursor (Agent Mode) · Code Overview · References & Resources · License
## Overview
MCP (Model Context Protocol) is a framework that allows you to integrate custom tools into AI-assisted development environments—such as Cursor AI. MCP servers expose functionality (like data retrieval or code analysis) so that an LLM-based IDE can call these tools on demand. Learn more about MCP in the Model Context Protocol Introduction.
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 APIKEY environment variable. It also provides a predefined prompt addnumbers that allows AI models to infer the usage of the addition tool.
## Requirements
Node.js: Version 20 or higher is required.
## Features
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 ("addnumbers") 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.
## Installation
1. Clone the Repository
bash
git clone
cd
2. Install Dependencies
You can install the project dependencies in one of two ways:
Option 1: Install using the existing package.json
Simply run:
bash
npm install
Option 2: Install dependencies manually
If you prefer, delete the existing package.json and install the required packages manually:
bash
npm install @modelcontextprotocol/sdk zod
Then, update the newly generated package.json file to include the following lines, which enables ES Modules and adds the mcp inspector command:
json
"type": "module",
"scripts": {
"inspector": "npx @modelcontextprotocol/inspector node ./mcp-server.js"
## Testing with MCP Inspector
The MCP Inspector is a debugging tool that lets you test your server's tools interactively before integrating with an IDE.
Option 1: Run directly with npx
bash
npx @modelcontextprotocol/inspector node ./mcp-server.js
Option 2: Use the npm script
bash
npm run inspector
This will:
1. Start the MCP inspector server
2. Open your browser to the inspector interface
3. Allow you to test tools, resources, and prompts
Open the MCP Server Inspector on the browser:
http://localhost:6274/
## Setting Environment Variables for Testing
To test the getApiKey tool with different API keys, you can set environment variables before running the inspector:
Linux/macOS (Bash/Zsh):
bash
# Temporary (current session only)
export APIKEY="your-test-key"
npm run inspector
# Or set for single command
APIKEY="your-test-key" npm run inspector
Windows (Command Prompt):
cmd
# Set for current session
set APIKEY=your-test-key
npm run inspector
Windows (PowerShell):
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/lucianoayres-mcp-server-node/)
- Source
- awesome · https://github.com/lucianoayres/mcp-server-node
- Browse by field
- MCP servers
- Listed by
- 10 independent sources
- added
- today
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.