Platform-MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Platform-MCPShow me all tables in the customer database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Platform-MCP
内部 MCP (Model Context Protocol) 能力平台 双 Skill:Database(SQL 执行)+ Server(Linux SSH/SFTP)— 共 11 个 MCP 工具,通过 Claude Code 等调用方远程执行,配备 Web 管理台与全链路审计
项目概览
Platform-MCP 是一个内部 MCP 服务平台,提供:
Database Skill(5 tools):执行本地 SQL 文件 / SQL 文本 / 风险校验 / 数据源列举 / 异步状态查询
Server Skill(6 tools):Linux 远程 Shell 执行 / SFTP 上传下载 / 命令风控校验 / 服务器列举 / 异步状态查询
双传输 MCP Server:stdio(环境变量)+ streamable-http(Header)双入口
API Key 认证:双存储(key_hash SHA-256 校验 + key_encrypted AES-GCM admin reveal)
Web 管理台:数据源管理 + 服务器管理 + 用户管理 + API Key 管理 + 审计日志 + 个人设置
权限控制:admin/developer 双角色,developer 禁 PROD;服务器与数据源各自独立权限
风险引擎:SQL 与 Shell 共用 4 级(LOW/MEDIUM/HIGH/CRITICAL),HIGH+ 需
confirm_token反重放二次确认
Related MCP server: ssh-mcp-server
快速启动
前置要求
Python 3.11.9
PostgreSQL 16.4(系统库)
Oracle 11g / MySQL 5.6(目标库,可选)
后端启动
# 1. 安装依赖
pip install -e ".[dev]"
# 2. 创建本地配置(必填 database.url)
cp settings.yml.example settings.yml
# 编辑 settings.yml,替换 <password> / HOST 为你的 PostgreSQL 实际值
# 3. 准备 PostgreSQL:创建库 + 用户
createdb platform_mcp
psql -d platform_mcp -c "CREATE USER pmcp WITH PASSWORD '<your-password>';"
# 4. 设置 Alembic DB URL(用于 migration;可写入 ~/.bashrc 持久化)
export PLATFORM_DB_URL="postgresql://pmcp:<password>@localhost:5432/platform_mcp"
# 5. 生成 crypto 密钥 + Alembic 升级 + 检查 seed 用户
python scripts/_setup_local.py
# 6. 种 database + server skill 到 pmcp_skill 表
python scripts/_seed_skill.py
# 7. 启动 FastAPI Web(默认端口 8000)
python -m platform_mcp.main
# 8. 启动 MCP Server(mode 由 settings.mcp.transport 决定)
python -m platform_mcp.mcp_server前端启动
cd Platform-MCP-frontend
npm install
npm run dev # 默认端口 5173(占用自动递增)访问 http://localhost:5173,默认账号:admin / admin123
数据库初始化
# 生成加密密钥 + Alembic 升级 + 检查 seed 用户
python scripts/_setup_local.py
# 种 database skill 到 pmcp_skill 表
python scripts/_seed_skill.py技术栈
后端:Python 3.11.9 + FastAPI 0.115.0 + SQLAlchemy 2.0.35 + Alembic 1.13.2 + oracledb 2.4.1 + aiomysql 0.2.0 + asyncssh 2.17.0(Server Skill SSH/SFTP)
前端:Vue 3.5.34 + Vite 8.0.12 + TypeScript 6.0.2 + Element Plus 2.8.1 + Pinia 2.2.2 + Axios 1.7.4
数据库:PostgreSQL 16.4(系统),Oracle 11g / MySQL 5.6(目标)
架构(简化)
Claude Code ──stdio(env PLATFORM_MCP_API_KEY)──▶ MCP Server ──┐
╲ ├──▶ PostgreSQL(系统库,ORM)
╲ │ Oracle / MySQL(Database Skill 目标)
Claude Code ──HTTP(header PLATFORM_MCP_API_KEY)──▶ ──┤ Linux SSH/SFTP(Server Skill 目标)
│
Browser ──HTTP(session cookie)──▶ FastAPI Web ──┘目录结构
Platform-MCP/
├── platform_mcp/ # 后端代码
│ ├── api/ # FastAPI 路由(11 模块,含 servers)
│ ├── auth/ # 认证鉴权 + API Key
│ ├── datasource/ # 数据源管理(DB Skill 目标)
│ ├── server/ # 服务器管理(Linux SSH 目标,Server Skill 用)
│ ├── skills/
│ │ ├── database/ # Database Skill(5 tools:SQL 执行 + 风控)
│ │ ├── server/ # Server Skill(6 tools:SSH/SFTP + 风控)
│ │ └── common/ # 共享风控类型(risk_types + permission)
│ ├── mcp_server/ # MCP 协议 + 双传输 + 上下文/审计
│ ├── audit/ # 审计日志
│ └── common/ # 公共组件(database / crypto / response / 等)
├── platform-mcp-frontend/ # 前端代码(Vue 3,9 业务页面含服务器管理)
├── tests/ # 后端测试(525 用例)
├── scripts/ # 工具脚本
├── alembic/ # 数据库迁移
├── documents/ # 设计文档文档索引
文档 | 说明 |
| Claude Code 工作指南(项目整体原则) |
| 技术架构(权威来源) |
| 编码规范 |
| 生产部署 |
| 测试策略 |
| 文档审核规则(嵌入 CLAUDE.md) |
| UI 原型(单文件 HTML) |
版本迭代
基线 V1.0 = 2026-08-08。后续生产发布(含 hotfix、迭代版本、配置类变更上线)必须在此表追加一行——详见
CLAUDE.md §部署原则 #10。
版本 | 日期 | 类型 | 摘要 | 修改人 |
V1.0.1 | 2026-08-09 | hotfix | 审计日志失败记录完整性增强(合并两次细粒度修复为同日 hotfix):(1)error_code 强制捕获—— | castle |
V1.0 | 2026-08-08 | 基线发布 | 一期 + Server Skill 二期专项全量上线:11 MCP tools(database 5 + server 6)、15 系统表、9 前端页面、双传输 MCP(stdio + streamable-http)、API Key 双存储(hash + encrypted) | castle |
测试
# 后端(525 用例,覆盖率 95.96%)
python -m pytest tests/ --ignore=tests/performance --cov=platform_mcp
mypy platform_mcp/ # 类型检查(V1.0 新增)
# 前端(110 用例)
cd Platform-MCP-frontend
npm run test配置
文件 | 用途 | 来源 |
| 基础配置(database.url 等,必填) | 从 |
| dev 环境覆盖(已含) | 已追踪,按需修改 |
| prod 环境覆盖 | 从 |
| AES 密钥(32 raw bytes) |
|
| Alembic migration 配置 | 已追踪;DB URL 占位,可用 |
许可
本项目基于 MIT License 开源,详见 LICENSE。
第三方依赖开源许可
本项目使用以下开源组件,各组件遵循其原始许可协议:
类别 | 组件 | 许可协议 |
后端框架 | FastAPI、Pydantic、SQLAlchemy、Alembic、Uvicorn、Gunicorn、loguru | MIT |
数据库驱动 | oracledb | Apache 2.0 |
aiomysql | MIT | |
psycopg2-binary | LGPL-3.0 | |
加密 | cryptography | Apache-2.0 OR BSD-3-Clause |
HTTP 客户端 | httpx | BSD-3-Clause |
MCP 协议 | mcp SDK | MIT |
配置/工具 | PyYAML、tenacity、sqlparse | MIT / BSD / Apache-2.0 |
前端框架 | Vue、Vite、Pinia、Vue Router、Axios | MIT |
类型系统 | TypeScript | Apache-2.0 |
UI 组件库 | Element Plus | MIT |
商业数据库许可说明
Platform-MCP 支持连接 Oracle 11g 与 MySQL 5.6 作为目标数据库,使用方需自行获取相应数据库的合法授权与许可,本项目不包含也不提供任何商业数据库的许可。Oracle 驱动(oracledb)的 thick 模式依赖 Oracle Instant Client,需另行下载并遵守 Oracle 的许可协议。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that enables Claude to manage infrastructure across Kubernetes, Docker, Prometheus, and Terraform through natural language. It provides over 42 specialized tools with a safety-first design, including risk-based command classification and audit logging.43MIT
- Alicense-qualityDmaintenanceAn MCP server that enables remote SSH command execution and bidirectional file transfers through a standardized interface. It allows AI assistants to securely manage remote servers while keeping credentials isolated and applying command-level security controls.ISC
- Alicense-qualityAmaintenanceAn MCP server enabling Claude to execute commands on multiple remote servers via SSH and transfer large files (40GB+) with resume support via SFTP.2313MIT
- Alicense-qualityAmaintenanceMCP server enabling AI assistants to securely operate remote servers via persistent SSH sessions, with tools for command execution, file transfer, directory listing, and system monitoring.2MIT
Related MCP Connectors
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/CastleZJC/Platform-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server