Provides tools for performing general web searches and searching for local businesses and places using the Brave Search API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-nexusResearch the current state of solid-state battery technology and its key players."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-nexus
English | 中文
mcp-nexus is a robust, multi-provider Model Context Protocol (MCP) server that acts as a bridge for Tavily, Brave Search, and GrokSearch APIs. It provides a unified tool surface, rotating across pools of upstream API keys, all managed through a comprehensive Admin UI.
Features
Unified Search APIs: Exposes Tavily, Brave, and GrokSearch tools through a single MCP endpoint.
API Key Management: Easily add, manage, and rotate multiple Tavily, Brave, and Grok API keys to distribute load and handle rate limits.
Client Authentication: Secure the MCP endpoint with bearer tokens that can be created and revoked via the Admin UI.
Web Admin UI: A user-friendly interface to manage API keys, client tokens, view usage statistics, and configure server settings.
Usage Monitoring: Track tool usage, inspect query history, and get summaries of your most used tools and queries.
Flexible Search Strategy: Dynamically configure source mode (
tavily_only,brave_only,combined, etc.) and key selection strategy (round_robin,random) without restarting the server.Rate Limiting: Built-in rate limiting for both MCP clients and upstream API calls to prevent abuse and manage costs.
Flexible Deployment: Run locally with Node.js or deploy anywhere using the provided Docker Compose setup.
Quickstart (Local)
Docker Compose (recommended)
SQLite data is stored in the Docker volume mounted at /data.
Then open:
Admin UI:
http://localhost:8787/adminMCP endpoint:
http://localhost:8787/mcp
Local Node.js
Requires the env vars in .env.example to be set.
Workspace
packages/core: Core logic for Tavily/Brave clients, key management, and MCP tool schemas.packages/bridge-server: The main HTTP server, providing the MCP endpoint and the Admin API/UI.packages/bridge-stdio: A lightweight stdio server for local client integration.packages/stdio-http-bridge: A helper package to connect stdio clients to the HTTP server.packages/db: Prisma schema and database client for all data persistence.packages/admin-ui: The React-based Admin UI frontend.
Admin UI
The Admin UI provides a central place to manage your mcp-nexus instance.
Keys: Manage upstream Tavily, Brave, and Grok API keys. You can add, remove, update key status (active/disabled/cooldown/invalid), and monitor Tavily credits.
Tokens: Create and revoke client tokens used to authenticate with the MCP endpoint.
Usage: View detailed tool usage statistics and query history, with options to filter by date range, tool, and client.
Settings: Configure live server settings, such as the upstream key selection strategy and the search source mode.
MCP Tools
The server exposes the following tools to MCP clients.
Tool Name | Provider | Description |
| Tavily | Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs. |
| Tavily | Extract content from URLs. Returns raw page content in markdown or text format. |
| Tavily | Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth. |
| Tavily | Map a website's structure. Returns a list of URLs found starting from the base URL. |
| Tavily | Perform comprehensive research on a given topic or question. Returns a detailed response based on research findings. |
| Brave | Performs a web search using the Brave Search API. Use for general web searches for information, facts, and current topics. Returns a JSON array of results. |
| Brave | Search for local businesses and places using the Brave Search API. Commonly falls back to web search if local results are unavailable. Returns a JSON array of results. |
| Grok | GrokSearch web search with optional supplemental sources (Tavily/Brave/Firecrawl) and canonical URL deduplication. |
| Grok | Retrieves cached source entries from a previous |
| Grok | Fetches page content with Tavily-first extraction and Firecrawl fallback. |
| Grok | Maps a target website with configurable depth/breadth/limit constraints. |
Configuration
Configuration is managed via environment variables. Copy .env.example to .env to start.
Core Configuration
Variable | Description | Default |
| Connection string for the database. For local setups, a file-based SQLite DB is recommended. |
|
| A 32-byte (256-bit) secret key used for encrypting and decrypting upstream API keys stored in the database. | (generated in example) |
| Bearer token for accessing the Admin API. | (generated in example) |
| The host address for the server to listen on. |
|
| The port for the server to listen on. |
|
| If |
|
Rate Limiting
Variable | Description | Default |
| Max requests per minute per client token. |
|
| Max requests per minute across all clients. |
|
| Max key reveal attempts per minute in the Admin UI. |
|
| Maximum number of retries for failed upstream requests. |
|
| Cooldown period in milliseconds for an upstream API key after a failure. |
|
Search & Key Strategy
These settings can also be configured live in the Admin UI → Settings page.
Variable | Description | Default |
| Defines the search behavior: |
|
| Strategy for picking an upstream Tavily key when multiple are active: |
|
Combined Mode
When SEARCH_SOURCE_MODE=combined:
Requires active API keys for both Tavily and Brave Search
Executes queries in parallel to minimize latency
Merges and deduplicates results by URL
Note: Each search request consumes quota from both providers (2x cost)
Pagination: When
offset>0, only Brave results are returned (Tavily doesn't support offset)
Tavily Configuration
Variable | Description | Default |
| Log level for Tavily tool usage: |
|
| Optional secret for creating a keyed HMAC-SHA256 hash of queries instead of a plain SHA256. Recommended for privacy. |
|
| Optional sampling rate (0.0 to 1.0) for logging usage events. Empty string means log all events. |
|
| Optional retention period for usage logs. If set, old logs will be periodically cleaned up. |
|
| The probability (0.0 to 1.0) that a cleanup of old usage logs is triggered on a new usage event. |
|
| Credit threshold at which a Tavily key will be automatically put into |
|
| Cooldown duration for a key that has fallen below the minimum credit threshold. |
|
| Lock duration to prevent concurrent credit refreshes for the same key. |
|
| Timeout for the upstream Tavily credits API request. |
|
| Duration to cache Tavily credit information before it's considered stale. |
|
Brave Configuration
If no Brave keys are configured, Brave tools will fall back to using Tavily.
Variable | Description | Default |
| A Brave Search API key. If set, this single key will be used. For multi-key support, add keys via the Admin UI. |
|
| Max requests per second to the Brave API to stay within rate limits. |
|
| Overrides |
|
| Max time a request can wait in the queue before failing or falling back to Tavily. |
|
| Behavior when the request queue is full: |
|
| Per-request HTTP timeout for the Brave API. |
|
GrokSearch Configuration
Grok tools are feature-flagged and can be controlled in Admin UI → Settings.
Variable | Description | Default |
| Enables/disables Grok tool exposure ( |
|
| Default Grok model used by |
|
| Default extra supplemental source count for |
|
| Grok supplemental source mode: |
|
| Grok key selection strategy: |
|
| Optional Grok-compatible API base URL override. |
|
| Timeout for Grok-side requests in milliseconds. |
|
| Grok usage logging mode: |
|
| Optional secret for keyed query hashing in Grok usage telemetry. |
|
| Optional sample rate (0-1) for Grok usage telemetry. |
|
| Optional Firecrawl API key used for supplemental source/fetch fallback. |
|
| Optional Firecrawl API base URL override. |
|
Connect an MCP client
Open the Admin UI and create a client token from the
Tokenspage.Use that token to authenticate MCP requests by passing it as a bearer token in the
Authorizationheader. Note this is different from the admin token used to access the Admin API itself.
HTTP
MCP endpoint:
POST /mcpAuth:
Authorization: Bearer <client_token>
stdio
It is recommended to run a lightweight stdio wrapper via npx that connects to the HTTP MCP endpoint. This keeps secrets in env instead of CLI arguments.
Set TAVILY_BRIDGE_BASE_URL to your deployment URL (for local Docker Compose: http://localhost:8787).
Deployment
Cloudflare Workers (Recommended - Free)
One-click deployment to Cloudflare's free tier with D1 database. See packages/worker/README.md for details.
Docker Compose (Self-Hosted)
The included docker-compose.yml and Dockerfile provide a production-ready setup for self-hosting.