Skip to main content
Glama
MCP Exploration

MCP Exploration

by ArthurGoupil

MCP Exploration

A simple TypeScript MCP (Model Context Protocol) server using @modelcontextprotocol/sdk.

Overview

This project demonstrates how to create a basic MCP server with tools that can be accessed by MCP clients like Claude Desktop, VS Code with GitHub Copilot, or other MCP-compatible applications.

Related MCP server: Node.js MCP Server

Features

  • Calculator Tool: Performs basic arithmetic operations (add, subtract, multiply, divide)

Installation

pnpm install

Development

Run the server in development mode:

pnpm dev

Build

Compile TypeScript to JavaScript:

pnpm build

Run

Start the compiled server:

pnpm start

The server will start on http://localhost:3000/mcp.

Connecting to the Server

Using VS Code

Add this to your MCP configuration in VS Code:

{
  "mcpServers": {
    "simple-mcp-server": {
      "url": "http://localhost:3000/mcp",
      "type": "http"
    }
  }
}

Using MCPJam

Test your server with the MCPJam:

pnpx @mcpjam/inspector@latest --port 4000

Then create a new server with your MCP url.

Available Tools

calculate

Performs basic arithmetic operations.

Parameters:

  • operation (enum): One of "add", "subtract", "multiply", "divide"

  • a (number): First number

  • b (number): Second number

Example:

{
  "operation": "add",
  "a": 5,
  "b": 3
}

Architecture

This server uses:

  • Express.js for HTTP server functionality

  • @modelcontextprotocol/sdk for MCP protocol implementation

  • Zod for schema validation

  • Streamable HTTP Transport for stateless request handling

Learn More

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A simple MCP server that provides basic calculator functionality for performing mathematical operations. Built with FastMCP and demonstrates fundamental MCP server implementation patterns.
      -
    • A
      license
      D
      quality
      D
      maintenance
      A basic MCP server that provides arithmetic calculation tools and system information retrieval capabilities, including platform, CPU, and memory details.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A simple MCP server that provides calculator tools for basic arithmetic operations with zero-division protection.
      ISC