Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

MCP server for executing MySQL SQL, managing Apifox API documentation, and parsing/executing curl commands.

README.md

主要功能

  • 不同项目连接不同
  • 在 Mysql 数据库执行 SQL
  • 添加接口文档到 Apifox
  • 从 Apifox 下载所有API到本地文件
  • 解析并执行 curl 命令
  • 通过 FTP、FTPS 或 SFTP 操作项目关联的远程目录

FTP 实现参考并整合自 kemalabuteliyte/ftp-mcp,连接配置已改为本项目的 .env.mma 工作流。

安装与使用

  1. 配置MCP服务
    {
      "mcpServers": {
        "mysql-apifox": {
          "command": "npx",
          "args": [
              "-y",
              "mcp-mysql-apifox"
          ]
        }
      }
    }
  1. 使用数据库、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 留空时默认为 ftpFTP_PORT 留空时 FTP 使用端口 21;使用 ftpssftp 时请分别填写对应协议和端口。

.env.mma 已加入 .gitignore,不要提交其中的凭据。

  1. 建议在项目规则中定义
         - 数据库、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_listftp_cdftp_uploadftp_downloadftp_deleteftp_renameftp_readftp_writeftp_appendftp_statftp_existsftp_mkdirftp_rmdirftp_chmod。上传和下载支持绝对路径;相对本地路径以 projectRoot 解析。

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Databases servers.