Simple MCP Server

Simple MCP Server

A demonstration server implementing the Model Context Protocol (MCP) that provides three basic tools: echo, calculator, and current time functionality.

Category
Visit Server

Tools

echo

Echo back the provided message

calculator

Perform basic mathematical operations

current_time

Get the current date and time

README

Simple MCP Server

A simple Model Context Protocol (MCP) server example that demonstrates basic MCP functionality.

What it does

This MCP server provides three basic tools:

  1. echo - Echoes back a message you provide
  2. calculator - Performs basic mathematical operations (add, subtract, multiply, divide)
  3. current_time - Returns the current date and time

Prerequisites

  • Node.js 16 or higher
  • npm

Installation

  1. Clone this repository
  2. Install dependencies:
    npm install
    

Building

Build the TypeScript code:

npm run build

Running the Server

Start the server in development mode:

npm run dev

Or run the built version:

npm start

Testing with Claude Desktop

To test this MCP server with Claude Desktop, add the following configuration to your claude_desktop_config.json:

Windows

Location: %APPDATA%\Claude\claude_desktop_config.json

macOS/Linux

Location: ~/Library/Application Support/Claude/claude_desktop_config.json

Configuration:

{
  "mcpServers": {
    "simple-mcp-server": {
      "command": "node",
      "args": ["/absolute/path/to/your/project/build/index.js"]
    }
  }
}

Replace /absolute/path/to/your/project/ with the actual path to your project directory.

Project Structure

├── src/
│   └── index.ts          # Main server implementation
├── build/                # Compiled JavaScript (generated)
├── .github/
│   └── copilot-instructions.md  # Copilot instructions
├── .vscode/
│   └── mcp.json          # VS Code MCP configuration
├── package.json          # Project configuration
├── tsconfig.json         # TypeScript configuration
└── README.md            # This file

Tools Available

echo

  • Description: Echo back the provided message
  • Parameters:
    • message (string): The message to echo back

calculator

  • Description: Perform basic mathematical operations
  • Parameters:
    • operation (enum): One of 'add', 'subtract', 'multiply', 'divide'
    • a (number): The first number
    • b (number): The second number

current_time

  • Description: Get the current date and time
  • Parameters: None

Example Usage

Once connected to an MCP client like Claude Desktop, you can use commands like:

  • "Echo back the message 'Hello World'"
  • "Calculate 15 plus 25"
  • "What's the current time?"

Development

This project is set up with:

  • TypeScript for type safety
  • Zod for runtime type validation
  • MCP SDK for protocol compliance
  • ES modules support

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