magic-api-mcp
This server lets you manage magic-api instances via MCP, covering API lifecycle management, group/function/datasource administration, and built-in magic-script knowledge.
API Management
list_apis– List all interfaces (optionally filter by group)get_api– Retrieve full details (including script) by id, name, or pathcreate_api– Create a new interface; auto-creates missing groupsupdate_api_script– Update the script of an existing interfacedelete_api– Delete an interface by id, name, or pathrun_api– Execute/test an interface, returning status, headers, and body
Group Management
list_groups– List all groups/folderscreate_group– Create a new group with name, path, optional type, and optional parent
Function Management
list_functions– List all magic-script functionsget_function– Get full details of a function by id or name
Datasource Management
list_datasources– List all configured datasources
Knowledge & Search
magic_script_help– Query built-in magic-script documentation by topic (e.g.,db,http, pagination, transactions)search_code– Full-text search across all interface and function scripts
Additional Features
Read-only mode (
MAGIC_API_READONLY=true): disables all write toolsMulti-target support (http mode): manage multiple magic-api instances (e.g., prod/dev) from one deployment
Two transport modes:
stdio(local) andhttp(remote/team-shared)
Allows AI to operate a running magic-api instance, providing tools for API CRUD and execution, group/function/datasource management, and built-in magic-script knowledge.
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., "@magic-api-mcp列出所有接口分组,并查看getUser接口的脚本"
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.
magic-api MCP
让 AI 通过 MCP 操作运行中的 magic-api 实例:接口增删改查 + 运行、分组 / 函数 / 数据源管理,并内置 magic-script 知识。
支持两种部署:
stdio:本地跑,Claude 启动子进程(适合个人开发机)
http:远程服务,全公司 / 团队共用一个(适合集中部署)
安装
cd magic-api-mcp
npm install
npm run buildRelated MCP server: magic-api-mcp-server
配置(环境变量)
变量 | 必填 | 默认 | 说明 |
| 是 | — | magic-api 地址,如 |
| 否 |
| 管理端路径(非默认实例要改,如 |
| 否* | — | 静态 token |
| 否* | — | 账号密码(自动 login) |
| 否 |
| 只读模式,禁用写工具 |
| 否 | 空 | 接口路径前缀 |
| 否 |
|
|
| 否 |
| http 模式监听端口 |
| 否 |
| http 模式监听地址 |
| 否 | — | http 模式访问令牌(Bearer),不设则不鉴权 |
* 鉴权二选一(账号密码优先)。
多 target(一套服务操作多个 magic-api 实例)
如果同一个 MCP 部署需要操作多个 magic-api 实例(如 prod / dev),无需再部署多套,用 MAGIC_API_TARGETS 声明即可。
原理: 目标实例由 URL path 选定(/mcp/<target>),path 写死在 claude mcp add 命令里,整个 session 不可变,AI 没有任何工具能跨 target——选择权完全在人手里。
服务端(多 target 启动):
MAGIC_API_TARGETS=prod,dev \
MAGIC_API_TARGET_PROD_BASE=http://prod-host:9999 \
MAGIC_API_TARGET_PROD_TOKEN=静态令牌 \
MAGIC_API_TARGET_PROD_READONLY=true \
MAGIC_API_TARGET_DEV_BASE=http://dev-host:9999 \
MAGIC_API_TARGET_DEV_USERNAME=admin \
MAGIC_API_TARGET_DEV_PASSWORD=密码 \
MAGIC_API_TRANSPORT=http \
MAGIC_API_ACCESS_TOKEN=团队令牌 \
node dist/index.js每 target 的字段(前缀为 MAGIC_API_TARGET_<NAME>_,NAME 转为大写):
变量 | 必填 | 默认 | 说明 |
| target 必填 | — | magic-api 地址 |
| 否 |
| 管理端路径 |
| 否* | — | 静态 token |
| 否* | — | 账号密码(自动 login) |
| 否 |
| 只读模式 |
| 否 | 空 | 接口路径前缀 |
同事连接(每人按需选 target):
# 连生产
claude mcp add --transport http magic-api-prod http://部署机:3111/mcp/prod \
--header "Authorization: Bearer 团队令牌"
# 连开发
claude mcp add --transport http magic-api-dev http://部署机:3111/mcp/dev \
--header "Authorization: Bearer 团队令牌"target 名仅允许
[A-Za-z0-9_-]+,同一 session 锁定一个 target。不设
MAGIC_API_TARGETS时仍为单 target(legacy 模式),现有部署零改动。stdio 不支持多 target(无 path 路由),设了
MAGIC_API_TARGETS又用 stdio 会启动报错。全局
MAGIC_API_ACCESS_TOKEN守卫所有 path;per-target 隔离由 URL 完成。
模式一:stdio(本地,个人用)
Claude 直接启动本地进程。
Claude Code
claude mcp add magic-api --scope user \
-e MAGIC_API_BASE=http://your-magic-api-host:9999 \
-e MAGIC_API_WEB=/your-app/magic/dev \
-e MAGIC_API_USERNAME=your-username \
-e MAGIC_API_PASSWORD=your-password \
-- node /绝对路径/magic-api-mcp/dist/index.jsClaude Desktop(claude_desktop_config.json)
{
"mcpServers": {
"magic-api": {
"command": "node",
"args": ["/绝对路径/magic-api-mcp/dist/index.js"],
"env": {
"MAGIC_API_BASE": "http://your-magic-api-host:9999",
"MAGIC_API_WEB": "/your-app/magic/dev",
"MAGIC_API_USERNAME": "your-username",
"MAGIC_API_PASSWORD": "your-password"
}
}
}
}模式二:http(远程,团队共用)
在一台服务器(如内网)常驻运行,所有人连同一个地址。凭据集中在服务端,客户端无需知道 magic-api 密码。
直接启动
MAGIC_API_TRANSPORT=http \
MAGIC_API_HTTP_PORT=3111 \
MAGIC_API_ACCESS_TOKEN=团队令牌 \
MAGIC_API_BASE=http://your-magic-api-host:9999 \
MAGIC_API_WEB=/your-app/magic/dev \
MAGIC_API_USERNAME=your-username \
MAGIC_API_PASSWORD=your-password \
node dist/index.js常驻(pm2)
pm2 start dist/index.js --name magic-api-mcp
pm2 save && pm2 startupDocker
docker build -t magic-api-mcp .
docker run -d -p 3111:3111 \
-e MAGIC_API_BASE=http://your-magic-api-host:9999 \
-e MAGIC_API_WEB=/your-app/magic/dev \
-e MAGIC_API_USERNAME=your-username -e MAGIC_API_PASSWORD=your-password \
-e MAGIC_API_ACCESS_TOKEN=团队令牌 \
magic-api-mcp同事的 Claude Code 连接
claude mcp add --transport http magic-api http://部署机:3111/mcp \
--header "Authorization: Bearer 团队令牌"http 模式为无状态(每个请求独立 transport),适合低频管理操作。强烈建议设置
MAGIC_API_ACCESS_TOKEN,否则任何能访问该端口的人都能操作 magic-api。
工具一览
接口:
list_apisget_apicreate_apiupdate_api_scriptdelete_apirun_api分组:
list_groupscreate_group函数:
list_functionsget_function数据源:
list_datasources知识:
magic_script_helpsearch_code
只读模式(MAGIC_API_READONLY=true)下,写工具被隐藏并在调用时拒绝。
冒烟测试
手动脚本(只读,对真实实例):
MAGIC_API_BASE=... MAGIC_API_WEB=... MAGIC_API_USERNAME=... MAGIC_API_PASSWORD=... \
node scripts/smoke.mjs或接进 Claude 后试:「列出所有接口分组,看看 getPrintData 的脚本」。
开发
npm test # 单元 + 集成(73 测试)
npm run dev # tsx 直跑(stdio)
npm run buildAvailable Tools
13 toolscreate_apiA
创建接口。自动建立缺失分组。返回 id 与完整运行路径 runPath。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 接口路径,如 /detail | |
| method | Yes | HTTP 方法,如 GET/POST | |
| name | Yes | ||
| group | Yes | 分组名(不存在则自动创建) | |
| script | Yes | magic-script 脚本 | |
| description | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the auto-creation of missing groups as a side effect and the return of id and runPath. However, it does not address potential destructive behavior (e.g., overwriting existing APIs), permissions required, or error conditions. With no annotations, this carries the full burden but is only partially met.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of three short clauses in one sentence. It is front-loaded with purpose. However, it could be slightly more structured or elaborate on return values for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 6 parameters and no output schema, the description provides core purpose and return info but lacks details on error handling, idempotency, and edge cases (e.g., duplicate path). It is adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 67% description coverage (4 of 6 parameters described). The tool description adds no additional parameter-level meaning; it only mentions the return values. It does not compensate for the two undocumented parameters (name, description). Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb '创建接口' (create API) and the resource, and provides a key side effect '自动建立缺失分组' (auto-create missing groups) and return values. This differentiates it from siblings like create_group.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for creating API endpoints and auto-creating groups, but does not provide explicit guidance on when to use this tool versus alternatives like create_group or run_api. No exclusions or when-not-to-use information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_groupC
创建分组。type 默认 api。返回新分组 id。
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 分组名称 | |
| path | Yes | 分组路径段,如 user | |
| type | No | api | |
| parent | No | 父分组 id,默认 0(根) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses creation and return of new id, but lacks information on permissions, idempotency, error conditions, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very brief, but missing key behavioral details that should be present. Every sentence earns its place but overall under-specified.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool is a group create with 4 params, no output schema, and no annotations, the description is incomplete: lacks constraints, hierarchy explanation, and authentication needs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 75% (missing description for 'type'). Description only restates schema default for type, adding no new meaning for name, path, or parent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action 'create group' and the resource, and distinguishes from sibling tools like list_groups. It also specifies the default type and return value.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., create_api), or any prerequisites or conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_apiC
删除接口。ref 可为 id/name/path。
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must disclose behavioral traits. It only states that the tool deletes and that ref can be various forms, but it does not reveal whether the deletion is permanent, whether confirmation is required, what permissions are needed, or any side effects. Given that this is a destructive operation, more transparency is critical.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise at two sentences. It front-loads the primary action ('Delete interface') and then explains the parameter. There is no wasted text, but it could be slightly more structured with explicit parameter details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (one parameter, no output schema), the description covers the basic purpose and parameter meaning. However, it lacks important context such as irreversibility, authorization requirements, and potential impact on dependent resources. These gaps make it insufficient for an agent to safely invoke the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema describes ref as a required string with no additional details. The description adds that ref can be an id, name, or path, which is useful context beyond the schema. However, it does not specify format, examples, or how to distinguish between these types. With 0% schema description coverage, the description partially compensates but remains minimal.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Delete interface' and specifies that the ref parameter can be id, name, or path. The verb and resource are specific, and in the context of sibling tools like create_api and get_api, it's clear which resource is being deleted. No sibling tool has a similar delete function, so differentiation is not required.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, such as whether the interface must exist first, or suggest what to do before deleting (e.g., using get_api to confirm the correct ref). There is no explanation of when deleting is appropriate or what happens to related resources.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_apiA
获取接口详情(含脚本)。ref 可为 id、name 或 path。
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description does not disclose behavioral traits such as side effects, required permissions, or rate limits. It only notes that the tool includes script in the response.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise, two clauses with no superfluous information. Front-loads the core action and parameter specifics.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple tool with one parameter, but lacks details about return format or what exactly 'details' includes beyond scripts. No output schema means the agent must infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Description adds significant value to the schema by clarifying that 'ref' accepts id, name, or path, which is not evident from the schema alone. With 0% schema description coverage, this compensates well.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it retrieves API details including script, and specifies that 'ref' can be id, name, or path, effectively distinguishing it from sibling tools like 'list_apis' and 'get_function'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives like 'run_api' or 'update_api_script'. Context is implied but not stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_functionA
获取函数详情(含脚本)。ref 为 id 或 name。
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns details including script, but omits any information about read-only nature, permissions, error handling, or side effects. For a read operation, this is minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two short sentences, front-loading the key action and parameter clarification. Every word serves a purpose, and there is no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given there is no output schema, the description should provide insight into return values. It only mentions '包括脚本' (including script), which is incomplete. Details about other fields, error cases, or success indicators are missing, making it insufficient for an agent to fully understand the tool's behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero description coverage for the only parameter 'ref'. The description adds meaning by clarifying that 'ref' can be an id or name, which is valuable for correct invocation. However, it could be enhanced with format examples or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb '获取' (get) and the resource '函数详情' (function details) with the additional qualifier '含脚本' (including script). It also explains that the reference parameter can be an id or name, making the purpose specific and distinguishing it from sibling tools like 'get_api' or 'list_functions'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage (to get function details by ref) but provides no explicit guidance on when to use this tool versus alternatives such as 'list_functions' or 'search_code'. There are no usage exclusions or context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_apisB
列出所有接口,含 id/name/method/path/runPath/group。可按分组名过滤。
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | 分组名(可选) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states it lists and filters, but omits details like permissions, rate limits, response format, or whether it is read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences that front-load the purpose and include key details. Every word adds value with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with no output schema, the description adequately covers the returned fields and filtering capability. Could mention pagination or default behavior if group is omitted, but acceptable given low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single parameter 'group'. The description adds that it can filter by group name, which reiterates the schema description. No additional semantic value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists all APIs with specific fields (id/name/method/path/runPath/group) and supports filtering by group. It distinguishes from sibling tools like get_api (single API) and other list tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., get_api for a single API). The description implies listing all or filtered APIs but doesn't provide explicit usage context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_datasourcesB
列出所有数据源。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description only indicates a read operation (list), but no annotations exist. It does not disclose any behavioral traits beyond listing, such as whether it requires authentication or returns a specific format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at one short sentence. It could be slightly more informative, but it earns its place with no waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with no parameters and no output schema, the description is minimal but sufficient to indicate the action. It could mention the return type or scope, but overall it is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so the schema coverage is 100%. The description adds no parameter information, which is acceptable given the absence of parameters. Baseline 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'list' and resource 'data sources'. It is a single, unambiguous sentence. While it does not explicitly distinguish from sibling tools, the sibling tools are about APIs and groups, so the distinction is implicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives is provided. The description does not mention prerequisites, context, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_functionsB
列出所有 magic-script 函数。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose any behavioral traits beyond the bare purpose. It doesn't mention pagination, sorting, or side effects, leaving the agent to infer behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is efficiently front-loaded with the purpose. No extraneous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of a zero-parameter listing tool, the description is adequate but lacks detail on what information is returned (e.g., names, metadata). It could be more complete by specifying the output structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so schema coverage is 100%. The description adds no extra context about the output format, which would be helpful since there is no output schema. Score at baseline for zero-param tools but could be improved.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('列出所有' meaning 'list all') and the resource ('magic-script 函数' meaning 'functions'). It distinguishes from siblings like get_function and list_apis.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as get_function. The description simply states what it does without contextual cues.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_groupsB
列出 magic-api 中所有分组(folder)。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description lacks behavioral details such as pagination, sorting, or authentication requirements. The agent gets no insight into the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no wasted words. It efficiently conveys the core action and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and minimal description, the tool lacks context about what a 'group' entails, what data is returned, or any usage constraints. This is insufficient for an agent to fully understand the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so schema coverage is 100%. The description adds no parameter information, but baseline is 4 as per rubric for no parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'list' and resource 'groups (folders)' within 'magic-api', effectively distinguishing it from sibling tools like list_apis or list_datasources.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as list_apis or search_code. The description provides no context for decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
magic_script_helpB
查询 magic-script 用法(db/http/response/env 模块、请求变量、分页、事务等)。
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | 主题关键词,如 db / http / 分页 / query |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must disclose behavior. It only states 'query usage' without detailing whether it's read-only, authentication needs, return format, or error cases. Minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence that directly states purpose and scope. No unnecessary words, front-loaded with relevance. Concise and effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple help tool, the description is too brief. It does not specify what the output contains (e.g., text, code snippets, examples) or how errors are handled. Would benefit from more detail on return format.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a good description of 'topic'. The tool description adds example modules (db/http/response/env) but mostly echoes the schema examples, providing little extra semantic value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool queries magic-script usage for specific modules (db/http/response/env, etc.). It is distinct from sibling tools which manage APIs and groups, so agents can differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: use when you need help on magic-script topics. No explicit when-not or alternatives are given, but sibling context makes it clear it's not for resource management.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_apiA
运行(测试)接口。向真实路径发请求并返回 status/headers/body。被测接口的错误不算工具错误。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 完整运行路径,如 /user/list | |
| method | Yes | ||
| params | No | query 参数 | |
| body | No | 请求体(任意 JSON) | |
| headers | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses that errors from the tested API are not tool errors, a key behavioral trait. No annotations provided, so description carries full burden; could add more details like auth requirements or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose, no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Returns status/headers/body but not format details. No output schema to compensate. Could explain structure or error handling more thoroughly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Description does not elaborate on parameters beyond what schema provides. With 60% schema coverage, description should add value but doesn't explain method, body, or headers.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it runs tests by sending requests to real paths and returns status/headers/body. It distinguishes from sibling tools like create_api or get_api by specifying its testing purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implied usage for testing APIs, but no explicit guidance on when not to use it or alternatives among sibling tools like get_api for definitions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_codeC
在所有接口/函数脚本中全局搜索关键词。
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. The description adds minimal behavioral detail: only that search is 'global' and across 'all interface/function scripts'. Lacks specifics on case sensitivity, regex, or scope limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no wasted words. However, it is under-specified for the task; conciseness should not come at the cost of essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, no annotations, and a single parameter with no description, the description is insufficient for an agent to fully understand the tool's behavior and expected results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description mentions 'keyword' in context but provides no explanation of the parameter's format, constraints, or matching behavior. Fails to compensate for absent schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb ('search') and resource ('code in all interface/function scripts'). It distinguishes from sibling tools which are create/delete/list operations, but does not explicitly differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, no exclusions or prerequisites. The description only states the basic function.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_api_scriptB
更新接口脚本。ref 可为 id/name/path。
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | ||
| script | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full burden of behavioral disclosure. It only states 'update' and the ref format, but does not describe mutation behavior, side effects, error handling, or any prerequisites. This is insufficient for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that efficiently communicates the core purpose and a key parameter detail. Every word adds value, making it well-structured and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, no annotations, and low schema coverage, the description is incomplete. It lacks information about return values, error behavior, or update semantics. The tool requires more context for an agent to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds meaning for the 'ref' parameter by specifying it can be id/name/path, but provides no description for the 'script' parameter. This partial coverage is helpful but incomplete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Update API script' and explains that 'ref' can be id/name/path. This gives a specific verb and resource, but does not explicitly differentiate from sibling tools like create_api or delete_api beyond the verb.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: use this tool to update an API script identified by ref. However, no explicit when-to-use, when-not-to-use, or alternatives are mentioned. Siblings like create_api suggest alternative actions, but guidance is not provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
13 tool updates
v0.1.0- First observed
create_api - First observed
create_group - First observed
delete_api - First observed
get_api - First observed
get_function - First observed
list_apis - First observed
list_datasources - First observed
list_functions - First observed
list_groups - First observed
magic_script_help - First observed
run_api - First observed
search_code - First observed
update_api_script
TDQS
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.
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 Connectors
AI-callable tools for API mocking, testing, monitoring, security, and automation.
Build, validate, deploy — HTTP APIs, cron jobs, webhooks and MCP tools — from your AI client.
- mcp-serverOAuthcom.make
Give your AI agents the tools to build, manage, and run automation workflows.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive development tools for Magic-API including documentation lookup, API testing, resource management, debugging with breakpoints, backup operations, and code search capabilities. Enables developers to efficiently build, test, and maintain Magic-API projects through natural language interactions.30MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Magic-API development environment, supporting script syntax query, API management, debugging, and knowledge search for efficient development.MIT
- AlicenseAqualityDmaintenanceExposes Swagger/OpenAPI API documentation to AI models, enabling exploration, search, and interaction with endpoints, schemas, and execution of API calls.14132MIT
- AlicenseNot gradedqualityAmaintenanceEnables LLMs to manage Apifox API projects, including listing, creating, updating, and deleting API endpoints and schemas via natural language.30MIT
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/LynxBay/magic-api-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server