Skip to content
Back to search

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.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mshojaei77--reactmcp/badge.svg)](/listings/mshojaei77--reactmcp)

HTML

<a href="/listings/mshojaei77--reactmcp"><img src="/api/listings/mshojaei77--reactmcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. **Clone the Repository**

   git clone https://github.com/mshojaei77/ReActMCP.git
   cd ReActMCP

2. **Create a Virtual Environment (Optional but recommended)**

   python -m venv venv
   source venv/bin/activate  # On Windows use: venv\Scripts\activate

3. **Install Dependencies**

   uv pip install -r requirements.txt

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 253 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # ReActMCP Web Search
  2. ReActMCP Web Search is an MCP (Model Context Protocol) server that integrates web search capabilities into your AI assistant framework. It leverages the Exa API to perform both basic and advanced web searches, returning real-time, markdown-formatted results including titles, URLs, publication dates, and content summaries.
  3. This repository is part of the broader ReActMCP project that connects various MCP tools and servers to empower your AI assistant with a wide range of capabilities.
  4. ---
  5. ## Table of Contents
  6. - [Features](#features)
  7. - [Requirements](#requirements)
  8. - [Installation](#installation)
  9. - [Configuration](#configuration)
  10. - [Environment Variables](#environment-variables)
  11. - [MCP Configuration](#mcp-configuration)
  12. - [System Prompt](#system-prompt)
  13. - [Usage](#usage)
  14. - [Running the Web Search Server](#running-the-web-search-server)
  15. - [Testing the Tools](#testing-the-tools)
  16. - [Troubleshooting](#troubleshooting)
  17. - [License](#license)
  18. - [Contributing](#contributing)
  19. ---
  20. ## Features
  21. - **Basic Web Search**: Perform simple searches using the Exa API.
  22. - **Advanced Web Search**: Use additional filtering options such as domain restrictions, text inclusion requirements, and date filters.
  23. - **Markdown Output**: Format search results in Markdown to easily incorporate titles, URLs, and summaries.
  24. - **MCP Integration**: Easily add this tool into your MCP server ecosystem for multi-tool AI assistance.
  25. ---
  26. ## Requirements
  27. - **Python 3.8+**
  28. - [python-dotenv](https://pypi.org/project/python-dotenv/)
  29. - [exa-py](https://pypi.org/project/exa-py/) (Exa API client)
  30. - [firecrawl-py](https://pypi.org/project/firecrawl-py/) (Firecrawl API client)
  31. - Other dependencies that may be required by your MCP framework
  32. ---
  33. ## Installation
  34. 1. **Clone the Repository**
  35. ```bash
  36. git clone https://github.com/mshojaei77/ReActMCP.git
  37. cd ReActMCP
  38. ```
  39. 2. **Create a Virtual Environment (Optional but recommended)**
  40. ```bash
  41. python -m venv venv
  42. source venv/bin/activate # On Windows use: venv\Scripts\activate
  43. ```
  44. 3. **Install Dependencies**
  45. ```bash
  46. uv pip install -r requirements.txt
  47. ```
  48. ---
  49. ## Configuration
  50. ### Environment Variables
  51. Create a `.env` file in the project root directory with at least the following variable:
  52. ```env
  53. EXA_API_KEY=your_exa_api_key_here
  54. OPENAI_API_KEY=...
  55. ```
  56. This key is required by the Exa API for performing web searches.
  57. ### MCP Configuration
  58. The MCP configuration file `mcp_config.json` defines the settings and tools available to your MCP server. An example configuration is provided:
  59. ```json
  60. {
  61. "websearch": {
  62. "script": "web_search.py",
  63. "encoding_error_handler": "ignore",
  64. "description": "Web search capability using Exa API that provides real-time internet search results. Supports both basic and advanced search with filtering options including domain restrictions, text inclusion requirements, and date filtering. Returns formatted results with titles, URLs, publication dates, and content summaries.",
  65. "required_env_vars": ["EXA_API_KEY"],
  66. "active": true
  67. },
  68. "settings": {
  69. "model": "gpt-4o",
  70. "system_prompt_path": "system_prompt.txt"
  71. }
  72. }
  73. ```
  74. You can personalize or extend this configuration by modifying parameters such as default number of results or adding new MCP tools.
  75. ### System Prompt
  76. The `system_prompt.txt` file configures the behavior and tone of your AI assistant. It guides responses to be friendly, engaging, and informative, with the inclusion of emojis. An example prompt is provided:
  77. ```text
  78. You are a helpful, knowledgeable AI assistant with web search capabilities. Your goal is to provide accurate, comprehensive, and up-to-date information to users.
  79. Use lots of emojis and make your responses fun and engaging.
  80. ## Available Search Tools
  81. - `search_web`: Basic web search that returns results based on a query
  82. - `advanced_search_web`: Advanced search with filtering options for domains, required text, and date ranges
  83. ## Guidelines for Responding to Questions
  84. 1. For current information or facts that might have changed since your training data, use the appropriate search tool to find the most recent and relevant information.
  85. 2. Use `search_web` for general queries and `advanced_search_web` with appropriate filters for more specific needs.
  86. 3. Formulate precise search queries to maximize result relevance.
  87. 4. For recent information, use the `max_age_days` parameter in advanced search to limit results to recent publications.
  88. 5. When targeting specific sources, use the `include_domains` parameter to focus your search.
  89. 6. Cite sources by including URLs from search results.
  90. 7. For insufficient or contradictory results, acknowledge limitations and explain findings.
  91. 8. Break down complex topics into organized sections.
  92. 9. Provide balanced perspectives on controversial topics.
  93. 10. Be transparent about uncertainty rather than making up information.
  94. 11. Maintain a helpful, informative, and conversational tone.
  95. ## Response Quality Standards
  96. Your responses should be well-structured, factually accurate, and tailored to the user's level of understanding on the topic. Use the web search capabilities as your primary tools for accessing current information before responding to time-sensitive or factual queries.
  97. ```
  98. Feel free to adjust the system prompt to align with your desired assistant behavior.
  99. ### Docker and Glama
  100. The published container runs the Exa MCP server over stdio. Build and run it
  101. with the API key supplied at runtime:
  102. ```bash
  103. docker build -t reactmcp-exa:local .
  104. docker run --rm -i -e EXA_API_KEY=your_exa_api_key_here reactmcp-exa:local
  105. ```
  106. The exact container command for MCP hosts is:
  107. ```text
  108. docker run --rm -i -e EXA_API_KEY=your_exa_api_key_here reactmcp-exa:local
  109. ```
  110. The Docker image entry point is `servers/exa_web_search.py`. `main.py` is the
  111. optional OpenAI/LangGraph host and is not the container MCP entry point.
  112. The repository includes `glama.json` with the maintainer identity used by
  113. Glama's claim flow. After merging it, repeat the Glama claim flow so Glama
  114. syncs the metadata and Dockerfile.
  115. To validate the image with MCP Inspector:
  116. ```bash
  117. npx @modelcontextprotocol/inspector docker run --rm -i -e EXA_API_KEY=your_exa_api_key_here reactmcp-exa:local
  118. ```
  119. Run the Inspector command from a terminal with Docker and Node.js installed.
  120. ---
  121. ## Usage
  122. ### Running the Web Search Server
  123. The MCP servers is implemented in `servers` directory. To run a server, simply execute it :
  124. ```bash
  125. python servers/exa_web_search.py
  126. ```
  127. This command will start the MCP server which listens for requests and exposes the following tools:
  128. - **search_web**: Perform basic web searches.
  129. - **advanced_search_web**: Perform advanced web searches with filtering options.
  130. ### Testing the Tools
  131. Within `servers/exa_web_search.py`, a test function `test_search()` is provided (currently commented out) to demonstrate basic usage of the search capabilities. You can run this test by uncommenting the test execution block and using Python's asyncio runner:
  132. ```python
  133. if __name__ == "__main__":
  134. import asyncio
  135. # Uncomment the following line to perform a test search
  136. # asyncio.run(test_search())
  137. mcp.run()
  138. ```
  139. This will print search results for sample queries and help you verify that the tool is functioning as expected.
  140. ---
  141. ## Claude Desktop Configuration:
  142. Configure Claude Desktop to use this server by adding the following to your configuration:
  143. ```json
  144. {
  145. "mcpServers": {
  146. "websearch": {
  147. "command": "python",
  148. "args": ["path/to/servers/exa_web_search.py"]
  149. }
  150. }
  151. }
  152. ```
  153. ## Troubleshooting
  154. - **Missing EXA_API_KEY:** Ensure that the `.env` file is properly set up with your valid Exa API key.
  155. - **Dependency Issues:** Verify that all necessary Python packages are installed (check your `requirements.txt` file). Reinstall packages if needed.
  156. - **API Errors:** If you encounter errors during web searches, check your network connection and verify the Exa API status.
  157. ---
  158. ## License
  159. This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
  160. ---
  161. ## Contributing
  162. Contributions are welcome! If you have suggestions, bug fixes, or improvements, please open an issue or submit a pull request.
  163. Happy coding and enjoy building your personalized, multi-tool AI assistant with ReActMCP Web Search! 🚀😊
  164. ## Star History
  165. <a href="https://www.star-history.com/#mshojaei77/ReActMCP&Date">
  166. <picture>
  167. <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mshojaei77/ReActMCP&type=Date&theme=dark" />
  168. <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=mshojaei77/ReActMCP&type=Date" />
  169. <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=mshojaei77/ReActMCP&type=Date" />
  170. </picture>
  171. </a>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.