# How to Set Up MCP Plugins and External Tool Integrations in DeepSeek-Reasonix

> Learn how to set up MCP plugins and external tool integrations in DeepSeek-Reasonix. Discover how DeepSeek-Reasonix exposes tools via JSON-RPC for seamless integration.

- Repository: [YHH/DeepSeek-Reasonix](https://github.com/esengine/DeepSeek-Reasonix)
- Tags: how-to-guide
- Published: 2026-06-24

---

**DeepSeek-Reasonix treats external tools as MCP (Model-Controlled Plugin) servers that communicate via JSON-RPC over stdio subprocesses or Streamable HTTP endpoints, automatically exposing their tools under the `mcp__<server>__<tool>` namespace after session startup.**

DeepSeek-Reasonix extends its capabilities through a modular plugin architecture built on the MCP protocol. By configuring external tools as MCP servers in [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) or [`.mcp.json`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/.mcp.json), you enable the model to invoke local scripts and remote APIs seamlessly during reasoning sessions.

## Understanding the MCP Architecture

DeepSeek-Reasonix implements a four-layer architecture for managing external integrations. Understanding these layers helps troubleshoot connections and optimize tool usage.

### Configuration Layer

The system discovers MCP servers through `[[plugins]]` entries in [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) or a project-root [`.mcp.json`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/.mcp.json) file. The [`internal/config/config.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/config.go) file handles parsing these declarations, supporting both global user configurations and project-specific overrides. Each entry specifies the transport type—`stdio` for local subprocesses or `http` for remote endpoints.

### MCP Client Implementation

Located in [`internal/plugin/plugin.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/plugin/plugin.go), the client layer manages the lifecycle of each declared server. The `plugin.StartAll` function spawns subprocesses or opens HTTP connections, performs the MCP handshake via `initialize` and `listTools` JSON-RPC methods, and maintains background reconnection logic. Failed connections are recorded via `plugin.RecordFailure` for UI monitoring.

### Tool Registry Integration

The [`internal/tool/tool.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/tool/tool.go) file implements the global `Registry` that unifies built-in and MCP-provided tools. MCP tools are automatically prefixed with `mcp__` and parsed using `tool.SplitMCPName`. The registry supports runtime modifications through `Registry.SuspendPrefix` and `Registry.ResumePrefix`, allowing per-session disabling of problematic servers without restarting the application.

### Frontend Interface

The [`internal/cli/chat_tui.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/chat_tui.go) provides the `/mcp` slash command and desktop MCP panel for manual server management. Users can list connection status, force reconnection, or temporarily disable servers through the chat interface.

## Configuring MCP Plugins

DeepSeek-Reasonix supports three configuration patterns for external tool integration, each suited for different deployment scenarios.

### Stdio Transport for Local Tools

The default transport method spawns local subprocesses. This approach works for compiled binaries, Node.js scripts via `npx`, or Python utilities.

```toml
[[plugins]]
name    = "wordcount"
command = "reasonix-plugin-example"
args    = ["--mode", "wordcount"]

```

The [`internal/plugin/transport_stdio.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/plugin/transport_stdio.go) file handles JSON-RPC framing over stdin/stdout. Environment variables in command arguments are expanded at runtime, keeping credentials out of configuration files.

### HTTP Transport for Remote Services

For cloud-based MCP servers, use the Streamable HTTP transport defined in [`internal/plugin/transport_http.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/plugin/transport_http.go).

```toml
[[plugins]]
name    = "stripe"
type    = "http"
url     = "https://mcp.stripe.com"
headers = { Authorization = "Bearer ${STRIPE_KEY}" }

```

Environment variable expansion (e.g., `${STRIPE_KEY}`) occurs only for MCP-specific fields to prevent credential leakage into model prompts. The HTTP implementation supports POST/GET handling and Server-Sent Events (SSE) for streaming responses.

### Project-Level .mcp.json Compatibility

DeepSeek-Reasonix maintains compatibility with Claude Code's [`.mcp.json`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/.mcp.json) format through [`internal/config/mcpjson.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/mcpjson.go). Place this file in your project root to share MCP configurations across team members:

```json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path"]
    }
  }
}

```

Configurations from [`.mcp.json`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/.mcp.json) are merged with [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) entries at startup, with project-level settings taking precedence over global settings.

## Tool Registration and Naming Conventions

Once connected, MCP tools become available to the model under a strict naming convention. A tool named `count` from the `wordcount` server becomes `mcp__wordcount__count` in the registry.

The [`internal/cli/cli.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/cli.go) file routes model calls matching the `mcp__` prefix to the appropriate server. Similarly, MCP prompts become accessible as slash commands:

```text
/mcp__stripe__list_customers

```

This invokes the `list_customers` prompt on the `stripe` server and streams the response into the chat interface.

### Per-Session Server Management

Disable malfunctioning servers without editing configuration files:

```text
/mcp disable stripe

```

This executes `Registry.SuspendPrefix("mcp__stripe__")` in [`internal/tool/tool.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/tool/tool.go), immediately removing all tools from that server until re-enabled with `/mcp enable stripe`.

## Security and Permission Controls

DeepSeek-Reasonix implements several safeguards for external tool execution:

- **Read-only enforcement**: The registry checks `ReadOnly()` status before allowing parallel batch execution of MCP tools
- **Name space isolation**: All MCP tools are prefixed with `mcp__` to prevent collisions with built-in functions
- **Credential isolation**: Environment variable expansion occurs only in MCP configuration fields, ensuring secrets never appear in model prompts or chat logs

## Summary

- **MCP servers** in DeepSeek-Reasonix communicate via JSON-RPC over **stdio** or **Streamable HTTP** transports
- Configure plugins in [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) using `[[plugins]]` entries or use **.mcp.json** for project-level sharing
- Tools are automatically namespaced as `mcp__<server>__<tool>` and available immediately after the MCP handshake completes
- Manage connections via the **`/mcp`** slash command, which interfaces with `Registry.SuspendPrefix` and `ResumePrefix` for per-session control
- Security features include read-only hints, credential isolation through environment variable expansion, and automatic prefixing to prevent tool collisions

## Frequently Asked Questions

### How do I troubleshoot a failing MCP connection?

Check the failure logs through the `/mcp` command in the chat interface, which displays errors recorded by `plugin.RecordFailure` in [`internal/plugin/plugin.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/plugin/plugin.go). For HTTP servers, verify that environment variables like `${API_KEY}` are set in your host environment, as DeepSeek-Reasonix expands these variables only at runtime without writing them to the process environment.

### Can I use the same MCP server configuration across different projects?

Yes. Place a [`.mcp.json`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/.mcp.json) file in your project root following the Claude Code format, which DeepSeek-Reasonix loads via [`internal/config/mcpjson.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/mcpjson.go). Alternatively, define global MCP servers in your user-level [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) file; project-specific configurations merge with and override global settings.

### What is the difference between disabling and removing an MCP server?

Disabling a server via `/mcp disable <name>` calls `Registry.SuspendPrefix`, which temporarily hides the server's tools for the current session while maintaining the connection. The server remains in your configuration and reconnects automatically in future sessions. Removing a server requires deleting its entry from [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) or [`.mcp.json`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/.mcp.json).

### Are MCP tools executed with the same permissions as DeepSeek-Reasonix?

Yes. Stdio transport servers inherit the parent process environment and permissions, while HTTP transport servers operate with the network permissions of the host machine. The `headers` field in HTTP configurations supports authentication tokens, but DeepSeek-Reasonix does not sandbox MCP server execution—ensure you trust any binary specified in the `command` field.