simple-number-mcp

rohan-kulkarni-25/simple-number-mcp

3.2

If you are the rightful owner of simple-number-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This document provides a comprehensive overview of a simple MCP HTTP server designed to process numerical inputs and return specific results.

Tools
1
Resources
0
Prompts
0

Simple Number MCP Server (HTTP)

A simple MCP HTTP server that takes 3 numbers as input and returns only the first 2 numbers.

Features

  • MCP-compliant HTTP endpoints
  • Takes 3 numbers as input via tool call
  • Returns only the first 2 numbers
  • Health check endpoint for monitoring
  • Ready for Railway/Render/Vercel deployment

Installation

npm install

Usage

Running Locally

npm start

Server runs on http://localhost:3000 (or PORT env variable)

MCP Endpoints

1. List Tools
GET /tools

Response:

{
  "tools": [
    {
      "name": "process_numbers",
      "description": "Takes 3 numbers and returns the first 2 numbers",
      "inputSchema": {
        "type": "object",
        "properties": {
          "num1": { "type": "number", "description": "First number" },
          "num2": { "type": "number", "description": "Second number" },
          "num3": { "type": "number", "description": "Third number (will be ignored)" }
        },
        "required": ["num1", "num2", "num3"]
      }
    }
  ]
}
2. Call Tool
POST /tools/call
Content-Type: application/json

{
  "name": "process_numbers",
  "arguments": {
    "num1": 10,
    "num2": 20,
    "num3": 30
  }
}

Response:

{
  "content": [
    {
      "type": "text",
      "text": "{\n  \"result\": [10, 20],\n  \"message\": \"Received 3 numbers (10, 20, 30), returning first 2: [10, 20]\"\n}"
    }
  ]
}
3. Health Check
GET /health

Response:

{
  "status": "healthy",
  "service": "simple-number-mcp",
  "version": "1.0.0",
  "timestamp": "2025-11-09T12:00:00.000Z"
}

Testing with cURL

# List available tools
curl http://localhost:3000/tools

# Call the process_numbers tool
curl -X POST http://localhost:3000/tools/call \
  -H "Content-Type: application/json" \
  -d '{
    "name": "process_numbers",
    "arguments": {
      "num1": 10,
      "num2": 20,
      "num3": 30
    }
  }'

# Health check
curl http://localhost:3000/health

Deployment

Railway

  1. Connect your GitHub repo to Railway
  2. Railway auto-detects Node.js and runs npm start
  3. Your MCP server will be available at the Railway URL
  4. Use https://your-app.railway.app/tools to list tools

Render

  1. Create new Web Service
  2. Connect GitHub repo
  3. Build Command: npm install
  4. Start Command: npm start

Vercel

  1. Import GitHub repo
  2. Framework Preset: Other
  3. Build Command: (leave empty)
  4. Output Directory: (leave empty)
  5. Deploy!

Integration with Bhindi

Add this MCP server to Bhindi:

{
  "name": "simple-number-mcp",
  "endpoint": "https://your-railway-url.railway.app",
  "type": "http"
}

Environment Variables

  • PORT - Server port (default: 3000)

License

MIT