Skip to main content
Glama
API.SH MCP Server

API.SH MCP Server

Official
by API-SH

API.SH MCP server

npm test License: MIT

API.SH turns public web pages from around 1,000 websites into clean JSON: search engines, social media, e-commerce, real estate, jobs, travel, news and sports (Google, Amazon, TikTok, Zillow, LinkedIn and more). This MCP server lets an AI assistant find the right endpoint, read its parameters and call it for you.

There are two ways to connect:

  1. Remote (recommended). Point your client at https://mcp.api.sh/mcp. Nothing to install. Sign in with OAuth, or send your API key as a Bearer token.

  2. Local. Run npx -y @api.sh/mcp, the package in this repository. Use it when your client only runs local (stdio) MCP servers.

The local server is a thin bridge: it forwards every request to https://mcp.api.sh/mcp with your key. You get exactly the same tools, descriptions and results as the remote server, and new tools appear without an update.

Get an API key

Sign up and copy a key from the dashboard. Every account gets free monthly credits, and failed calls are free.

Related MCP server: agentpay-gateway

Option 1: remote server

Claude Desktop and claude.ai: Settings → Connectors → Add custom connector. Enter https://mcp.api.sh/mcp and sign in.

Claude Code:

claude mcp add --transport http apish https://mcp.api.sh/mcp
# or with a key instead of OAuth:
claude mcp add --transport http apish https://mcp.api.sh/mcp --header "Authorization: Bearer your-api-key"

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "apish": {
      "url": "https://mcp.api.sh/mcp"
    }
  }
}

VS Code (.vscode/mcp.json):

{
  "servers": {
    "apish": {
      "type": "http",
      "url": "https://mcp.api.sh/mcp"
    }
  }
}

Windsurf (~/.codeium/windsurf/mcp_config.json):

{
  "mcpServers": {
    "apish": {
      "serverUrl": "https://mcp.api.sh/mcp"
    }
  }
}

To skip OAuth in any client that supports headers, add "headers": { "Authorization": "Bearer your-api-key" } next to the URL.

Option 2: local server (npx)

Needs Node.js 20 or newer. Every client uses the same command, npx -y @api.sh/mcp, with your key in APISH_API_KEY.

Claude Desktop (claude_desktop_config.json, open it from Settings → Developer → Edit Config):

{
  "mcpServers": {
    "apish": {
      "command": "npx",
      "args": ["-y", "@api.sh/mcp"],
      "env": { "APISH_API_KEY": "your-api-key" }
    }
  }
}

Cursor (~/.cursor/mcp.json) and Windsurf (~/.codeium/windsurf/mcp_config.json) use the same mcpServers block as Claude Desktop above.

VS Code (.vscode/mcp.json). VS Code asks for the key once and stores it securely:

{
  "inputs": [
    { "type": "promptString", "id": "apish-key", "description": "API.SH API key", "password": true }
  ],
  "servers": {
    "apish": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@api.sh/mcp"],
      "env": { "APISH_API_KEY": "${input:apish-key}" }
    }
  }
}

Claude Code:

claude mcp add apish --env APISH_API_KEY=your-api-key -- npx -y @api.sh/mcp

On Windows, if your client cannot find npx, use "command": "cmd" and "args": ["/c", "npx", "-y", "@api.sh/mcp"].

Environment variables

Variable

Required

Default

What it does

APISH_API_KEY

yes

Your API.SH API key. Sent as Authorization: Bearer <key>.

APISH_MCP_URL

no

https://mcp.api.sh/mcp

The remote MCP endpoint.

APISH_TIMEOUT_MS

no

300000

How long to wait for one request, in milliseconds.

The server writes status and errors to stderr. If the key is missing or rejected, it exits with a clear message that your client shows in its MCP log.

Tools

The tools come from the hosted server, so this list may grow. The main ones:

Tool

What it does

search_apis

Search the catalog by site or data type. Returns routes, required parameters and credit price.

get_endpoint

Full details of one endpoint: every parameter with examples, and its price.

call_api

Run an endpoint and return its JSON. This is the only tool that spends credits.

get_balance, get_usage, list_logs, get_log

Credits, spending and your recent calls. get_log returns a past response again for free.

set_spend_limits, list_keys, create_key, revoke_key

Spend limits and API keys.

request_api

Ask for a site that is not in the catalog yet.

Example prompts

  • "Find the API.SH endpoint for Amazon product details, then get the price and rating for this product: "

  • "Get the top Google results for 'best espresso machine' in the US and summarise what the first five pages recommend."

  • "Pull the last 20 videos from the TikTok account @nasa and tell me which got the most views."

  • "Look up this Zillow listing and show its price history: "

  • "How many credits do I have left, and what did I spend them on this week?"

Use it from code

The package also exports the bridge, if you want to embed it:

import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { connectRemote, createBridge } from "@api.sh/mcp";

const remote = await connectRemote({ apiKey: process.env.APISH_API_KEY });
await createBridge(remote).connect(new StdioServerTransport());

Development

npm ci
npm test                              # build and run the offline tests
APISH_API_KEY=your-api-key npm run test:live   # one free search through the real server

The live test lists the tools and makes one search_apis call, which spends no credits.

License

MIT

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      B
      maintenance
      Hosted MCP server for 3926 structured public web-data tools across 488 platform groups, returning clean JSON for search, maps, commerce, social, and finance.
      14
      500
      252 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a single MCP endpoint for 90+ tools across 42 backend servers (search, legal, domain, etc.) with per-call credit billing and a single API key.
      1
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables MCP clients to scrape web pages, extract structured data, search, crawl sites, generate schemas, schedule monitors, and inspect credits/history through hosted or local integrations.
      -