Skip to main content
Glama
zazencodes

Public APIs MCP

by zazencodes

Public APIs MCP

Catalog of free public APIs with semantic search.

The catalog includes an extensive list of APIs from the public-apis GitHub repo.
Thank you to all the maintainers, contributors and API creators! 💯

Related MCP server: APIClaw

🎯 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.

Available Tools

2 tools
get_public_api_detailsA

Get detailed information about a specific API by its unique public-apis-mcp server ID

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
apiYesAPI display name
api_linkYes
descriptionYes
authNo
httpsNo
corsNo
categoryNo

TDQS

A4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It only states it returns 'detailed information' without specifying any side effects, auth requirements, rate limits, or output format beyond the schema. This leaves significant gaps for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence of 12 words. It contains no fluff and conveys the essential purpose efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, presence of output schema) and the absence of annotations, the description adequately covers the purpose and parameter meaning. It does not discuss edge cases or error scenarios, but these are likely not critical for a straightforward get operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter 'id' has 0% schema description coverage, but the description clarifies that the ID is the 'unique public-apis-mcp server ID', adding meaning beyond the schema field title 'Id'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get detailed information'), the resource ('specific API'), and the identifier ('unique public-apis-mcp server ID'). It distinguishes from the sibling tool 'search_public_apis' by focusing on a single API retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool: when you have a specific server ID and need detailed info. It does not explicitly mention when not to use or mention alternatives, but the context is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_public_apisC

Search for free public APIs that match the input query string.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. However, it does not disclose any behavioral traits such as search algorithm, result format, or side effects. It only states the basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, making it concise but possibly too brief. It lacks structure and could include more details without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (2 parameters, simple search), the description is incomplete. It omits usage context, param details, and behavioral transparency. The presence of an output schema does not fully compensate for these gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description should compensate for parameter meanings. It only mentions 'input query string' for the query parameter but does not explain the limit parameter or provide any additional semantic guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'search' and the resource 'free public APIs', and specifies that it matches an input query string. This distinguishes it from the sibling tool 'get_public_api_details' which likely returns details of a specific API.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, nor any conditions or exclusions. The description only states what the tool does without any usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updates
    • First observedget_public_api_details
    • First observedsearch_public_apis

TDQS

A3.7/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one searches for APIs using a query string, and the other retrieves detailed information by a specific ID. There is no overlap or ambiguity.

Naming Consistency5/5

Both tool names follow the consistent verb_noun pattern ('search_public_apis', 'get_public_api_details'), making them predictable and easy to understand.

Tool Count4/5

With only 2 tools, the server is slightly under-scoped for a general 'Public APIs' domain. However, the two tools cover the essential operations of search and detail retrieval, which may be sufficient for the intended use case.

Completeness4/5

The tool set covers the core functionalities of searching and getting details for public APIs. While missing operations like listing all APIs or browsing categories, the search tool effectively mitigates those gaps, making the surface reasonably complete.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    The API layer for AI agents. World's biggest API index with 22,000+ APIs and growing. Agents discover and call APIs at runtime with semantic search, structured metadata, and 18 Direct Call APIs including AI providers.
    14
    469 npm
    8
    MIT