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

Related MCP Connectors

  • Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server

  • The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com

  • The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

Related MCP Servers

  • A
    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.
    29 npm
    2
    MIT
  • 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