magic-api
Magic-API MCP Server - A Model Context Protocol server for Magic-API development
claude mcp add --transport stdio dwsy-magic-api-mcp-server uvx magic-api-mcp-server@latest --transport stdio \ --env LOG_LEVEL="INFO" \ --env MAGIC_API_WS_URL="ws://127.0.0.1:10712/magic/web/console" \ --env MAGIC_API_BASE_URL="http://127.0.0.1:10712" \ --env MAGIC_API_TIMEOUT_SECONDS="30.0"
How to use
Magic-API MCP Server 为 Magic-API 提供一套基于 MCP (Model Context Protocol) 的开发协作与交互能力。通过该服务器,开发者可以使用内置的工具集来进行脚本编写、API 管理、调试和部署工作流,提升跨系统协作的连贯性和可追溯性。使用时,先启动服务器并确保环境变量正确配置,随后通过 MCP 客户端调用相应的工具 prompts、资源管理和调试接口,以实现 API 脚本生成、资源创建、以及实时调试等能力。核心工具包括 DocumentationTools、ApiTools、ResourceManagementTools、QueryTools、DebugTools、BackupTools 等,覆盖从知识查询到资源管理的全链路。你可以通过 MCP 提供的 prompts 模板快速生成专业的开发助手提示词,或按需组合工具以适配不同场景(如开发、测试、生产运维等)。
How to install
Prerequisites:
- 安装 Python 及 pip,或在系统路径中确保可用的 uv 工具。
- 具备网络环境以从 npm/yarn 注册源获取依赖。
安装与启动步骤:
-
安装 uv(推荐方式,若已安装可跳过) pip install uv
-
安装项目依赖并同步环境(通过 uv) uv sync 或安装 fastmcp uv add fastmcp
-
获取并使用 MCP 服务器配置(基于 README 提供的示例) 将以下配置加入你的 MCP 客户端配置文件中: { "mcpServers": { "magic-api-mcp-server": { "command": "uvx", "args": ["magic-api-mcp-server@latest", "--transport", "stdio"], "timeout": 600, "env": { "MAGIC_API_BASE_URL": "http://127.0.0.1:10712", "MAGIC_API_WS_URL": "ws://127.0.0.1:10712/magic/web/console", "MAGIC_API_TIMEOUT_SECONDS": "30.0", "LOG_LEVEL": "INFO" } } } }
-
启动 MCP 服务器(具体取决于你的环境与配置管理方式) 运行上一步中的命令/脚本以启动 uvx 服务器,并验证日志输出是否显示正常启动信息。
Additional notes
提示与常见问题:
- 确保环境变量 MAGI C_API_BASE_URL / MAGI C_API_WS_URL 设置正确,且后端 Magic-API 服务在对应端口可访问。
- 在需要时调整 MAGI C_API_TIMEOUT_SECONDS 与 LOG_LEVEL(>INFO 可能帮助调试)。
- MCP 服务器默认使用 stdio 传输,若你需要其他传输方式,请参考高级配置示例并更新 transport/沟通通道。
- 如果遇到 JSON 配置解析错误,请确保 JSON 语法有效且无多余逗号。
- 资源管理工具和 API 调用工具需正确授权/认证,遇到权限错误时请检查认证配置。
- 详细工具文档与示例,请使用 DocumentationTools 及 ApiTools 的内置查询命令。
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP