Skip to main content
Glama
niko91i

Deepseek-Thinking-Claude-3.5-Sonnet-CLINE-MCP

by niko91i

深探-思考-克劳德-3.5-十四行诗-CLINE-MCP

铁匠徽章

模型上下文协议 (MCP) 服务器,通过 OpenRouter 将 DeepSeek R1 的推理功能与 Claude 3.5 Sonnet 的响应生成功能相结合。此实现采用两阶段流程,其中 DeepSeek 提供结构化推理,然后将其整合到 Claude 的响应生成中。

特征

  • 两阶段处理:

    • 使用 DeepSeek R1 进行初步推理(50k 个字符上下文)

    • 使用 Claude 3.5 Sonnet 进行最终响应(600k 字符上下文)

    • 两种模型都可以通过 OpenRouter 的统一 API 访问

    • 将 DeepSeek 的推理标记注入 Claude 的上下文中

  • 智能对话管理:

    • 使用文件修改时间检测活动对话

    • 处理多个并发对话

    • 自动过滤已结束的对话

    • 需要时支持上下文清除

  • 优化参数:

    • 特定于模型的上下文限制:

      • DeepSeek:50,000 个字符用于集中推理

      • 克劳德:60万字的综合回复

    • 推荐设置:

      • 温度:0.7,代表平衡创造力

      • top_p:1.0,表示完全概率分布

      • repetition_penalty: 1.0 以防止重复

Related MCP server: DeepSeek-Claude MCP Server

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 DeepSeek Thinking with Claude 3.5 Sonnet:

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

手动安装

  1. 克隆存储库:

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. 安装依赖项:

npm install
  1. 使用您的 OpenRouter API 密钥创建一个.env文件:

# 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. 构建服务器:

npm run build

与 Cline 一起使用

添加到您的 Cline MCP 设置(通常在~/.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": []
    }
  }
}

工具使用

服务器提供了两种用于生成和监控响应的工具:

生成响应

用于生成具有以下参数的响应的主要工具:

{
  "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
}

检查响应状态

检查响应生成任务状态的工具:

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

响应轮询

服务器使用轮询机制来处理长时间运行的请求:

  1. 初始请求:

    • generate_response立即返回任务 ID

    • 响应格式: {"taskId": "uuid-here"}

  2. 状态检查:

    • 使用check_response_status轮询任务状态

    • **注意:**回复最多可能需要 60 秒才能完成

    • 状态进展如下:待处理 → 推理 → 响应 → 完成

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
}

发展

对于使用自动重建的开发:

npm run watch

工作原理

  1. 推理阶段(DeepSeek R1) :

    • 使用 OpenRouter 的推理令牌功能

    • 修改提示,在捕获推理的同时输出“完成”

    • 从响应元数据中提取推理

  2. 响应阶段(克劳德 3.5 十四行诗) :

    • 接收原始提示和 DeepSeek 的推理

    • 生成包含推理的最终答案

    • 保留对话上下文和历史记录

执照

MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件。

致谢

基于Skirano的 RAT(检索增强思维)概念,通过结构化推理和知识检索增强 AI 响应。

该实现具体通过 OpenRouter 的统一 API 将 DeepSeek R1 的推理能力与 Claude 3.5 Sonnet 的响应生成结合起来。

Available Tools

2 tools
check_response_statusB

Check the status of a response generation task

ParametersJSON Schema
NameRequiredDescriptionDefault
taskIdYesThe task ID returned by generate_response

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool checks status but doesn't explain what the status values mean, whether it's read-only or has side effects, or any rate limits or authentication needs. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to grasp immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (checking task status) and the lack of annotations and output schema, the description is incomplete. It doesn't explain what status information is returned, potential outcomes, or error conditions, leaving the agent without enough context to fully understand the tool's behavior and results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'taskId' parameter clearly documented as 'The task ID returned by generate_response.' The description adds no additional parameter semantics beyond this, so it meets the baseline score of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('check') and resource ('status of a response generation task'), making it immediately understandable. However, it doesn't explicitly differentiate from its sibling tool 'generate_response' beyond the implied relationship, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by referencing 'taskId returned by generate_response,' suggesting this tool should be used after initiating a task with its sibling. However, it lacks explicit guidance on when to use it versus alternatives or any prerequisites beyond the task ID, leaving some ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_responseC

Generate a response using DeepSeek's reasoning and Claude's response generation through OpenRouter.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesThe user's input prompt
showReasoningNoWhether to include reasoning in response
clearContextNoClear conversation history before this request
includeHistoryNoInclude Cline conversation history for context

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the AI models involved (DeepSeek and Claude) and the platform (OpenRouter), but doesn't describe key behavioral traits like rate limits, authentication needs, response format, error handling, or whether it's a read/write operation. The description adds some context about the implementation but lacks crucial operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core functionality without unnecessary words. It's appropriately sized for the tool's complexity and gets straight to the point. Every word earns its place by specifying both the action and the implementation method.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, how to interpret results, error conditions, or operational constraints. For a tool that presumably generates AI responses through external services, more context about response format, limitations, and integration details would be needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents all 4 parameters. The description adds no parameter-specific information beyond what's in the schema. It doesn't explain how parameters interact (e.g., how 'clearContext' and 'includeHistory' relate) or provide usage examples. This meets the baseline of 3 when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Generate a response') and specifies the implementation method ('using DeepSeek's reasoning and Claude's response generation through OpenRouter'). It distinguishes from the sibling tool 'check_response_status' by focusing on generation rather than status checking. However, it doesn't specify what type of response is generated (e.g., text completion, analysis, etc.), keeping it at a 4 rather than a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to use it over other response generation methods or when the sibling tool 'check_response_status' would be appropriate. There's no context about use cases, prerequisites, or limitations, leaving the agent with minimal usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updates
    • First observedcheck_response_status
    • First observedgenerate_response

TDQS

B3/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one checks the status of a task, while the other initiates the task itself. There is no overlap or ambiguity between monitoring and execution functions.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern (check_response_status, generate_response) with clear action-oriented names. The naming is uniform and predictable across the set.

Tool Count2/5

With only 2 tools, the server feels thin for its apparent scope of AI response generation with reasoning and status tracking. This minimal set may force agents to work around missing operations like error handling or configuration adjustments.

Completeness2/5

The toolset is severely incomplete for a response generation service. It lacks essential operations such as canceling tasks, retrieving task history, configuring generation parameters, or handling errors, which are typical in such AI workflow domains.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers