webapi
(一键将传统业务系统转换成智能体)支持将传统的WebAPI,转换成MCP工具的mcp服务器
claude mcp add --transport stdio yinzhouzhi-webapi-mcp-server npx -y @yinzhouzhi/webapi-mcp-server start
How to use
This MCP server converts traditional Web APIs into MCP tools, enabling batch registration of API definitions and centralized control of default request headers. It supports loading API definitions from JSON or Markdown files or directories, and allows dynamic registration and removal at runtime. Core MCP tools exposed by the server include: register_web_api for registering a Web API as an MCP tool, set_default_headers to apply global headers to all requests, list_registered_apis to view current registrations, unregister_api to remove a registered API, and load_api_from_file/load_apis_from_directory/load_from_config to bulk-import definitions from files, directories, or config. Start by running the server, then use these tools to register your APIs and manage global headers for consistent behavior across all API calls.
How to install
Prerequisites:
- Node.js and npm installed
- Basic familiarity with npm/yarn and CLI usage
Installation steps:
-
Clone the repository (or install from npm if provided): git clone <repository-url> cd webapi-mcp-server
-
Install dependencies: npm install
-
Initialize project directory (if applicable): npm run setup
-
Start the server (default): npm start
-
Optional: run with a custom config or API directory: npm start -- --config path/to/config.json --apis-dir path/to/apis
Environment variables you can use:
- WEBAPI_CONFIG_FILE: path to the config file
- WEBAPI_APIS_DIR: directory containing API definitions
- WEBAPI_DEBUG: enable debugging (true/false)
If you need to run with a specific MCP configuration, you can also use the provided mcp_config snippet to start via npx as shown in the repository’s usage example.
Additional notes
Tips and notes:
- The server supports JSON, YAML, and YML configuration formats for API definition loading.
- Global headers defined in the config are merged with per-API headers when requests are made.
- You can dynamically register or unregister APIs at runtime without redeploying the server.
- Use load_from_config to load multiple APIs and settings from a single config file for convenience.
- Ensure API definitions include essential fields such as name, description, url, and method for MCP tooling to function correctly.
- If you encounter issues with environment variables, double-check that the variable names match those listed in the README and that you restart the server after changes.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.