RAT (Retrieval Augmented Thinking) MCP server

Combines DeepSeek's analysis with multiple response models to enhance AI conversation quality through structured two-stage reasoning.
Back to servers
Setup instructions
Provider
Skirano
Release date
Jan 26, 2025
Language
TypeScript
Stats
109 stars

This MCP server combines DeepSeek R1's reasoning capabilities with Claude 3.5 Sonnet's response generation through OpenRouter. It uses a two-stage process where DeepSeek provides structured reasoning that is then incorporated into Claude's final response, giving you the benefits of both models.

Installation Options

Automatic Installation via Smithery

Install the server automatically with Smithery:

npx -y @smithery/cli install @newideas99/Deepseek-Thinking-Claude-3.5-Sonnet-CLINE-MCP --client claude

Manual Installation

  1. Clone the repository:
git clone https://github.com/yourusername/Deepseek-Thinking-Claude-3.5-Sonnet-CLINE-MCP.git
cd Deepseek-Thinking-Claude-3.5-Sonnet-CLINE-MCP
  1. Install dependencies:
npm install
  1. Create a .env file with your OpenRouter API key:
# Required: OpenRouter API key for both DeepSeek and Claude models
OPENROUTER_API_KEY=your_openrouter_api_key_here

# Optional: Model configuration (defaults shown below)
DEEPSEEK_MODEL=deepseek/deepseek-r1  # DeepSeek model for reasoning
CLAUDE_MODEL=anthropic/claude-3.5-sonnet:beta  # Claude model for responses
  1. Build the server:
npm run build

Configuring with Cline

Add the server to your Cline MCP settings (usually located at ~/.vscode/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):

{
  "mcpServers": {
    "deepseek-claude": {
      "command": "/path/to/node",
      "args": ["/path/to/Deepseek-Thinking-Claude-3.5-Sonnet-CLINE-MCP/build/index.js"],
      "env": {
        "OPENROUTER_API_KEY": "your_key_here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Using the Server

The server provides two main tools for generating and monitoring responses.

Generating Responses

Use the generate_response tool with these parameters:

{
  "prompt": string,           // Required: The question or prompt
  "showReasoning"?: boolean, // Optional: Show DeepSeek's reasoning process
  "clearContext"?: boolean,  // Optional: Clear conversation history
  "includeHistory"?: boolean // Optional: Include Cline conversation history
}

Checking Response Status

Use the check_response_status tool to monitor progress:

{
  "taskId": string  // Required: The task ID from generate_response
}

Response Polling Workflow

The server uses an asynchronous polling mechanism:

  1. Make an initial request with generate_response
  2. Receive a task ID immediately
  3. Use check_response_status to poll until complete
    • Responses can take up to 60 seconds
    • Status progresses through: pending → reasoning → responding → complete

Example Usage in Cline

// Initial request
const result = await use_mcp_tool({
  server_name: "deepseek-claude",
  tool_name: "generate_response",
  arguments: {
    prompt: "What is quantum computing?",
    showReasoning: true
  }
});

// Get taskId from result
const taskId = JSON.parse(result.content[0].text).taskId;

// Poll for status (may need multiple checks over ~60 seconds)
const status = await use_mcp_tool({
  server_name: "deepseek-claude",
  tool_name: "check_response_status",
  arguments: { taskId }
});

// Example status response when complete:
{
  "status": "complete",
  "reasoning": "...",  // If showReasoning was true
  "response": "..."    // The final response
}

Feature Overview

Two-Stage Processing

  • Uses DeepSeek R1 for initial reasoning (50k character context)
  • Uses Claude 3.5 Sonnet for final response (600k character context)
  • Both models accessed through OpenRouter's unified API

Smart Conversation Management

  • Detects active conversations using file modification times
  • Handles multiple concurrent conversations
  • Filters out ended conversations automatically
  • Supports context clearing when needed

Recommended Settings

  • Temperature: 0.7 for balanced creativity
  • Top_p: 1.0 for full probability distribution
  • Repetition_penalty: 1.0 to prevent repetition

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "deepseek-claude" '{"command":"node","args":["/path/to/Deepseek-Thinking-Claude-3.5-Sonnet-CLINE-MCP/build/index.js"],"env":{"OPENROUTER_API_KEY":"your_key_here"},"disabled":false,"autoApprove":[]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "deepseek-claude": {
            "command": "node",
            "args": [
                "/path/to/Deepseek-Thinking-Claude-3.5-Sonnet-CLINE-MCP/build/index.js"
            ],
            "env": {
                "OPENROUTER_API_KEY": "your_key_here"
            },
            "disabled": false,
            "autoApprove": []
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "deepseek-claude": {
            "command": "node",
            "args": [
                "/path/to/Deepseek-Thinking-Claude-3.5-Sonnet-CLINE-MCP/build/index.js"
            ],
            "env": {
                "OPENROUTER_API_KEY": "your_key_here"
            },
            "disabled": false,
            "autoApprove": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later