mcp-mysql-apifox
This server provides a multi-purpose toolkit integrating MySQL database operations, Apifox API management, HTTP request execution, and FTP file operations.
Read-Only MySQL (
execute_mysql_readonly): Execute read-only statements (SELECT, SHOW, DESCRIBE, etc.) using a DSN connection string — write operations are blocked.Full MySQL Execution (
execute_mysql_only): Execute any MySQL statement (INSERT, UPDATE, DELETE, DDL, etc.) using a DSN connection string, with automatic retry on failure.Import OpenAPI to Apifox (
import_openapi): Import OpenAPI specifications into Apifox from a JSON string, a single JSON file, or a directory of JSON files, using a project ID and API key.Download APIs from Apifox (
download_apis): Download all API definitions from an Apifox project (OpenAPI 3.1 format) to a specified local directory, requiring a project ID and API key.Execute cURL Commands (
run_curl): Parse and execute curl command strings, returning full HTTP response details (status code, headers, body).FTP/FTPS/SFTP File Operations: Connect to remote servers and perform file management including listing, uploading, downloading, deleting, renaming, reading, writing, and managing directories and permissions.
Help (
help): Get assistance on any topic or task.
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., "@mcp-mysql-apifoxShow me the first 10 users from the 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.
主要功能
不同项目连接不同
在 Mysql 数据库执行 SQL
添加接口文档到 Apifox
从 Apifox 下载所有API到本地文件
解析并执行 curl 命令
通过 FTP、FTPS 或 SFTP 操作项目关联的远程目录
FTP 实现参考并整合自 kemalabuteliyte/ftp-mcp,连接配置已改为本项目的 .env.mma 工作流。
Related MCP server: Apifox MCP
安装与使用
配置MCP服务
{ "mcpServers": { "mysql-apifox": { "command": "npx", "args": [ "-y", "mcp-mysql-apifox" ] } } }使用数据库、Apifox 或 FTP 前,必须在
projectRoot(项目根目录绝对路径)创建并填写.env.mma。首次调用如果发现该文件不存在,会生成空模板并返回待填写项;填写完成后再重试。# 数据库 DB_HOST=127.0.0.1 DB_PORT=3306 DB_USER=user DB_PASSWORD=password DB_NAME=database # Apifox APIFOX_API_KEY= APIFOX_PROJECT_ID= # FTP / FTPS / SFTP FTP_HOST= FTP_PORT= FTP_PROTOCOL= FTP_USERNAME= FTP_PASSWORD= FTP_PRIVATE_KEY_PATH= FTP_PASSPHRASE=FTP_PROTOCOL留空时默认为ftp,FTP_PORT留空时 FTP 使用端口21;使用ftps或sftp时请分别填写对应协议和端口。.env.mma已加入.gitignore,不要提交其中的凭据。建议在项目规则中定义
- 数据库、Apifox 和 FTP 操作均传入项目根目录绝对路径 `projectRoot`,凭据只从 `projectRoot/.env.mma` 读取。 - 接口文档管理规范(注意必须在明确"创建/更新接口文档"时才操作): - 使用 import_openapi 工具导入,项目信息: - 项目ID: <apiFox项目id> - API密钥: <apiFox密钥> - 保存接口根路径: `.apiDoc`目录 - 接口文件规范: - 文件位置在保存接口根路径下 - 目录结构:按 tags 属性数组顺序创建子目录 - 文件命名:使用 summary 属性值,格式为 JSON - 每次仅允许导入单个接口文件。
可用命令
execute_mysql
执行 MySQL 语句,使用项目根目录中的数据库连接信息。
参数:
projectRoot: 项目根目录绝对路径sql: 要执行的SQL语句params: SQL查询参数(可选)
import_openapi
导入OpenAPI数据到Apifox。
参数:
input: JSON、YAML或X-YAML格式的OpenAPI数据字符串,或文件路径projectRoot: 项目根目录绝对路径(读取 Apifox 配置)
download_apis
从Apifox下载所有API到本地文件。
参数:
projectRoot: 项目根目录绝对路径;文件下载到.apiDoc
功能说明:
下载完整的OpenAPI 3.1规范文档
run_curl
解析并执行curl命令,返回HTTP请求结果。
参数:
curl: curl命令字符串
功能说明:
自动解析curl命令中的URL、HTTP方法、请求头、请求体等信息
返回完整的响应信息,包括状态码、响应头和响应数据
支持所有标准的curl参数和选项
FTP 命令
先调用 ftp_connect(projectRoot, connection?)。随后可使用 ftp_list、ftp_cd、ftp_upload、ftp_download、ftp_delete、ftp_rename、ftp_read、ftp_write、ftp_append、ftp_stat、ftp_exists、ftp_mkdir、ftp_rmdir 和 ftp_chmod。上传和下载支持绝对路径;相对本地路径以 projectRoot 解析。
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
- AlicenseCqualityDmaintenanceAn MCP server that enables MySQL database integration with Claude. You can execute SQL queries and manage database connections.29MIT
- AlicenseCqualityCmaintenanceAn MCP server that integrates Apifox API documentation with AI assistants, allowing AI to extract and understand API information from Apifox projects.227ISC
- AlicenseNot gradedqualityDmaintenanceMCP server for connecting to databases (PostgreSQL, MySQL, SQL Server, Redis) enabling SQL queries, table exploration, and Redis key-value operations.1MIT
- AlicenseAqualityDmaintenanceMCP server that provides 22 tools to manage Apidog API documentation, including importing OpenAPI specs, exporting, diffing, analyzing, and bulk-editing endpoints.22262MIT
Related MCP Connectors
MCP server for interacting with the Supabase platform
MCP server for AI access to Swagger by SmartBear.
MCP server for managing Prisma Postgres.
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/327100395/mcp-mysql-apifox'
If you have feedback or need assistance with the MCP directory API, please join our Discord server