Skip to main content

MCP server exposing a catalog of free APIs with embedding-based lookups

Project description

Public APIs MCP

Catalog of free public APIs with semantic search.

🎯 Features

  • search_public_apis: embedding-based search over API names and descriptions
  • get_public_api_details: retrieve full details by id
  • Resources: public-apis://apis, public-apis://api/{id}

🔧 Setup (uv)

Add to MCP clients (e.g., Claude Desktop) using uv.

Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "public-apis": {
      "command": "uvx",
      "args": ["public-apis-mcp"]
    }
  }
}

🚀 Usage

  • Build embeddings index (optional; auto-build on first search):
uvx public-apis-mcp build-index
  • Run the MCP server over STDIO:
uvx public-apis-mcp run

📋 Tool Reference

search_public_apis

  • Purpose: Semantic search over the catalog
  • Parameters: query (str), limit (int, default 5)
  • Returns: list of { id, name, score, snippet }

Example call payload:

{ "name": "search_public_apis", "arguments": { "query": "weather", "limit": 5 } }

get_public_api_details

  • Purpose: Fetch full details by id
  • Parameters: id (str)
  • Returns: ApiItem

Example call payload:

{ "name": "get_public_api_details", "arguments": { "id": "a6b3a6b3-a6b3-a6b3-a6b3-a6b3a6b3a6b3" } }

🛠️ Development

Prerequisites:

  • Python 3.10+
  • uv (https://docs.astral.sh/uv/)

Setup:

uv sync --dev

Run tests:

FREE_APIS_MCP_TEST_MODE=1 uv run pytest -q

Lint and format:

uv run ruff check --fix
uv run ruff format

Type checking:

uv run mypy src/

MCP Client Dev Config

{
  "mcpServers": {
    "public-apis-dev": {
      "command": "uv",
      "args": [
        "--directory",
        "<abs_path>/public-apis-mcp",
        "run",
        "public-apis-mcp"
      ]
    }
  }
}

Build and Try

uv build
uv run --with dist/*.whl public-apis-mcp --help

📦 Data & Index

  • Data: src/public_apis_mcp/datastore/free_apis.json
  • Embedding index: src/public_apis_mcp/datastore/index.npz (auto-built)

Testing with MCP Inspector

For exploring and/or developing this server, use the MCP Inspector npm utility:

# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector

# Run local development server with the inspector
npx @modelcontextprotocol/inspector uv run public-apis-mcp

# Run PyPI production server with the inspector
npx @modelcontextprotocol/inspector uvx public-apis-mcp

📝 License

MIT License - see LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

public_apis_mcp-0.1.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

public_apis_mcp-0.1.0-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

Details for the file public_apis_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: public_apis_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for public_apis_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7ac1c58d7fea86370d80c9cb5ca314e2d24036d01b1e69ecbe57e889f75a77bd
MD5 d509a53187afe6293b3c6e4383f1b770
BLAKE2b-256 e0ccaee2ce782201aaafdbb0029e2c3e15e41d65e6f7a3843e8a4be148c7de83

See more details on using hashes here.

Provenance

The following attestation bundles were made for public_apis_mcp-0.1.0.tar.gz:

Publisher: publish.yml on zazencodes/public-apis-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file public_apis_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for public_apis_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73d8bdcc3084b6c272f6340957faeb8c2edb8c9ed1a3e689407d5ee3e9d024d1
MD5 aba18e3e5a41b9d2ec5574fe98cc2045
BLAKE2b-256 a46263003ae1db6f86ed444e247e0e723e97a10a1f72df9a7f34b588bde66783

See more details on using hashes here.

Provenance

The following attestation bundles were made for public_apis_mcp-0.1.0-py3-none-any.whl:

Publisher: publish.yml on zazencodes/public-apis-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page