# MCP Server

> Model Context Protocol server for LLM agent frameworks — no additional credits.

Source: http://localhost:3000/docs/endpoints/mcp

## MCP Server: `POST /v1/mcp/`

Every capability as Model Context Protocol tools over JSON-RPC. Cost: billed per tool call.

```bash
curl -X POST https://api.hushsearch.io/v1/mcp/ \
  -H "X-API-Key: hs_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}'
```

**GET** `/v1/mcp/` — manifest (no auth required)
**POST** `/v1/mcp/` — JSON-RPC 2.0 tool calls

HushSearch exposes a native [MCP](https://modelcontextprotocol.io) server so LLM agents (Claude, GPT-4, etc.) can call HushSearch tools directly without custom integration.

## Available tools

| Tool | Description | Credits |
|---|---|---|
| `search` | Web search (same as `/v1/search/`) | 1 per call |
| `scrape` | Single-URL scrape | 2 per call |
| `get_balance` | Check current credit balance | Free |

## Get manifest

```bash
curl https://api.hushsearch.io/v1/mcp/
```

```json
{
  "schema_version": "mcp-v1",
  "name": "HushSearch",
  "description": "Privacy-first web search and scraping API for AI agents",
  "tools": [...]
}
```

## Call a tool

```bash
curl -X POST https://api.hushsearch.io/v1/mcp/ \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "search",
      "arguments": { "query": "latest AI frameworks 2026" }
    }
  }'
```

### Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "results": [...],
    "credits_used": 1,
    "credits_remaining": 99
  }
}
```

## Using with Claude

Configure your Claude agent with the MCP server URL:

```json
{
  "mcpServers": {
    "hushs": {
      "url": "https://api.hushsearch.io/v1/mcp/",
      "headers": { "X-API-Key": "YOUR_API_KEY" }
    }
  }
}
```
