Skip to main content
Glama
3237160043lzy-sudo

Enterprise-MCP

Enterprise-MCP

📖 项目简介

Enterprise-MCP 是一个基于 Model Context Protocol(MCP)官方 Python SDK 开发的企业级 MCP 服务示例项目。

项目通过 MCP 协议将本地能力封装为标准化 Tool,使 AI Agent 能够统一调用各种外部能力,为后续构建企业级 AI Agent 提供基础设施。

本项目是整个 Enterprise AI 系列项目中的第三个模块,与 Enterprise-RAGEnterprise-Agent 配套使用。


✨ 项目特点

  • 基于官方 MCP Python SDK 开发

  • 采用模块化 Tool 注册架构

  • 支持多个 Tool 扩展

  • 支持 MCP Client 调用

  • 易于集成到 AI Agent

  • 企业级项目目录结构


📁 项目结构

Enterprise-MCP
│
├── server.py                # MCP Server
├── client_demo.py           # MCP Client 示例
├── config.py                # 配置文件
│
├── tools
│   ├── __init__.py
│   ├── calculator.py        # 计算器 Tool
│   └── file_tool.py         # 文件系统 Tool
│
├── .env
├── requirements.txt
└── README.md

🔧 已实现功能

Related MCP server: Node.js MCP Server

1、Calculator Tool(计算器)

支持数学表达式计算。

示例:

125 * 66

返回:

8250

2、File Tool(文件工具)

目前支持:

  • 读取文件

  • 写入文件

  • 查看目录

示例:

read_file("hello.txt")

write_file("hello.txt", "Hello MCP")

list_files(".")

🚀 快速开始

创建虚拟环境

python -m venv venv

Windows 激活:

venv\Scripts\activate

安装依赖:

pip install -r requirements.txt

启动 MCP Server

python server.py

Server 默认采用 STDIO Transport,等待 MCP Client 建立连接。


运行 MCP Client

python client_demo.py

运行成功后可看到类似输出:

========== 初始化 ==========
初始化成功!

========== 可用工具 ==========
calculator
read_file
write_file
list_files

========== Calculator ==========
8250

========== Read File ==========
Hello MCP!

========== List Files ==========
...

🏗 项目架构

             MCP Client
                  │
                  │
                  ▼
        Enterprise-MCP Server
                  │
      ┌───────────┴───────────┐
      │                       │
Calculator Tool        File Tool

🛠 技术栈

  • Python 3.11

  • Model Context Protocol(MCP)

  • MCP Python SDK

  • AsyncIO

  • FastMCP

  • Pathlib


📌 后续规划

计划继续扩展以下能力:

  • SQLite Tool(数据库访问)

  • RAG Tool(知识库检索)

  • Weather Tool(天气查询)

  • HTTP Transport

  • Agent 集成

  • Tool 权限管理

  • 日志系统

  • 多 Tool 自动发现


📂 系列项目

本项目属于 Enterprise AI 系列项目:

  • Enterprise-RAG —— 企业知识库(RAG)

  • Enterprise-Agent —— AI Agent 框架

  • Enterprise-MCP —— MCP Tool 服务

三个项目可组合形成完整的企业级 AI 应用架构。


📄 License

MIT License

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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/3237160043lzy-sudo/mcp'

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