Skip to main content
Glama

Simple HTTP MCP Server

Simple HTTP MCP Server

This project provides a lightweight server implementation for the Model Context Protocol (MCP) over HTTP. It allows you to expose Python functions as "tools" that can be discovered and executed remotely via a JSON-RPC interface. It is thought to be used with an Starlette or FastAPI application (see app/main.py).

How to test with Gemini Cli

  1. Install dependencies:
    uv sync uv run run-app
  2. Test the server:Note: you should be located on the root folder of the project so gemini config is used.
    gemini /mcp # This should show the tools available

Example:

Example

Features

  • MCP Protocol Compliant: Implements the MCP specification for tool discovery and execution.
  • HTTP Transport: Uses HTTP POST for communication.
  • Async Support: Built on Starlette or FastAPI for asynchronous request handling.
  • Type-Safe: Leverages Pydantic for robust data validation and serialization.
  • Dependency Management: Uses uv for fast and efficient package management.
  • Linting: Integrated with Ruff for code formatting and linting.
  • Type Checking: Uses Mypy for static type checking.

Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone <repository-url> cd simple-http-mcp
  2. Create a virtual environment and install dependencies:
    uv venv source .venv/bin/activate uv sync

Usage

For usage examples, please refer to the tests in the tests/ directory.

Development

This project uses several tools to ensure code quality.

Linting

To check for linting errors, run:

ruff check .

To automatically fix linting errors, run:

ruff check . --fix

Type Checking

To run the static type checker, use:

mypy .
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A lightweight server implementation that exposes Python functions as discoverable tools via HTTP using the Machine-to-Machine Communication Protocol (MCP). Enables remote execution of Python functions through a JSON-RPC interface with async support and type safety.

  1. How to test with Gemini Cli
    1. Features
      1. Getting Started
        1. Prerequisites
        2. Installation
      2. Usage
        1. Development
          1. Linting
          2. Type Checking

        Related MCP Servers

        • -
          security
          F
          license
          -
          quality
          This is an MCP server that facilitates building tools for interacting with various APIs and workflows, supporting Python-based development with potential for customizable prompts and user configurations.
          Last updated -
          Python
        • A
          security
          A
          license
          A
          quality
          A server that provides a persistent Python REPL environment through the MCP protocol, allowing execution of Python code, variable management, and package installation.
          Last updated -
          3
          24
          Python
          MIT License
        • -
          security
          F
          license
          -
          quality
          A Python implementation of the MCP server that enables AI models to connect with external tools and data sources through a standardized protocol, supporting tool invocation and resource access via JSON-RPC.
          Last updated -
          1
          Python
        • -
          security
          F
          license
          -
          quality
          A Python template for building Model Context Protocol (MCP) servers that expose tools via JSON-RPC, enabling secure and scalable context and tool invocation for language models.
          Last updated -
          Python

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/yeison-liscano/http_mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server