Skip to content

Add Sofya search, scrape, and research MCP server#174

Open
yusufgurdogan wants to merge 1 commit into
MiroMindAI:mainfrom
yusufgurdogan:add-sofya-search
Open

Add Sofya search, scrape, and research MCP server#174
yusufgurdogan wants to merge 1 commit into
MiroMindAI:mainfrom
yusufgurdogan:add-sofya-search

Conversation

@yusufgurdogan

Copy link
Copy Markdown

What

Adds tool-sofya-search, a web tools provider backed by the Sofya API, alongside the existing Serper and Sogou search servers. It exposes three tools:

  • sofya_search(query, max_results=10): web search that returns extracted page content, not just snippets
  • scrape_website(url): fetch a URL as clean markdown (also handles PDF and DOCX)
  • sofya_research(query): multi-source deep research that returns a cited report

Why

MiroThinker already supports pluggable search providers (Serper, Sogou). Sofya fits the same pattern and adds full-content search plus a one-call research tool, which is useful for deep research tasks. It is a drop-in alternative or complement to the existing providers.

How it works

New MCP server at libs/miroflow-tools/src/miroflow_tools/mcp_servers/searching_sofya_mcp_server.py, following the same FastMCP stdio pattern as searching_sogou_mcp_server.py. Registered in apps/miroflow-agent/src/config/settings.py and gated on tool-sofya-search being present in the agent config, exactly like the Sogou server. Documented in libs/miroflow-tools/README.md and .env.example.

The provider is opt-in and changes no defaults. To enable it, add tool-sofya-search to an agent's tools list and set SOFYA_API_KEY (get one at https://sofya.co).

Testing

  • Launched the server over stdio with a real key and confirmed tools/list returns all three tools.
  • Ran sofya_search and scrape_website against the live API and verified real results.
  • ruff@0.8.0 check and ruff@0.8.0 format both pass on the new and changed files.
  • python -m py_compile passes on the changed Python files.

Add tool-sofya-search, a web tools provider backed by the Sofya API
(https://sofya.co), alongside the existing Serper and Sogou search servers.

It exposes three tools:
- sofya_search: web search that returns extracted page content, not snippets
- scrape_website: fetch a URL as clean markdown (also handles PDF and DOCX)
- sofya_research: multi-source deep research that returns a cited report

The server is opt-in: add tool-sofya-search to an agent's tools list and set
SOFYA_API_KEY. Registered in settings.py and documented in the tools README
and .env.example, mirroring the existing search providers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant