Sample

v1.0.0Developer Toolsstable

Mcp server, using model context protocol sdk and a http interface

samplemcpai-integration
Share:
80
Stars
0
Downloads
0
Weekly
0/5

What is Sample?

Sample is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server, using model context protocol sdk and a http interface

Mcp server, using model context protocol sdk and a http interface

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Mcp server, using model context protocol sdk and a http inte

Use Cases

Reference implementation of MCP protocol using SDK and HTTP interface.
gabrielfroes

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 4, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx sample

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Sample

The Sample MCP Server (mcp-server-sample) is an educational reference implementation of the Model Context Protocol built with the official @modelcontextprotocol/sdk for Node.js/TypeScript. It exposes two weather tools — get-alerts (active NWS weather alerts by US state) and get-forecast (weather forecast by latitude/longitude) — using a clean Domain-Driven Design architecture with separated domain, infrastructure, application, and interface layers, making it an ideal starting point for developers learning how to structure a production MCP server.

Prerequisites

  • Node.js 18 or higher with npm
  • Git to clone the repository
  • An MCP-compatible client such as Claude Desktop
  • Internet access to reach the US National Weather Service API (no API key required)
1

Clone the repository

Clone the mcp-server-sample repository from GitHub and change into the project directory.

git clone https://github.com/gabrielfroes/mcp-server-sample.git
cd mcp-server-sample
2

Install dependencies

Install the project dependencies using npm. The key dependency is @modelcontextprotocol/sdk for MCP communication and zod for input validation.

npm install
3

Build the TypeScript project

Compile the TypeScript source to JavaScript. The output lands in the build/ directory and the entry point is build/main.js.

npm run build
4

Run the server locally to verify it starts

Start the server directly with Node. It communicates via stdio and will wait for MCP requests — this is normal; the server is ready when no error appears.

node build/main.js
5

Register the server in your MCP client configuration

Add an entry for the server in claude_desktop_config.json (or your client's equivalent), pointing to the compiled build/main.js file.

Sample Examples

Client configuration

Add this to claude_desktop_config.json after cloning and building the project. Replace the path with the absolute path to your local build/main.js.

{
  "mcpServers": {
    "mcp-server-sample": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-server-sample/build/main.js"]
    }
  }
}

Prompts to try

Example prompts that exercise the two NWS weather tools exposed by this server.

- "Are there any active weather alerts in California right now?"
- "What is the weather forecast for New York City? (latitude 40.7128, longitude -74.0060)"
- "Check for severe weather alerts in Texas."
- "Give me the 7-day forecast for San Francisco (37.7749, -122.4194)."

Troubleshooting Sample

npm run build fails with TypeScript errors

Make sure you are running Node.js 18 or higher ('node --version'). Run 'npm install' again to ensure all type definitions are present, then retry the build.

get-forecast returns an error for coordinates outside the US

The National Weather Service API only covers US locations. The get-forecast tool requires valid US latitude/longitude values. For non-US locations, the NWS API will return an error — this is a limitation of the upstream API, not the server itself.

Claude Desktop does not show the weather tools after adding the config

Verify the path in args points to the compiled build/main.js (not src/main.ts). Run 'node /your/path/build/main.js' from a terminal — if that errors, the build step did not complete. Fully quit and relaunch Claude Desktop after editing the config.

Frequently Asked Questions about Sample

What is Sample?

Sample is a Model Context Protocol (MCP) server that mcp server, using model context protocol sdk and a http interface It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Sample?

Follow the installation instructions on the Sample GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Sample?

Sample works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Sample free to use?

Yes, Sample is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "sample": { "command": "npx", "args": ["-y", "sample"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Sample?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides