Get the FREE Ultimate OpenClaw Setup Guide →

APIWeaver

A FastMCP server that dynamically creates MCP (Model Context Protocol) servers from web API configurations. This allows you to easily integrate any REST API, GraphQL endpoint, or web service into an MCP-compatible tool that can be used by AI assistants like Claude.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio gongrzhe-apiweaver uvx apiweaver run

How to use

APIWeaver is a FastMCP server that dynamically creates MCP-compatible tools from web API configurations. It exposes built-in tools to register external APIs as MCP endpoints, test connectivity, list registered APIs, unregister APIs, and call any registered endpoint. Once started (via the Streamable HTTP transport, SSE, or STDIO), you connect your MCP client to the server and use the provided tools to define and manage API integrations. The server automatically generates an individual MCP tool for each API endpoint, enabling AI assistants to discover and invoke REST, GraphQL, or other web services through a consistent MCP interface.

Core tools include: register_api to register a new API and generate endpoint tools; list_apis to inspect all registered APIs and their endpoints; unregister_api to remove an API and its tools; test_api_connection to verify connectivity to a registered API; call_api as a generic tool to invoke any registered endpoint; and get_api_schema to obtain schema information for APIs and endpoints. After registering an API, you can invoke its endpoints using the corresponding MCP tools, supplying parameters, headers, and authentication as configured.

How to install

Prerequisites:

  • Python 3.9+ and pip
  • Git (optional if cloning from GitHub)

Step-by-step installation:

  1. Clone or download the repository to your machine: git clone https://github.com/<your-organization>/APIWeaver.git cd APIWeaver

  2. (Optional) Create and activate a virtual environment: python -m venv venv source venv/bin/activate # on macOS/Linux venv\Scripts\activate # on Windows

  3. Install Python dependencies: pip install -r requirements.txt

  4. Run the server (example using STDIO transport by default or Switch to HTTP transport as needed):

    STDIO (default for local tooling)

    apiweaver run

    Streamable HTTP transport (recommended for web deployments)

    apiweaver run --transport streamable-http --host 127.0.0.1 --port 8000

    SSE transport (legacy compatibility)

    apiweaver run --transport sse --host 127.0.0.1 --port 8000

Notes:

  • If you installed the package from a local clone, you can also run directly from the repository: python -m apiweaver.cli run [OPTIONS]
  • Ensure the host/port you choose are accessible to your MCP clients and that any required firewalls permit traffic.

Additional notes

Tips and caveats:

  • The preferred deployment is the Streamable HTTP transport for modern MCP clients, as it enables bidirectional streaming and better error handling over HTTP.
  • For local development, STDIO transport is convenient as it uses direct process communication.
  • You can register multiple APIs; each endpoint becomes an independent MCP tool. Use get_api_schema to understand the available endpoints and their parameters.
  • Authentication methods supported include Bearer tokens, API keys (header or query param), Basic auth, OAuth2, and custom headers. Configure these in the API configuration under the auth field.
  • If you encounter connectivity issues, verify host/port exposure for HTTP transports and ensure required network access to the target APIs.
  • Use test_api_connection to quickly validate connectivity to a registered API before relying on it in production workflows.

Related MCP Servers

Sponsor this space

Reach thousands of developers