The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Sofya MCP listing page.
MCP server for Sofya - web search, fetch, extract, and deep research for AI agents, exposed over the Model Context Protocol.
It runs locally over stdio and is a thin wrapper around the Sofya REST API. Bring your own Sofya API key.
| Tool | What it does | Cost |
|---|---|---|
search | Search the web and get extracted page content (not just snippets). Supports news topic, domain filters, freshness, and optional AI-synthesized answer. | 1-3 credits (+5 for include_answer) |
fetch | Fetch up to 10 URLs as clean markdown. Also handles PDF, DOCX, and more. | 1 credit / URL |
extract | Fetch a page and pull specific structured info using AI. | 5 credits |
research | Decompose a question into sub-queries, read many sources in parallel, and synthesize a cited report. | 25 credits |
ay_live_...)Run it directly with npx - no install needed:
Add this to your MCP config (e.g. claude_desktop_config.json, or .cursor/mcp.json):
Add it with the Codex CLI:
Or edit ~/.codex/config.toml directly. Note Codex puts environment variables in
a nested [mcp_servers.<name>.env] table:
Then run /mcp inside Codex to confirm the server is connected.
Already using Sofya's hosted MCP? Sofya also serves a remote MCP endpoint at
https://sofya.co/mcp(Bearer auth, no install). Use thissofya-mcppackage when you want a local stdio server launched by your client instead.
| Variable | Required | Default | Description |
|---|---|---|---|
SOFYA_API_KEY | yes | - | Your Sofya API key (ay_live_...). |
SOFYA_BASE_URL | no | https://sofya.co | Override the Sofya API base URL. |
CLI flags --api-key and --base-url take precedence over the env vars.
Run npx sofya-mcp --list-tools to print the tool schemas, or --help for options.
The server is a single file, src/index.ts. Tool definitions
mirror Sofya's hosted MCP server exactly (same names, parameters, and defaults).
MIT - see LICENSE.