saaros-mcp-server

saaros-mcp-server

0

Saaros-MCP-Server is an MCP server designed to interface with the Brave Search API using JSON-RPC 2.0. It is capable of running as a background thread, making it suitable for embedding in larger applications.

Saaros-MCP-Server

A Model Context Protocol (MCP) server that provides access to the Brave Search API, running as a background thread.

Features

  • Runs as a background thread
  • Implements JSON-RPC 2.0 protocol
  • Rate limiting support
  • Brave Search API integration

Setup

  1. Set up your Brave Search API key:
    • Get an API key from Brave Search API
    • Create a .env file in the project root:
      BRAVE_API_KEY=your_api_key_here
      

Usage

The server communicates via stdin/stdout using the JSON-RPC 2.0 protocol. Here are example requests:

  1. List available tools:
{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "listTools",
    "params": {}
}
  1. Perform a web search:
{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "callTool",
    "params": {
        "name": "brave_web_search",
        "arguments": {
            "query": "your search query",
            "count": 10
        }
    }
}

To run the server:

uv run main.py

Development

The server is implemented as a Python thread, making it suitable for integration into larger applications. The main components are:

  • MCPServer: The main server class that runs in a background thread
  • BraveSearchConfig: Configuration class for API settings
  • Request/response queues for thread-safe communication