# arka-search-mcp A tiny **MCP stdio server** that exposes Arka web **search** and **fetch** to any MCP-capable agent harness (opencode, Hermes, DeepSeek Harness, Claude Code, …). Backend: `https://search.arka-ai.ru` (Arka ops) — self-hosted SearXNG behind an authenticated gateway that resolves `ARKA_API_KEY → billing account`, applies per-account rate limits, and runs an SSRF-guarded reader. Agent Arka itself does **not** need this shim — it talks to the gateway directly via the built-in `http_compat` MCP transport. See the setup doc. ## Requirements - Node.js ≥ 18 (uses global `fetch`). - An Arka API key in `ARKA_API_KEY` (the key Agent Arka stores for inference; obtained via SSO / trial provisioning). ## Environment | Variable | Default | Meaning | |---|---|---| | `ARKA_API_KEY` | — (**required**) | Arka API key; sent as `X-Api-Key`. | | `ARKA_SEARCH_URL` | `https://search.arka-ai.ru` | Gateway base URL. | | `ARKA_SEARCH_UA` | `arka-search-mcp/1.0` | User-Agent. | ## Tools | Tool | Arguments | Returns | |---|---|---| | `web_search` | `q` (required), `language`, `categories`, `pageno`, `time_range` | SearXNG JSON `{ query, results: [{ title, url, content, engine }] }` | | `web_fetch` | `url` (required) | `{ title, content (Markdown), url, final_url, content_type, bytes, truncated }` | ## Install ```bash git clone https://git.arka-ai.ru/arka/public.git # or copy just this directory # server: /path/to/arka-search-mcp/server.js ``` Zero dependencies — run it directly with `node server.js`. ## Manual smoke test ```bash printf '%s\n' \ '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' \ '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \ '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"web_search","arguments":{"q":"Arka AI"}}}' \ | ARKA_API_KEY="$ARKA_API_KEY" node server.js ``` ## License MIT.