Enterprise-MCP

Enterprise-MCP

An MCP server providing calculator and file system tools, enabling AI agents to perform mathematical calculations and file operations.

Category
Visit Server

README

Enterprise-MCP

📖 项目简介

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

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

本项目是整个 Enterprise AI 系列项目中的第三个模块,与 Enterprise-RAG、Enterprise-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

🔧 已实现功能

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured