How MCP Prompts Translate into Slash Commands and Resources Map to '@' References in DeepSeek-Reasonix

Reasonix converts MCP server prompts into slash commands using the /mcp__<server>__<prompt> format and exposes resources via @<server>:<uri> syntax, enabling model interaction with external tools through standardized namespaces.

DeepSeek-Reasonix treats each MCP (Model-Centered Plugin) server as a distinct namespace, transforming advertised capabilities into intuitive command-line interfaces. This architecture allows users to invoke complex prompt templates through slash commands and embed external resources using '@' references. Understanding these mappings is essential for integrating MCP servers effectively into your Reasonix workflows.

Understanding MCP Prompt to Slash Command Translation

When an MCP server advertises available prompts through the prompts/list RPC, Reasonix does not expose these raw names directly to the model. Instead, it constructs a model-visible tool name by applying a strict prefixing convention that creates unambiguous slash commands.

The Namespace Convention

In internal/plugin/prompts.go (line 54), Reasonix assembles tool names using the following pattern:

Name: "mcp__" + normalizeName(c.name) + "__" + normalizeName(p.Name),

This generates commands in the format /mcp__<server>__<prompt>, where:

  • <server> represents the configured server name from your [[plugins]] definition (either stdio or http type)
  • <prompt> corresponds to the original prompt name returned by the server's prompts/list RPC

For example, if a server named docs advertises a prompt called summarize, Reasonix exposes this as /mcp__docs__summarize.

Parsing Slash Command Arguments

The command body—everything following the first space—is parsed into positional arguments that map sequentially to the prompt's declared PromptArg parameters. This behavior mirrors Claude Code's MCP client implementation.

When you executing a command like:

/mcp__docs__summarize The quickstart guide

Reasonix performs the following operations:

  1. Parses the command to identify server="docs" and prompt="summarize"
  2. Maps "The quickstart guide" to the prompt's first declared argument
  3. Invokes Prompt.Get in internal/plugin/prompts.go, which calls the MCP RPC prompts/get
  4. Concatenates the returned messages into a single text block prepended to the model's input

The resolution logic in internal/control/input.go (line 500) handles this via the MCPPrompt function, ensuring arguments align with the server's expected schema.

How Resources Map to '@' References

Beyond prompts, MCP servers expose resources—files, API schemas, or documents—that Reasonix makes accessible through a concise reference syntax.

Resource Reference Syntax

Resources use the format @<server>:<uri>, where:

  • <server> identifies the MCP server name defined in your configuration
  • <uri> represents the canonical resource URI as exposed by the server's resources/list endpoint

The Resource struct in internal/plugin/resources.go (lines 10-12) defines this relationship:

type Resource struct {
    Server      string // owning server name
    URI         string // canonical resource uri
    // …
}

Fetching Resource Content

When the Reasonix UI detects an @ token in chat input, it triggers readResource (line 50 in internal/plugin/resources.go). This function executes the MCP RPC resources/read, retrieves the resource content, and flattens text data (or notes binary blobs) directly into the conversation context.

For example, entering:

Please review the API spec: @docs:file://api/spec.md

Reasonix automatically fetches the markdown content from the docs server and inserts it before the model processes your request.

Practical Implementation Examples

Invoking MCP Prompts via Slash Commands

To use a prompt advertised by an MCP server:

/mcp__docs__summarize The quickstart guide

Here, docs is the server name and summarize is the prompt. The argument "The quickstart guide" maps to the prompt's declared parameter (e.g., text).

Referencing Resources with '@' Syntax

Embed external resources directly into your queries:

Please review the API spec: @docs:file://api/spec.md

Reasonix resolves this by calling readResource, fetching the content via resources/read, and prepending it to your prompt.

Programmatic Construction in Go

When building integrations programmatically, construct these strings following the normalization rules:

// Build a slash command for a prompt
cmd := fmt.Sprintf("/mcp__%s__%s %s", server, prompt, strings.Join(args, " "))

// Build an @‑reference for a resource
ref := fmt.Sprintf("@%s:%s", server, uri)

These strings work with both the Reasonix CLI and TUI, triggering the same resolution pipelines as manual input.

Key Implementation Files

The following source files govern MCP integration:

Summary

  • Slash commands follow the format /mcp__<server>__<prompt>, constructed in internal/plugin/prompts.go by prefixing server and prompt names with mcp__
  • Command arguments parse as positional parameters mapped to PromptArg declarations, resolved via MCPPrompt in internal/control/input.go
  • Resource references use @<server>:<uri> syntax, triggering readResource in internal/plugin/resources.go to fetch content via the resources/read RPC
  • Both mechanisms treat MCP servers as namespaces, preventing naming collisions while exposing external capabilities to the model

Frequently Asked Questions

What happens if two MCP servers expose prompts with identical names?

Reasonix prevents collisions by namespacing each prompt with its server identifier. Since slash commands follow the /mcp__<server>__<prompt> format, identical prompt names from different servers remain unique (e.g., /mcp__serverA__analyze vs /mcp__serverB__analyze).

How are arguments passed to MCP prompts when using slash commands?

Arguments provided after the slash command are parsed as positional parameters and mapped in order to the prompt's declared PromptArg definitions. For example, /mcp__docs__summarize "text here" assigns "text here" to the first argument expected by the summarize prompt.

Can I use multiple '@' references in a single prompt?

Yes. Reasonix scans the entire input for @<server>:<uri> tokens and invokes readResource for each occurrence. All fetched resources are prepended to the model's context before processing your request, allowing you to combine multiple external sources.

What is the difference between 'prompts' and 'resources' in the MCP protocol?

Prompts are templates that require arguments and generate structured messages via the prompts/get RPC, exposed as slash commands. Resources are static content (files, schemas, documents) accessed via resources/read and referenced using @ syntax, requiring no additional arguments beyond the URI.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →