Enterprise MCP Server

Enterprise MCP Server

A single MCP server that exposes safe, permission-checked tools for AI assistants to reach file systems, databases, APIs, Git, cloud services, and business applications.

Category
访问服务器

README

Enterprise MCP Server

A single MCP server that exposes safe, permission-checked "tools" for AI assistants (Claude, ChatGPT, etc.) to reach:

  • File systems (local / mounted directories)
  • Databases (SQL, via SQLAlchemy — works with Postgres/MySQL/SQLite)
  • APIs (generic authenticated REST calls)
  • Git repositories (read commits, files, branches; create branches/commits)
  • Cloud services (AWS S3 example, swappable for Azure Blob / GCS)
  • Business applications (Jira example, template for SAP/Salesforce)

The AI never talks to SAP, Postgres, GitHub, or S3 directly. It only talks to this server, and this server enforces auth, permissions, and logging before touching the real system.

Claude / ChatGPT
      │  (MCP protocol, stdio or HTTP)
      ▼
 Enterprise MCP Server  (this project)
      │
      ├── auth.py        → who is calling, what can they do
      ├── logger.py       → audit trail of every tool call
      └── tools/
            ├── filesystem_tools.py
            ├── database_tools.py
            ├── api_tools.py
            ├── git_tools.py
            ├── cloud_tools.py
            └── business_tools.py   (Jira example)

1. Install

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # then fill in real credentials

2. Configure

Edit .env:

# Filesystem
FS_ROOT=/data/shared            # AI can only read/write inside this folder

# Database
DB_URL=postgresql://user:pass@host:5432/dbname

# Generic API
API_BASE_URL=https://api.example.com
API_TOKEN=xxxxx

# Git
GIT_REPO_PATH=/data/repos/my-repo

# Cloud (AWS S3 example)
AWS_ACCESS_KEY_ID=xxxx
AWS_SECRET_ACCESS_KEY=xxxx
AWS_BUCKET=my-bucket
AWS_REGION=us-east-1

# Jira (business app example)
JIRA_BASE_URL=https://yourcompany.atlassian.net
JIRA_EMAIL=bot@yourcompany.com
JIRA_API_TOKEN=xxxx

# Server auth — tokens allowed to call this MCP server, mapped to roles
MCP_TOKENS_JSON={"finance-token-123":"finance","hr-token-456":"hr","admin-token-789":"admin"}

Never commit .env. Only .env.example (with fake values) goes into git.

3. Run

python server.py

By default this runs over stdio — the standard way Claude Desktop / Claude Code launch local MCP servers. To expose it over HTTP for remote clients, see server.py — there's a commented-out mcp.run(transport="streamable-http") block.

4. Point an MCP client at it

Claude Desktop / Claude Code (claude_desktop_config.json or .mcp.json):

{
  "mcpServers": {
    "enterprise": {
      "command": "python",
      "args": ["/absolute/path/to/mcp-enterprise-server/server.py"],
      "env": {
        "MCP_CALLER_TOKEN": "finance-token-123"
      }
    }
  }
}

5. How permissions work here

Every tool call goes through auth.require_permission(role, action) before touching a real system. Roles and their allowed actions live in auth.py -> ROLE_PERMISSIONS. This is intentionally simple (a Python dict) — swap it for OAuth2/Entra ID + a real policy engine (OPA, Casbin) once you move past prototyping. See "Hardening for production" below.

Every call is also written to audit.log via logger.py, with: timestamp, caller role, tool name, arguments (redacted), and result status.

6. Adding a new connector (e.g. Salesforce, SAP)

  1. Create tools/salesforce_tools.py, following the pattern in tools/business_tools.py (Jira). Wrap the vendor SDK/REST calls in plain Python functions that return JSON-serializable data.
  2. In server.py, import the module and register each function with @mcp.tool().
  3. Add required permission checks (auth.require_permission(...)) inside each function, not just at the top-level route — defense in depth.
  4. Add new env vars to .env.example and config.py.
  5. Add an entry to auth.ROLE_PERMISSIONS for who can call it.

7. Hardening for production (do this before connecting real enterprise data)

  • [ ] Replace the static token map in auth.py with real OAuth 2.0 / Microsoft Entra ID / SAML, validating short-lived JWTs.
  • [ ] Terminate the server behind HTTPS/TLS (reverse proxy: nginx/Caddy), never plain HTTP.
  • [ ] Move audit.log into a real log pipeline (ELK, Splunk, CloudWatch) with tamper-evidence / write-once storage.
  • [ ] Add rate limiting per caller (e.g. slowapi if using HTTP transport).
  • [ ] Store secrets in a vault (AWS Secrets Manager, HashiCorp Vault, Azure Key Vault) — not in .env on disk.
  • [ ] Restrict FS_ROOT and DB credentials to least privilege — a read-only DB user for read tools, a separate write-scoped user for write tools.
  • [ ] Add automated tests per tool (see tests/ — start one per connector).
  • [ ] Run periodic dependency updates + a security scan (pip-audit, npm audit).
  • [ ] Penetration test before go-live, especially the auth boundary.

Project layout

mcp-enterprise-server/
├── README.md
├── requirements.txt
├── .env.example
├── config.py            # loads env vars
├── auth.py               # token → role, role → permissions
├── logger.py              # audit logging
├── server.py               # MCP server entrypoint, registers all tools
└── tools/
    ├── __init__.py
    ├── filesystem_tools.py
    ├── database_tools.py
    ├── api_tools.py
    ├── git_tools.py
    ├── cloud_tools.py
    └── business_tools.py

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选