sofya
Integration guide

Sofya with Strands Agents

Give a Strands agent web search, page fetch, extraction and cited research through Sofya's hosted MCP server. There is nothing to install beyond Strands.

ToolWhat it doesCredits
searchSearch the web over Sofya's own index and get page content, not just snippets. Optional short AI answer with include_answer.1 to 2, +2 with an answer
fetchRead up to 10 URLs as clean Markdown, including PDF, Word, Excel and PowerPoint files.1 per URL
extractRead a page and pull out the information you ask for.10
researchRun several searches, read the sources and return a report with citations.50

It also has get_balance (free) and buy_credits, which returns a payment link and charges nothing. The server is at https://mcp.sofya.co/mcp and speaks Streamable HTTP.

1. Get an API key

Sign in at sofya.co and create a key on the dashboard. Keys look like sofya_live_.... Pay as you go from $10; GitHub accounts a year or older get free monthly credits.

Terminal
export SOFYA_API_KEY=sofya_live_...

2. Install Strands

Terminal
pip install strands-agents

strands-agents already depends on the mcp package, so nothing else is needed.

3. Connect the agent

Pass the server URL and your key as a Bearer header. MCPClient builds the Streamable HTTP transport itself, and passing the client straight to Agent lets Strands open and close the connection for you.

Python
import os

from strands import Agent
from strands.tools.mcp import MCPClient

sofya = MCPClient(
    url="https://mcp.sofya.co/mcp",
    headers={"Authorization": f"Bearer {os.environ['SOFYA_API_KEY']}"},
)

agent = Agent(tools=[sofya])
agent("What changed in the latest Python release? Cite your sources.")

The agent uses Strands' default model provider. Any other provider works the same way: pass model=... to Agent as usual.

Choose the tools the agent sees

Python
sofya = MCPClient(
    url="https://mcp.sofya.co/mcp",
    headers={"Authorization": f"Bearer {os.environ['SOFYA_API_KEY']}"},
    tool_filters={"allowed": ["search", "fetch"]},
)

Keep the connection open across calls

Python
with sofya:
    agent = Agent(tools=sofya.list_tools_sync())
    agent("Find the official changelog for Strands Agents and summarize the last release.")
    agent("Now fetch that page and list every breaking change.")

If MCPClient doesn't accept url=, upgrade with pip install -U strands-agents.

Notes