Add Sofya search, scrape, and research MCP server#174
Open
yusufgurdogan wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 snippetsscrape_website(url): fetch a URL as clean markdown (also handles PDF and DOCX)sofya_research(query): multi-source deep research that returns a cited reportWhy
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 assearching_sogou_mcp_server.py. Registered inapps/miroflow-agent/src/config/settings.pyand gated ontool-sofya-searchbeing present in the agent config, exactly like the Sogou server. Documented inlibs/miroflow-tools/README.mdand.env.example.The provider is opt-in and changes no defaults. To enable it, add
tool-sofya-searchto an agent'stoolslist and setSOFYA_API_KEY(get one at https://sofya.co).Testing
tools/listreturns all three tools.sofya_searchandscrape_websiteagainst the live API and verified real results.ruff@0.8.0 checkandruff@0.8.0 formatboth pass on the new and changed files.python -m py_compilepasses on the changed Python files.