Skip to content

deodeveloper/simple-mcp-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple MCP HTTP Server

A demonstration MCP (Model Context Protocol) server using FastMCP 2.x with HTTP transport.

Features

  • Tools: Mathematical calculator, sequence generator, data echo
  • Resources: Server config, sample data, statistics
  • Prompts: Code review, data analysis, task planning templates
  • HTTP Transport: Modern streamable HTTP with health checks

Quick Start

  1. Setup environment:

    source venv/bin/activate
    pip install -r requirements.txt
  2. Start server:

    python server.py

    Server runs at http://127.0.0.1:8000

  3. Test with client:

    python test_client.py

Development Mode

Use FastMCP's development mode with MCP Inspector:

fastmcp dev server.py

This provides an interactive web interface at http://localhost:8000 for testing tools, resources, and prompts.

Testing

  • Full test suite: python test_client.py
  • Interactive mode: python test_client.py --interactive
  • Health check: curl http://127.0.0.1:8000/health

Available Tools

  • calculate(expression) - Safe math evaluation
  • generate_sequence(start, end, step) - Number sequence with progress
  • echo_data(message, metadata) - Echo with timestamp

Available Resources

  • config://server - Server configuration
  • data://{category} - Sample data (users, products, orders)
  • stats://server - Runtime statistics

Available Prompts

  • code_review_prompt(code, language) - Code review template
  • data_analysis_prompt(data_description, analysis_type) - Analysis template
  • task_planning_prompt(task, complexity) - Planning template

Integration

Connect to Claude Desktop by adding to config:

{
  "mcpServers": {
    "simple-http": {
      "command": "python",
      "args": ["/path/to/server.py"],
      "env": {}
    }
  }
}

About

mcp 2.x latest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages