Skip to main content
Glama
satty1987

Node MCP Server

by satty1987

Node MCP Server

Small example MCP (Model Context Protocol) server that exposes a weather tool using the @modelcontextprotocol/sdk.

Overview

  • Provides a minimal Express-based HTTP server that connects an McpServer to a Streamable HTTP transport.

  • Exposes endpoints: /mcp (MCP transport), /health, /status, and /.

Related MCP server: MCP Server Basic Example

Requirements

  • Node.js 18+ recommended

  • npm

Install

npm install

Run

npm start

Server listens on port 3000 by default.

Endpoints

  • GET /health — returns OK.

  • GET /status — returns a JSON status object.

  • POST /mcp — Streamable HTTP MCP transport endpoint. The server expects clients to POST JSON-RPC messages.

Important: the Streamable HTTP transport expects clients to include the following headers for POSTs:

  • Content-Type: application/json

  • Accept: application/json, text/event-stream

Example curl (initialize):

curl --location 'http://localhost:3000/mcp' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json, text/event-stream' \
--data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "getWeather_Tool",
    "arguments": {
      "location":"New York"
    }
  }
}'

Notes

  • The project uses @modelcontextprotocol/sdk (see package.json) and returns structured tool results. Tool callbacks must return objects matching the SDK's expected schema (not plain strings).

  • If you see errors about Accept headers or tool result shapes, verify headers and that tool callbacks return an object with a content array.

License

MIT

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (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

  • -
    license
    -
    quality
    -
    maintenance
    A basic Model Context Protocol server implementation that demonstrates core MCP functionality including tools and resources. Provides weather alerts through the Weather API and serves as a learning example for MCP development.
  • A
    license
    -
    quality
    D
    maintenance
    A minimal Model Context Protocol server demo that exposes tools through HTTP API, including greeting, weather lookup, and HTTP request capabilities. Demonstrates MCP server implementation with stdio communication and HTTP gateway functionality.
    7
    ISC
  • A
    license
    -
    quality
    D
    maintenance
    This MCP server provides tools like weather lookup and follows the Model Context Protocol for tool calling, resource sharing, and prompt templates.
    270
    MIT

View all related MCP servers

Related MCP Connectors

  • A Model Context Protocol server for Wix AI tools

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.

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/satty1987/mcp_server'

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