Skip to main content
Glama
ruixingshi

Deepseek Thinker MCP Server

by ruixingshi

get-deepseek-thinker

Generate reasoning content and thought process visualizations by interfacing with Deepseek's API or local Ollama server for focused analysis.

Instructions

think with deepseek

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originPromptYesuser's original prompt

Implementation Reference

  • Executes the get-deepseek-thinker tool: validates input with schema, selects completion method based on environment variable USE_OLLAMA, calls the appropriate helper function, and returns the reasoning content.
    if (name === "get-deepseek-thinker") {
      const { originPrompt } = GetDeepseekThinkerSchema.parse(args);
    
      if (!originPrompt) {
        return {
          content: [
            {
              type: "text",
              text: "Please enter a prompt",
            },
          ],
        };
      }
    
      let result = '';
      if(process?.env?.USE_OLLAMA){
        result = await getOllamaCompletion(originPrompt);
      }else{
        result = await getCompletion(originPrompt);
      }
      return {
        content: [
          {
            type: "text",
            text: result,
          },
        ],
      };
    } else {
  • Zod schema for validating the tool's input: requires originPrompt as string.
    const GetDeepseekThinkerSchema = z.object({
      originPrompt: z.string(),
    });
  • src/index.ts:97-116 (registration)
    Registers the get-deepseek-thinker tool in the ListToolsRequestHandler, providing name, description, and input schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: "get-deepseek-thinker",
            description: "think with deepseek",
            inputSchema: {
              type: "object",
              properties: {
                originPrompt: {
                  type: "string",
                  description: "user's original prompt",
                },
              },
              required: ["originPrompt"],
            },
          },
        ],
      };
    });
  • Helper function using OpenAI API to get completion from deepseek-r1 model, collects reasoning_content from stream until content is produced.
    async function getCompletion(_prompt: string) {
      const openai = new OpenAI({
        apiKey: process?.env?.API_KEY,
        baseURL: process?.env?.BASE_URL,
      });
    
      try {
        const completion = await openai.chat.completions.create({
          model: 'deepseek-r1',
          messages: [{ role: 'user', content: _prompt }],
          stream: true  // Change to non-streaming output
        });
    
        let reasoningContent = ''; // For collecting all reasoning_content
        // Handle streaming response
        for await (const chunk of completion) {
          if (chunk.choices) {
            // If there's reasoning_content, add it to the collector
            // @ts-ignore
            if (chunk.choices[0]?.delta?.reasoning_content) {
              // @ts-ignore
              reasoningContent += chunk.choices[0].delta.reasoning_content;
            }
            // When content is received, indicating reasoning is complete, return the collected content
            if (chunk.choices[0]?.delta?.content) {
              return "Answer with given reasoning process: " + reasoningContent;
            }
          }
        }
        // @ts-ignore
        return "Answer with given reasoning process: " + completion.choices[0]?.message?.reasoning_content;
      } catch (error) {
        return `Error: ${error}`
      }
    }
  • Alternative helper using Ollama to generate from deepseek-r1, collects response until <think> tags are matched, aborts stream then.
    async function getOllamaCompletion(_prompt: string) {
      let reasoningContent = ''; // For collecting all reasoning_content
      try {
        const response = await ollama.generate({
          model: 'deepseek-r1',
          prompt: _prompt,
          stream: true,
        })
        for await (const part of response) {
          reasoningContent = reasoningContent + part.response;
          // Regex matching
          const regex = /<think>([\s\S]*?)<\/think>/i;
          // If contains <think> and </think>, collect thinkContent
          const thinkContent = reasoningContent.match(regex)?.[1]
          if (thinkContent) {
            ollama.abort();
            return "Answer with given reasoning process: " + thinkContent
          }
        }
        return "Answer with given reasoning process: " + reasoningContent
      } catch (error) {
        return `Error: ${error}`
      }
    }
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'think with deepseek' reveals nothing about whether this is a read/write operation, what permissions are needed, whether it has side effects, rate limits, or what kind of response to expect. It's completely opaque about behavioral characteristics.

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

Conciseness2/5

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

While technically concise with just three words, this is under-specification rather than effective conciseness. The description fails to convey meaningful information, so its brevity is a deficiency rather than a virtue. Every word should earn its place, but here the words don't provide useful content.

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

Completeness1/5

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

For a tool with no annotations and no output schema, the description is completely inadequate. It doesn't explain what the tool does, when to use it, what behavior to expect, or what results it returns. The single parameter is documented in the schema, but the overall context for using this tool is missing entirely.

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%, with the single parameter 'originPrompt' clearly documented as 'user's original prompt'. The description adds no additional parameter information beyond what the schema provides, which is acceptable given the high schema coverage. The baseline of 3 is appropriate when the schema does the documentation work.

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

Purpose2/5

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

The description 'think with deepseek' is a tautology that restates the tool name rather than explaining what the tool actually does. It doesn't specify what resource is being accessed or what operation is performed. While it hints at some thinking/processing function, the purpose remains vague and undefined.

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

Usage Guidelines1/5

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

The description provides absolutely no guidance about when to use this tool, what problems it solves, or what context it's appropriate for. There are no sibling tools mentioned, but even for a standalone tool, this offers no usage context or prerequisites.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ruixingshi/deepseek-thinker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server