Wolfram Mathematica for DeepSeek Harness

Introduction

The plugin-based architecture of DeepSeek Harness (DSH) allows developers to mount various computation backends without modifying the core logic. When complex computation, symbolic derivation, or notebook manipulation is needed in Wolfram Language, invoking the local Mathematica kernel directly from within DSH is a common requirement. The dsh-wolfram-mcp plugin exposes the local kernel as a DSH-invokable tool via an MCP tool server.

What Is This

dsh-wolfram-mcp is a DeepSeek Harness plugin authored by maintainer FZZoooh. It does not implement its own communication protocol; instead, it leverages the built-in MCP server from the Wolfram/AgentTools paclet to bridge and mount @deepseek-ai/dsh-mcp-client onto wolfram.exe. By configuring the absolute path to the kernel executable, the plugin creates a Loader entry named wolfram-mcp-bridge at runtime, enabling the agent to invoke local Mathematica through mcp__wolfram__* tools.

Key Features

  • Configure the absolute path to the kernel executable via the plugin UI — no hardcoding or path guessing.
  • Creates a Loader entry at runtime that mounts @deepseek-ai/dsh-mcp-client and connects to local Mathematica.
  • Provides a set of mcp__wolfram__* tools supporting Wolfram Language code execution, context reading, symbol definitions, notebook read/write, code inspection, and test reporting.
  • Supports restarting the kernel (Restart kernel) from the UI to recover a stuck kernel or reload the bridge.
  • Includes tolerance and reconstruction mechanisms for timeouts and cold starts.

Installation & Enablement

Add the plugin specification under Plugins > Add plugin in DSH:

github:FZZoooh/dsh-wolfram-mcp

You can also install the same specification using the install_bundle command via the plugin_manager tool. After installation, the profile will depend on the corresponding Git repository. The local checkout can be moved or deleted; to pick up new commits, simply reinstall from the same specification.

Configuring the Kernel Path

  1. Open Plugins in the sidebar and select Wolfram Mathematica.
  2. On the plugin page, locate the Kernel executable field (between the description and components), enter the absolute path to the kernel executable, and save.

On Windows, the executable is typically located at <Mathematica install path>\wolfram.exe. Use the full file path — do not use a Start Menu shortcut or wolframscript.exe. The plugin accepts any path that the current user can execute. Clearing this field removes the path override and disables the tools, while the plugin itself remains enabled.

Saving the field updates the running plugin in place (the field is volatile), and the bridge reconnects automatically without requiring a DSH restart. Changing the path starts a new kernel; the old kernel is stopped along with the old bridge entry. Clicking Restart kernel on the same page rebuilds the bridge and starts a new kernel, but does not modify the saved path. Use this button to recover when evaluation is no longer responsive.

Tool List

Once connected, the agent can see tools prefixed with mcp__wolfram__. The default tool set includes:

  • WolframLanguageEvaluator: Execute Wolfram Language code in a persistent kernel, maintaining session state.
  • WolframLanguageContext: Read the current session context and definitions.
  • SymbolDefinition: Display the definition of a symbol.
  • ReadNotebook / WriteNotebook: Read and write .nb notebook files.
  • CodeInspector: Perform static inspection of Wolfram Language code.
  • TestReport: Run a test file and generate a results report.

Typical Usage

In DSH, these tools can be used via natural language or explicit tool calls. For example, ask the agent to read the current session context:

Call mcp__wolfram__WolframLanguageContext

Or execute a piece of Wolfram Language code:

Call mcp__wolfram__WolframLanguageEvaluator, args: {"code": "Sum[1/i^2, {i, 1, 10]}"}

These tools are executed through the configured kernel and return results. If longer computations are needed, you can pass a larger timeConstraint parameter when invoking (note the server default limit is 60 seconds, with an additional transport-layer limit of 5 minutes).

Use Cases & Caveats

This plugin is suitable for scenarios that require direct Wolfram Language capabilities within DSH, such as mathematical derivation, symbolic computation, notebook interaction, code inspection, and automated testing. Before use, please ensure:

  • Mathematica version is 14.3 or higher, the Wolfram/AgentTools paclet is installed, and the license is activated.
  • The kernel executable path is correctly configured and executable by the current user.
  • The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license (MIT) before installation.

Important Notes

  • Each configured bridge spawns a kernel process. Tools appear within a few seconds, or after a bridge rebuild.
  • A single evaluation is limited to 60 seconds by default and can be extended via parameters; the transport-layer cap is 5 minutes.
  • If the path is missing or invalid, the MCP connection will fail and log an error, while the plugin itself continues to run. You will need to reopen the configuration page to correct the path.
  • If the kernel crashes or hangs, the call will time out; use the Restart kernel button in the UI to rebuild the bridge.

Summary

The dsh-wolfram-mcp plugin integrates the local Wolfram Mathematica kernel into DeepSeek Harness as MCP tools, enabling the agent to directly leverage Wolfram Language’s computation and notebook capabilities. By configuring the path through the UI, the plugin creates the bridge at runtime and supports kernel restarts when things get stuck. DSH users who need Wolfram Language capabilities can adopt this as a workflow plugin.

  • Catalog page: https://www.skillhub.cn/plugins/FZZoooh/dsh-wolfram-mcp
  • GitHub: https://github.com/FZZoooh/dsh-wolfram-mcp
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye