What is A FastMCP server that dynamically creates MCP servers from web API configurations.?
APIWeaver is 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. It supports dynamic API registration, multiple authentication methods, all HTTP methods, flexible parameters, automatic tool generation, built-in testing, response handling, and multiple transport types.
Documentation
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.
Features
๐ Dynamic API Registration: Register any web API at runtime
๐ Multiple Authentication Methods: Bearer tokens, API keys, Basic auth, OAuth2, and custom headers
๐ ๏ธ All HTTP Methods: Support for GET, POST, PUT, DELETE, PATCH, and more
There are several ways to run the APIWeaver server with different transport types:
1. After installation (recommended):
If you have installed the package (e.g., using pip install . from the project root after installing requirements):
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
2. Directly from the repository (for development):
python -m apiweaver.cli run [OPTIONS]
Transport Options:
--transport: Choose from stdio (default), sse, or streamable-http
--host: Host address for HTTP transports (default: 127.0.0.1)
--port: Port for HTTP transports (default: 8000)
--path: URL path for MCP endpoint (default: /mcp)
Run apiweaver run --help for all available options.
Using with AI Assistants (like Claude Desktop)
APIWeaver is designed to expose web APIs as tools for AI assistants that support the Model Context Protocol (MCP). Here's how to use it:
Start the APIWeaver Server:
For modern MCP clients (recommended):
apiweaver run --transport streamable-http --host 127.0.0.1 --port 8000
For legacy compatibility:
apiweaver run --transport sse --host 127.0.0.1 --port 8000
For local desktop applications:
apiweaver run # Uses STDIO transport
Configure Your AI Assistant:
The MCP endpoint will be available at:
Streamable HTTP: http://127.0.0.1:8000/mcp
SSE: http://127.0.0.1:8000/mcp
STDIO: Direct process communication
Register APIs and Use Tools:
Once connected, use the built-in register_api tool to define web APIs, then use the generated endpoint tools.
Core Tools
The server provides these built-in tools:
register_api - Register a new API and create tools for its endpoints
list_apis - List all registered APIs and their endpoints
unregister_api - Remove an API and its tools
test_api_connection - Test connectivity to a registered API
call_api - Generic tool to call any registered API endpoint
get_api_schema - Get schema information for APIs and endpoints