Skip to main content
Glama
MCP Python Server

MCP Python Server

by jatindera

MCP (Model Context Protocol) Implementation

Overview

This project implements the Model Context Protocol (MCP) using a server-client architecture in Python. The MCP Server handles requests related to model context management, while the MCP Client interacts with the server to send and receive data.

Related MCP server: MCP Server Demo

Prerequisites

  • Python 3.x

Setting Up the Environment

  1. Create a Virtual Environment Open a terminal and navigate to the project directory. Run the following command to create a virtual environment:

    python -m venv venv
  2. Activate the Virtual Environment

    • On Windows:

      venv\Scripts\activate
    • On macOS/Linux:

      source venv/bin/activate
  3. Install Required Packages After activating the virtual environment, install the required packages using:

    pip install -r requirements.txt

Running the Application

  1. Start the MCP Server Open a terminal (while the virtual environment is activated) and navigate to the directory containing mcp_server.py. Run the following command:

    python mcp_server.py
  2. Start the MCP Client Open another terminal window (or tab) (while the virtual environment is activated) and navigate to the directory containing mcp_client.py. Run the following command:

    python mcp_client.py

Usage

  • After starting the MCP Server, you can interact with it using the MCP Client.

Contributing

Feel free to fork the repository and submit pull requests for any improvements or bug fixes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables type-safe, bidirectional communication with Model Context Protocol services, allowing centralized management of model contexts over HTTP.
      207
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Python implementation of the Model Context Protocol that allows applications to provide standardized context for LLMs, enabling creation of servers that expose data and functionality to LLM applications through resources, tools, and prompts.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A server implementation of the Model Context Protocol (MCP) that provides REST API endpoints for managing and interacting with MCP resources.
      -