my-mcp-server

my-mcp-server

A basic MCP server that implements a calculate tool for arithmetic operations (add, subtract, multiply, divide). It handles requests via stdio.

Category
Visit Server

README

My MCP Server

This project implements a Model Context Protocol (MCP) server using Node.js and TypeScript.

Features

  • MCP server with basic tool capabilities
  • Implements a calculate tool for basic mathematical operations: add, subtract, multiply, divide
  • Handles requests via standard input/output (stdio)

Usage

  1. Install dependencies:
    npm install
    
  2. Build the project:
    npm run build
    
  3. Start the server:
    npm start
    

Tool: calculate

Description: Perform basic mathematical calculations Parameters:

  • operation: string (add, subtract, multiply, divide)
  • a: number
  • b: number

Example Prompt

Calculate 15 + 27 using the calculate tool.

Example Request:

{
  "name": "calculate",
  "arguments": {
    "operation": "add",
    "a": 15,
    "b": 27
  }
}

Example Response:

{
  "content": [
    {
      "type": "text",
      "text": "The result of 15 add 27 is 42."
    }
  ]
}

How to Check This MCP Server in VS Code

  1. Open the project folder in VS Code.
  2. Open a new terminal in VS Code (`Ctrl+`` or from the menu).
  3. Make sure dependencies are installed and the server is running:
    npm install
    npm run build
    npm start
    
  4. You can test the MCP server by sending a request using the terminal. For example:
    echo '{"name": "calculate", "arguments": {"operation": "add", "a": 15, "b": 27}}' | npx ts-node src/server.ts
    
  5. You should see a response similar to:
    {
      "content": [
        {
          "type": "text",
          "text": "The result of 15 add 27 is 42."
        }
      ]
    }
    
  6. For more advanced testing, use an MCP client extension or integrate with other MCP-compatible tools in VS Code.

Project Structure

  • src/server.ts: Main MCP server implementation
  • package.json: Project metadata and scripts
  • tsconfig.json: TypeScript configuration

License

MIT

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
Qdrant Server

Qdrant Server

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

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