presearch-mcp-server

NosytLabs/presearch-mcp-server

3.2

If you are the rightful owner of presearch-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Presearch MCP Server is a minimal Model Context Protocol server that provides web search functionality using the Presearch API.

Tools
  1. presearch_search

    Search the web using Presearch API with various filters

Presearch MCP Server

Official Presearch MCP Server for seamless integration with AI models, providing powerful, decentralized search capabilities.

Features

  • Simplified Error Handling: Robust error categorization and retry mechanisms.
  • Enhanced Performance: Optimized with rate limiting and circuit breakers.
  • Easy Configuration: Simplified setup with environment variables.
  • Caching: Efficient caching for repeated searches.
  • Testing: Comprehensive unit tests for reliability.

Prerequisites

  • Node.js >= 18.x
  • npm >= 9.x
  • A Presearch API key (obtain from Presearch)

Installation

  1. Clone the repository:

    git clone https://github.com/NosytLabs/presearch-mcp-server.git
    cd presearch-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Build the project (TypeScript to JavaScript):

    npm run build
    

Configuration

  • Copy .env.example to .env and add your PRESEARCH_API_KEY:
    PRESEARCH_API_KEY=your_api_key_here
    

Running the Server

npm start

The server will run on the configured port (default: 3000).

Usage

Available Tools

  • presearch_search: Perform web searches.

    • Parameters: query (string), num (number, optional), lr (string, optional)
    • Example: {"query": "latest AI news"}
  • presearch_cache_clear: Clear the search cache.

For detailed usage and parameters, refer to the mcp.config.json file.

Testing

Run the tests:

npm test

All tests should pass, ensuring the server's reliability.

Contributing

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License - see the file for details.