Back to catalog

APIWeaver MCP Server

A FastMCP server that dynamically creates MCP servers from web API configurations, making it easy to integrate any REST API, GraphQL endpoint, or web service into MCP-compatible tools for AI assistants.

A FastMCP server that dynamically creates MCP servers from web API configurations, making it easy to integrate any REST API, GraphQL endpoint, or web service into MCP-compatible tools for AI assistants.

Installation

From Source Code

# Clone or download this repository
cd ~/Desktop/APIWeaver

# Install dependencies
pip install -r requirements.txt

Command Line

# Default STDIO transport
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

Development

# From the root of the repository
python -m apiweaver.cli run [OPTIONS]

Configuration

Claude Desktop (UVX)

{
  "mcpServers": {
    "apiweaver": {
      "command": "uvx",
      "args": ["apiweaver", "run"]
    }
  }
}

Claude Desktop (Streamable HTTP)

{
  "mcpServers": {
    "apiweaver": {
      "command": "apiweaver",
      "args": ["run", "--transport", "streamable-http", "--host", "127.0.0.1", "--port", "8000"]
    }
  }
}

Claude Desktop (STDIO)

{
  "mcpServers": {
    "apiweaver": {
      "command": "apiweaver",
      "args": ["run"]
    }
  }
}

Available Tools

Tool Description
register_api Registers a new API and creates tools for its endpoints
list_apis Lists all registered APIs and their endpoints
unregister_api Removes an API and its tools
test_api_connection Tests the connection to a registered API
call_api Universal tool for calling any registered API endpoint
get_api_schema Retrieves schema information for an API and its endpoints

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
  • Flexible Parameters - Query parameters, path parameters, headers, and request bodies
  • Automatic Tool Generation - Each API endpoint becomes an MCP tool
  • Built-in Testing - Test API connections before using them
  • Response Handling - Automatic JSON parsing with text fallback
  • Multiple Transport Types - Support for STDIO, SSE, and Streamable HTTP transports

Usage Examples

Register the OpenWeatherMap API to get current weather for cities
Connect to GitHub API to get user information and repository data
Test API connectivity before using registered endpoints
Call any registered API endpoint with the generic call_api tool
List all available APIs and their configured endpoints

Notes

Supports three transport types: STDIO (default, best for local tools), SSE (for backward compatibility), and Streamable HTTP (recommended for web deployments). Authentication options include Bearer tokens, API keys (in headers or query parameters), Basic auth, and custom headers. Parameters can be placed in query strings, URL paths, headers, or request bodies. Provides detailed error handling for missing parameters, HTTP errors, connection failures, and authentication issues.

Comments (0)

Sign In Sign in to leave a comment.