MCP Python Server
MCP(模型上下文协议)实现
概述
该项目使用 Python 的服务器-客户端架构实现了模型上下文协议 (MCP)。MCP 服务器负责处理与模型上下文管理相关的请求,而 MCP 客户端则负责与服务器交互以发送和接收数据。
Related MCP server: MCP Server Demo
先决条件
Python 3.x
设置环境
创建虚拟环境打开终端并导航到项目目录。运行以下命令创建虚拟环境:
python -m venv venv激活虚拟环境
在 Windows 上:
venv\Scripts\activate在 macOS/Linux 上:
source venv/bin/activate
安装所需的包激活虚拟环境后,使用以下命令安装所需的包:
pip install -r requirements.txt
运行应用程序
启动 MCP 服务器打开终端(虚拟环境激活时)并导航到包含
mcp_server.py的目录。运行以下命令:python mcp_server.py启动 MCP 客户端打开另一个终端窗口(或选项卡)(在虚拟环境激活的情况下)并导航到包含
mcp_client.py的目录。运行以下命令:python mcp_client.py
用法
启动 MCP 服务器后,您可以使用 MCP 客户端与其交互。
贡献
请随意分叉存储库并提交拉取请求以获取任何改进或错误修复。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
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
Model Context Protocol server for Studex tools, notifications, and profile integrations
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables type-safe, bidirectional communication with Model Context Protocol services, allowing centralized management of model contexts over HTTP.208MIT
- FlicenseNot gradedqualityDmaintenanceA demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.-
- AlicenseNot gradedqualityDmaintenanceA 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
- FlicenseNot gradedqualityDmaintenanceA server implementation of the Model Context Protocol (MCP) that provides REST API endpoints for managing and interacting with MCP resources.-