Cover image
Try Now
2025-04-04

与Claude Desktop和其他MCP客户端集成在一起的MCP服务器

3 years

Works with Finder

1

Github Watches

0

Github Forks

1

Github Stars

Perplexity Sonar MCP Server

An MCP server implementation that brings the power of Perplexity's Sonar models to Claude Desktop and other MCP clients. Unlike traditional MCP servers, this implementation provides access to Perplexity's advanced AI models with web search capabilities, allowing Claude to perform real-time web searches and provide up-to-date information during conversations.

Why Perplexity Sonar MCP?

  • Real-time Web Search: Access current information from the web during conversations
  • Multiple Models: Choose from various Sonar models to fit your needs:
    • sonar: Balanced model for general use
    • sonar-pro: Enhanced capabilities for complex tasks
    • sonar-reasoning: Specialized in logical reasoning and analysis
    • sonar-deep-research: In-depth research with comprehensive citations
  • Rich Parameters: Fine-tune your queries with extensive parameters:
    • Control search domains and recency
    • Adjust response format (markdown/JSON)
    • Manage temperature and token generation
    • Get related questions and images
  • Seamless Integration: Works natively with Claude Desktop and other MCP clients

Requirements

To verify your Node.js installation:

node --version  # Should be 18.0.0 or higher

If Node.js is not installed or needs updating:

  1. Download from nodejs.org
  2. Follow the installation instructions for your operating system
  3. Restart your terminal after installation

Usage

With Claude Desktop

  1. Edit your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the following configuration:

    {
      "mcpServers": {
        "perplexity": {
          "command": "npx",
          "args": [
            "-y",
            "@felores/perplexity-sonar-mcp"
          ],
          "env": {
            "PERPLEXITY_API_KEY": "your_api_key_here"
          }
        }
      }
    }
    
  3. Restart Claude Desktop

Standalone Mode

You can also run the server in standalone mode with HTTP/SSE support:

PERPLEXITY_API_KEY=your_api_key_here perplexity-sonar-mcp

This will start the server on port 3000 by default. You can specify a different port:

PERPLEXITY_API_KEY=your_api_key_here PORT=8080 perplexity-sonar-mcp

API Reference

The server exposes the following MCP tool:

perplexity-chat

Parameters:

  • model (optional): Model to use (default: "sonar")
    • Options:
      • sonar: Balanced model for general use
      • sonar-pro: Enhanced capabilities for complex tasks
      • sonar-reasoning: Specialized in logical reasoning
      • sonar-deep-research: In-depth research with citations
  • messages: Array of message objects with:
    • role: "system" | "user" | "assistant"
    • content: string
  • temperature (optional): Controls randomness (0-2)
    • Lower values (e.g., 0.3) for more focused responses
    • Higher values (e.g., 0.8) for more creative responses
  • max_tokens (optional): Maximum tokens to generate
  • top_p (optional): Controls diversity via nucleus sampling (0-1)
  • search_domain_filter (optional): Array of domains to limit citations to
    • Example: ["wikipedia.org", "github.com"]
  • return_images (optional): Whether to return images from search results
  • return_related_questions (optional): Whether to return related questions
  • search_recency_filter (optional): Filter search results by recency
    • Options: "month", "week", "day", "hour"
  • top_k (optional): Maximum number of search results to consider
  • stream (optional): Whether to stream the response
  • presence_penalty (optional): Penalizes token presence
  • frequency_penalty (optional): Penalizes token frequency
  • output_format (optional): Response format ("json" or "markdown", default: "markdown")

Example Queries

Here are some examples of what you can ask Claude using this server:

  1. Basic search with default model: "What are the latest developments in quantum computing?"

  2. Deep research with citations: "Using sonar-deep-research, explain the current state of fusion energy."

  3. Domain-specific search: "Search only on arxiv.org and nature.com for recent papers about large language models."

  4. Recent news search: "What happened in AI research this week? Use search_recency_filter: 'week'"

Development

  1. Clone the repository:

    git clone https://github.com/felores/perplexity-sonar-mcp.git
    cd perplexity-sonar-mcp
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    
  4. Run in development mode:

    npm run dev
    

Troubleshooting

If you encounter issues:

  1. Verify your API key is correct
  2. Check Node.js version compatibility
  3. Look for errors in Claude Desktop logs:
    • macOS: ~/Library/Logs/Claude/mcp.log
    • Windows: %APPDATA%\Claude\logs\mcp.log
  4. Try running in standalone mode to isolate issues

License

MIT

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • JackKuo666
  • 🔍使AI助手可以通过简单的MCP接口搜索和访问PYPI软件包信息。

    Reviews

    3 (1)
    Avatar
    user_RbME2Qx0
    2025-04-17

    As an avid user of Perplexity-Sonar-MCP by felores, I am thoroughly impressed with its performance and reliability. The application seamlessly integrates with my work requirements and provides top-notch user experience. Its efficient handling of perplexity measures sets it apart, making it an indispensable tool in my toolkit. Highly recommend! Check it out at https://github.com/felores/perplexity-sonar-mcp.