Skip to main content
Glama

MCP Agent Platform

A modular Model Context Protocol (MCP) agent platform built with Python.

This project allows an LLM-powered agent to work with both local tools and tools exposed by external MCP servers. It provides MCP server management, dynamic tool discovery, tool registration, tool execution, and multi-step tool calling.


🚀 Project Overview

The MCP Agent Platform acts as a bridge between an LLM and multiple tools.

The agent can:

  • Register local Python tools

  • Connect to external MCP servers

  • Discover tools dynamically from MCP servers

  • Convert MCP tools into OpenAI-compatible function schemas

  • Allow the LLM to decide which tool to use

  • Execute the selected tool

  • Send tool results back into the LLM context

  • Execute multiple tools sequentially when required

  • Return the final natural-language response

  • Manage MCP server connections through REST APIs

  • Expose an MCP server over Streamable HTTP


🏗️ Architecture

                         ┌──────────────────────┐
                         │        User          │
                         └──────────┬───────────┘
                                    │
                                    ▼
                         ┌──────────────────────┐
                         │      Agent / LLM     │
                         │    OpenAI API        │
                         └──────────┬───────────┘
                                    │
                         Tool selection
                                    │
                                    ▼
                         ┌──────────────────────┐
                         │    Tool Registry     │
                         └──────────┬───────────┘
                                    │
                  ┌─────────────────┴─────────────────┐
                  │                                   │
                  ▼                                   ▼
        ┌───────────────────┐              ┌───────────────────┐
        │   Local Tools     │              │    MCP Tools      │
        │                   │              │                   │
        │ get_weather       │              │ External MCP      │
        │ get_datetime      │              │ Servers            │
        └─────────┬─────────┘              └─────────┬─────────┘
                  │                                   │
                  │                                   ▼
                  │                         ┌──────────────────┐
                  │                         │   MCP Manager    │
                  │                         └────────┬─────────┘
                  │                                  │
                  │                                  ▼
                  │                         ┌──────────────────┐
                  │                         │  MCP Server(s)   │
                  │                         │ Streamable HTTP  │
                  │                         └────────┬─────────┘
                  │                                  │
                  └──────────────────┬───────────────┘
                                     │
                                     ▼
                              Tool Result
                                     │
                                     ▼
                                  LLM
                                     │
                                     ▼
                              Final Response

Latest Blog Posts

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/sabeekaahmad-43/Mcp_Project'

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