Skip to main content
Glama

MCP Python Server

by jatindera

MCP(模型上下文协议)实现

概述

该项目使用 Python 的服务器-客户端架构实现了模型上下文协议 (MCP)。MCP 服务器负责处理与模型上下文管理相关的请求,而 MCP 客户端则负责与服务器交互以发送和接收数据。

先决条件

  • Python 3.x

设置环境

  1. 创建虚拟环境打开终端并导航到项目目录。运行以下命令创建虚拟环境:
    python -m venv venv
  2. 激活虚拟环境
    • 在 Windows 上:
      venv\Scripts\activate
    • 在 macOS/Linux 上:
      source venv/bin/activate
  3. 安装所需的包激活虚拟环境后,使用以下命令安装所需的包:
    pip install -r requirements.txt

运行应用程序

  1. 启动 MCP 服务器打开终端(虚拟环境激活时)并导航到包含mcp_server.py的目录。运行以下命令:
    python mcp_server.py
  2. 启动 MCP 客户端打开另一个终端窗口(或选项卡)(在虚拟环境激活的情况下)并导航到包含mcp_client.py的目录。运行以下命令:
    python mcp_client.py

用法

  • 启动 MCP 服务器后,您可以使用 MCP 客户端与其交互。

贡献

请随意分叉存储库并提交拉取请求以获取任何改进或错误修复。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

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

基于 Python 的模型上下文协议实现,通过请求-响应架构实现模型上下文管理服务器和客户端之间的通信。

  1. 概述
    1. 先决条件
      1. 设置环境
        1. 运行应用程序
          1. 用法
            1. 贡献
              1. 执照

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.
                  Last updated -
                  2
                  Python
                  MIT License
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A streamlined foundation for building Model Context Protocol servers in Python, designed to make AI-assisted development of MCP tools easier and more efficient.
                  Last updated -
                  15
                  Python
                  MIT License
                • -
                  security
                  A
                  license
                  -
                  quality
                  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.
                  Last updated -
                  Python
                  MIT License
                • A
                  security
                  F
                  license
                  A
                  quality
                  A Model Context Protocol server that allows LLMs to interact with Python environments, enabling code execution, file operations, package management, and development workflows.
                  Last updated -
                  9
                  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/jatindera/MCPBasic'

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