node-mcp-poc

node-mcp-poc

A minimal MCP server that exposes tools for addition, echoing text, time lookup, and URL fetching, with support for HTTP and stdio transports.

Category
Visit Server

README

node-mcp-poc

A minimal Model Context Protocol server in Node.js/TypeScript. It runs over HTTP (Express + Streamable HTTP) by default, with stdio available as a fallback, and is attachable to Claude Code.

It exposes four demo tools:

Tool Input Returns
add { a: number, b: number } the sum, e.g. 2 + 3 = 5
echo { text: string } the same text
now { timezone?: string } current time (ISO + localized)
fetch_url { url: string, maxChars?: int } HTTP GET body (JSON pretty-printed)

Build

pnpm install
pnpm build

Run

The server reads its config from the environment (a .env file is loaded automatically — see .env.example):

Variable Default Purpose
MCP_TRANSPORT http http (Express) or stdio
PORT 3219 HTTP port; endpoint is http://localhost:PORT/mcp
LOG_LEVEL info pino log level
NODE_ENV development pretty-prints HTTP logs
pnpm start          # HTTP server on http://localhost:3219/mcp
pnpm start:stdio    # stdio transport instead

Attach to Claude Code

This repo ships a project-level .mcp.json pointing at the HTTP endpoint, so within this directory the server is picked up automatically once it's running:

{
    "mcpServers": {
        "node-poc": { "type": "http", "url": "http://localhost:3219/mcp" },
    },
}

Start the server (pnpm start), then start (or restart) a Claude Code session and try:

  • "add 2 and 3"
  • "echo hello"
  • "what time is it in America/New_York"
  • "fetch https://api.github.com/zen via node-poc"

Check it's connected with claude mcp list.

To register it from anywhere instead of relying on .mcp.json:

# HTTP (server must already be running)
claude mcp add --transport http node-poc http://localhost:3219/mcp

# or stdio (Claude Code launches the process for you)
claude mcp add node-poc -- node /ABSOLUTE/PATH/TO/node-mcp-poc/build/index.js

Remove it with:

claude mcp remove node-poc

Develop / debug

pnpm dev        # rebuild + node --watch
pnpm typecheck  # tsc --watch
pnpm smoke      # build + stdio client smoke test (scripts/smoke.mjs)
pnpm smoke:http # HTTP client smoke test (scripts/smoke-http.mjs)
pnpm logs       # tail logs/server.log through pino-pretty
pnpm inspect    # open the MCP Inspector against the server

Notes

  • In HTTP mode each MCP session gets its own server instance, keyed by the Mcp-Session-Id header; logs go to stdout (pretty-printed when NODE_ENV=development).
  • In stdio mode stdout is reserved for the JSON-RPC wire, so logs go to stderr and logs/server.log (view with pnpm logs).
  • Add new tools in src/index.ts via server.registerTool(...).

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured