SuperAPI AI Directory

nexus

Web search using Perplexity Sonar models, with source citations.

Open website

About this tool

Nexus is a Model Context Protocol (MCP) server designed to provide AI-powered search capabilities through the OpenRouter API. It can be integrated into MCP-capable clients such as Claude Desktop and Cursor, allowing users to search directly within these tools using multiple AI models.

Key Capabilities

Nexus provides the following model-tier search capabilities:

  • sonar: Fast question answering, real-time web search, 30-second timeout, standard tier.
  • sonar-pro: Multi-step queries, real-time web search, 60-second timeout, advanced tier.
  • sonar-reasoning-pro: Chain-of-thought reasoning, real-time web search, 120-second timeout, advanced tier.
  • sonar-deep-research: In-depth research reports, real-time web search, 300-second timeout, advanced tier.
  • grok-4: Based on training data knowledge, no real-time search, 60-second timeout, advanced tier.

It also includes: structured citation extraction, configurable model parameters (temperature, max tokens, timeout override), complete error handling with typed error classes, request caching with TTL, request deduplication for concurrent identical queries, automatic retries with exponential backoff, Winston-based structured logging, and TypeScript strict mode implementation.

Usage

Zero-Installation Run

The server can be executed directly via bunx or npx without a local build:

bunx nexus-mcp

or

npx nexus-mcp

After the server starts, it listens for MCP client connections over STDIO transport.

Environment Requirements

  • Bun 1.0+ (recommended) or Node.js 18+
  • OpenRouter API key (register at openrouter.ai to obtain one)

Integration with MCP Clients

Configure in Claude Desktop's ~/.claude/mcp_settings.json , or add the server configuration according to Cursor's MCP settings:

  • Parameter:["nexus-mcp"]
  • Environment variable:OPENROUTER_API_KEY=your-api-key-here

Generic MCP client connection parameters:

  • Transport: stdio
  • Environment variable:OPENROUTER_API_KEY=your-api-key-here

If Bun is not installed, replace bunx in the configuration with npx. The client must be restarted after configuration changes.

Available Tools

The main search tool provides AI search capabilities, with parameters including:

  • query (required): The search query, 1-2000 characters.
  • model (optional): The model to use, default sonar. Available values are the five models above.
  • maxTokens (optional): Maximum response tokens, 1-4000, default 1000.
  • temperature (optional): Response randomness, 0-2, default 0.3.
  • timeout (optional): Override the default timeout, in milliseconds, 5000-600000.

Environment Variables

  • OPENROUTER_API_KEY(required): OpenRouter API key.
  • NODE_ENV(optional): Environment setting (development, production, test).
  • LOG_LEVEL(optional): Log level (debug, info, warn, error).

Advanced configuration environment variables:

  • OPENROUTER_TIMEOUT_MS: Request timeout in milliseconds, default 30000.
  • OPENROUTER_MAX_RETRIES: Maximum retry count, default 3.
  • OPENROUTER_BASE_URL: Custom OpenRouter API base URL.

The server provides config://status resources, displaying server health status, configuration information (API keys masked), search tool availability, uptime, and version.

Use Cases

Nexus is suitable for developers and users who need to quickly obtain real-time web search results with citations or answers based on training data knowledge in MCP-compatible clients. It is especially suitable for scenarios where users want to avoid complex installation processes and directly invoke AI search in Claude Desktop or Cursor.

Limitations and Notes

  • Requires an OpenRouter API key, and API usage is billed by token consumption (see OpenRouter Models for specific rates).
  • Advanced models (sonar-pro, sonar-reasoning-pro, sonar-deep-research, grok-4) belong to the advanced tier and may incur higher costs.
  • The first run may start slowly due to downloading packages, and subsequent runs will be faster due to caching.
  • If you encounter rate limits, you need to wait for the reset (usually 1 minute) or upgrade your OpenRouter plan.
  • The server requires a Bun 1.0+ or Node.js 18+ runtime.

Installation and Development

Local development installation steps: clone the repository, install dependencies, build the server, configure the OpenRouter API key, and test the server. For specific commands, please refer to the repository documentation.

License

MIT License, see the LICENSE file for details.