ReActMCP
ReActMCP is a reactive MCP client that empowers AI assistants to instantly respond with real-time, Markdown-formatted web search insights powered by the Exa API.
claude mcp add --transport stdio mshojaei77-reactmcp python servers/web_search.py \ --env EXA_API_KEY="your_exa_api_key_here"
How to use
ReActMCP Web Search adds real-time web search capabilities to your MCP ecosystem using the Exa API. It provides two primary tools: search_web for basic web searches and advanced_search_web for refined queries with filters such as domain restrictions, required text, and date ranges. Results are returned in Markdown format, including titles, URLs, publication dates, and content summaries, making it easy to present to users within your AI assistant. To use it, import the websearch tool into your MCP server configuration and invoke the corresponding tool IDs (search_web or advanced_search_web) as part of your assistant’s toolset. This server is designed to work alongside other MCP tools, enabling multi-tool workflows and richer information retrieval.
Typical usage scenarios include answering questions that require current information, gathering sources for a topic, and delivering concise, formatted results suitable for presentation within chat-based assistants. The advanced_search_web tool supports more precise queries by applying filters (e.g., domains, text constraints, and date windows) to improve relevance and recency.
How to install
Prerequisites:
- Python 3.8+ (recommended 3.8–3.11 for compatibility)
- git
- Network access to install dependencies from PyPI
- Clone the repository
git clone https://github.com/mshojaei77/ReActMCP.git
cd ReActMCP
- (Optional but recommended) Create and activate a virtual environment
python -m venv venv
# macOS/Linux
source venv/bin/activate
# Windows
venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Prepare environment variables (see Environment Variables below) and run the server
# Example: run the web search server directly
python servers/web_search.py
- If you plan to integrate into an MCP framework, ensure your mcp_config.json matches the structure described in this repository (see MCP Configuration).
Additional notes
Environment variables:
- EXA_API_KEY: Your Exa API key is required for web searches. Set this in a .env file or as an environment variable. The server will read EXA_API_KEY to authenticate with the Exa API.
- OPENAI_API_KEY: If your MCP setup uses OpenAI services, ensure the key is configured where required by your framework.
Common issues:
- Missing EXA_API_KEY: Ensure your .env file exists or the environment variable is exported before launching the server.
- Dependency issues: Verify that all Python dependencies are installed (check requirements.txt) and that your Python version is compatible with the installed packages.
- Network/API errors: Check network connectivity and ensure the Exa API key is valid and has access to the required endpoints.
MCP configuration tips:
- The mcp_config.json example in this repository defines the web search tool under the key "websearch". You can adjust the script, encoding_error_handler, and description, and add or remove required_env_vars as needed for your deployment.
Related MCP Servers
ebook
A MCP server that supports mainstream eBook formats including EPUB, PDF and more. Simplify your eBook user experience with LLM.
infobus
Model Context Protocol server enabling AI assistants to access transit information through standardized interfaces
mcp-gateway
MCP Gateway and Registry
mcp -email
一个基于 MCP (Model Context Protocol) 的邮件服务,支持 LLM 发送带附件的电子邮件及在指定目录中搜索文件。提供安全的 SMTP 传输、多收件人支持和附件模式匹配搜索功能,适用于 Gmail、Outlook、Yahoo、QQ 邮箱和网易 126 邮箱等主流邮箱服务。
pentestMCP
pentestMCP: AI-Powered Penetration Testing via MCP, an MCP designed for penetration testers.
MCPSecBench
MCPSecBench: A Systematic Security Benchmark and Playground for Testing Model Context Protocols