Skip to main content
Glama

MCP Tool Server

Reference implementation of a Model Context Protocol (MCP) server for integrating external APIs as agent tools.

Built from MCP patterns used in production agentic platforms integrating weather, database, and enterprise system tools.

Features

  • MCP-compliant server with tool registration, discovery, and execution

  • Built-in tools: weather lookup, database query, web search, calculator

  • Tool schema validation with Pydantic models

  • Authentication: API key and OAuth2 support

  • Rate limiting per tool and per client

  • Execution logging for observability

Related MCP server: MCP Python Server — API Wrapper

Quick start

pip install -r requirements.txt
python src/server.py  # Starts MCP server on port 8000

Adding custom tools

from src.server import MCPServer, Tool

@Tool(name="lookup_inventory", description="Check inventory levels")
def lookup_inventory(product_id: str) -> dict:
    return {"product_id": product_id, "quantity": 142, "warehouse": "Seattle-WH1"}

server = MCPServer()
server.register(lookup_inventory)
server.run()

Tech stack

Python, FastAPI, Pydantic, httpx

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
      2
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) Server that provides unified access to multiple external APIs (weather, news, financial data) through a single, consistent interface for AI agents and LLMs.
      1
      -
    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI assistants to make HTTP requests (GET, POST, PUT, DELETE) to external APIs through standardized MCP tools.
      4
      2
      MIT