magic-api-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAGIC_API_WEB | No | 管理端路径 | /magic/web |
| MAGIC_API_BASE | Yes | magic-api 地址,如 http://192.168.33.174:31144 | |
| MAGIC_API_TOKEN | No | 静态 token | |
| MAGIC_API_PREFIX | No | 接口路径前缀 | |
| MAGIC_API_PASSWORD | No | 密码 | |
| MAGIC_API_READONLY | No | 只读模式 | false |
| MAGIC_API_USERNAME | No | 账号 | |
| MAGIC_API_HTTP_HOST | No | http 模式监听地址 | 0.0.0.0 |
| MAGIC_API_HTTP_PORT | No | http 模式监听端口 | 3111 |
| MAGIC_API_TRANSPORT | No | stdio 或 http | stdio |
| MAGIC_API_ACCESS_TOKEN | No | http 模式访问令牌 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_groupsB | 列出 magic-api 中所有分组(folder)。 |
| create_groupC | 创建分组。type 默认 api。返回新分组 id。 |
| list_apisB | 列出所有接口,含 id/name/method/path/runPath/group。可按分组名过滤。 |
| get_apiA | 获取接口详情(含脚本)。ref 可为 id、name 或 path。 |
| create_apiA | 创建接口。自动建立缺失分组。返回 id 与完整运行路径 runPath。 |
| update_api_scriptB | 更新接口脚本。ref 可为 id/name/path。 |
| delete_apiC | 删除接口。ref 可为 id/name/path。 |
| run_apiA | 运行(测试)接口。向真实路径发请求并返回 status/headers/body。被测接口的错误不算工具错误。 |
| list_functionsB | 列出所有 magic-script 函数。 |
| get_functionA | 获取函数详情(含脚本)。ref 为 id 或 name。 |
| list_datasourcesB | 列出所有数据源。 |
| magic_script_helpB | 查询 magic-script 用法(db/http/response/env 模块、请求变量、分页、事务等)。 |
| search_codeC | 在所有接口/函数脚本中全局搜索关键词。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 13 tools
Each tool targets a distinct resource or action (e.g., create_api, delete_api, get_api, run_api, search_code, magic_script_help). There is no overlap or ambiguity between tools, as they clearly differentiate between APIs, groups, functions, datasources, and help.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_api, list_groups, update_api_script). Even magic_script_help uses a noun but still fits the style. No mixing of conventions.
13 tools is well-scoped for a server managing APIs, groups, functions, datasources, and scripts. It covers the essential operations without being overwhelming or too sparse.
While CRUD for APIs is covered (create, delete, get, update_script), groups and functions lack update and delete operations. Datasources only have list. The presence of run_api and search_code adds value, but missing lifecycle operations on groups and functions are notable gaps.