mcp-server-apidebug
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-server-apidebugDebug GET /api/users?page=1&limit=10"
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.
mcp-server-apidebug
English
MCP Server for API Debugging
A standalone MCP (Model Context Protocol) server for API debugging, login authentication, API configuration management, and indexed API execution.
Features
api_config: Manage API debugging configuration, Base URL, common Headers, and API list
api_debug: Execute API requests directly, supports GET/POST/PUT/DELETE/PATCH methods, query parameters, headers, body, automatic Content-Type detection
api_execute: Execute requests by index saved in api_config
api_login: Execute login requests based on environment variables
api_help: View API debugging tool documentation and examples
Installation
Global installation (Recommended):
npm install -g @liangshanli/mcp-server-apidebugLocal installation:
npm install @liangshanli/mcp-server-apidebugLocal Development
npm startOr start the server directly:
node src/server.jsQuick Self-Test
npm testThis will output the MCP tools/list result.
Environment Variables
Variable | Default | Description |
|
| Project directory; uses current directory when not set |
|
| Tool name prefix; default tools are |
| empty | Optional config directory override; generally not needed. When not set, uses |
| empty | API base URL; when configured, no need to set |
|
| Allowed HTTP methods, comma-separated |
|
| Login API URL |
|
| Login API method |
|
| Login request body, supports JSON string or plain string |
| empty | Login tool description |
|
| Header name for user ID (extracted from login response) |
MCP Configuration Example
{
"servers": {
"apidebug": {
"command": "npx",
"args": [
"@liangshanli/mcp-server-apidebug"
],
"env": {
"API_DEBUG_BASE_URL": "https://api.example.com",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE,PATCH",
"API_DEBUG_LOGIN_URL": "/api/user/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"your_username\",\"password\":\"your_password\"}",
"API_DEBUG_LOGIN_USER_HEADER": "new-api-user",
"API_DEBUG_LOGIN_DESCRIPTION": "Execute login requests based on environment variables. Use api_config interface to handle login configuration after successful login."
}
}
}
}Configuration Storage
Default storage path:
{PROJECT_PATH}/.setting/{TOOL_PREFIX}/api.jsonIf PROJECT_PATH is not set, defaults to .; if TOOL_PREFIX is not set, defaults to default.
Usage Examples
Set Base URL:
{
"action": "updateBaseUrl",
"baseUrl": "https://api.example.com"
}Debug an API:
{
"url": "/api/users",
"method": "GET",
"query": {
"page": 1,
"limit": 10
}
}Add an API and execute by index:
{
"action": "addApi",
"api": {
"url": "/api/login",
"method": "POST",
"body": {
"username": "admin",
"password": "123456"
}
}
}{
"index": 0
}Related MCP server: Postmancer
中文
API 调试 MCP 服务器
独立运行的 MCP (Model Context Protocol) 服务器,用于 API 调试、登录认证、API 配置管理和按索引执行 API 请求。
工具列表
api_config:管理 API 调试配置、Base URL、公共 Headers 和接口列表
api_debug:直接执行 API 请求,支持 GET/POST/PUT/DELETE/PATCH 方法、query 参数、headers、body,自动检测 Content-Type
api_execute:按
api_config中保存的接口索引执行请求api_login:根据环境变量执行登录请求
api_help:查看 API 调试工具说明和示例
安装依赖
全局安装(推荐):
npm install -g @liangshanli/mcp-server-apidebug本地安装:
npm install @liangshanli/mcp-server-apidebug本地运行
npm start或直接启动 server:
node src/server.js快速自检
npm test会输出 MCP tools/list 结果。
环境变量
变量 | 默认值 | 说明 |
|
| 项目目录;不设置时使用当前目录 |
|
| 工具名前缀;默认工具名为 |
| 空 | 可选覆盖配置目录;一般不需要设置。未设置时使用 |
| 空 | API 基础 URL;配置后无需再通过 |
|
| 允许执行的 HTTP 方法,逗号分隔 |
|
| 登录接口 URL |
|
| 登录接口方法 |
|
| 登录请求体,支持 JSON 字符串或普通字符串 |
| 空 | 登录工具说明 |
|
| 用户 ID 的 Header 名称(从登录响应中提取) |
MCP 配置示例
{
"servers": {
"apidebug": {
"command": "npx",
"args": [
"@liangshanli/mcp-server-apidebug"
],
"env": {
"API_DEBUG_BASE_URL": "https://api.example.com",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE,PATCH",
"API_DEBUG_LOGIN_URL": "/api/user/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"your_username\",\"password\":\"your_password\"}",
"API_DEBUG_LOGIN_USER_HEADER": "new-api-user",
"API_DEBUG_LOGIN_DESCRIPTION": "根据环境变量执行登录请求。使用 api_config 接口处理登录成功后的配置。"
}
}
}
}配置保存路径
默认保存目录规则:
{PROJECT_PATH}/.setting/{TOOL_PREFIX}/api.json如果 PROJECT_PATH 不设置,则默认 .;如果 TOOL_PREFIX 不设置,则默认 default。
使用示例
设置 Base URL:
{
"action": "updateBaseUrl",
"baseUrl": "https://api.example.com"
}调试接口:
{
"url": "/api/users",
"method": "GET",
"query": {
"page": 1,
"limit": 10
}
}添加接口后按索引执行:
{
"action": "addApi",
"api": {
"url": "/api/login",
"method": "POST",
"body": {
"username": "admin",
"password": "123456"
}
}
}{
"index": 0
}Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/liliangshan/mcp-server-apidebug'
If you have feedback or need assistance with the MCP directory API, please join our Discord server