English translation for research convenience. The Russian original remains the authoritative source.
CasusLegal CasusLegal Higher-court case-law corpus ← Home

Connect to DeepSeek Harness

Four steps for those who work in the terminal. DeepSeek Harness (the command dsh) is DeepSeek’s open agent environment, where everything is organized through plugins. It connects MCP servers as a client, with an entry in the profile file. There is no sign-in window here; access is passed using a personal token.

The instructions were tested on version dsh 0.1.0-rc.7, and the screenshots were taken in its web interface.

Which address to connect. All databases are available at one address: higher courts, the IP Court, the Judicial Chamber for Administrative Cases, the Judicial Chamber for Criminal Cases and ten commercial cassation districts. Exactly the databases you have paid for are opened; the appropriate neural network selects itself based on the subject of the question.
What is requiredAddress (URL)
All paid databases, including the districtshttps://mcp.casus.legal/one/mcp
Former district address /okrug/mcp continues to work; you do not need to reconnect it. If both addresses are connected, disable /okrug/mcp: otherwise the neural network will see the district tools twice.
⚠️ Environment without a guarantee. Guaranteed to be supported Claude, ChatGPT, Grok and Hermes — the connector has been tested in them. DeepSeek Harness was opened in August 2026 and is changing rapidly. Field names in new versions may differ from those in the instructions; in that case, consult the plugin documentation @deepseek-ai/dsh-mcp-client.
Database access. Welcome free requests in the web chat and Telegram bot do not apply to the connector. Before connecting, enable in your account a three-day free trial or subscribe to the required database.

What you will need

On the CasusLegal side
Active access and a token

A subscription or trial period for the required database and a personal token of the form vasrf_conn_… from the dashboard.

On the DeepSeek side
Installed dsh and profile

One-command installation: npm i -g @deepseek-ai/dsh. The profile web is created automatically on the first launch dsh web.

The DeepSeek model key is needed only for the agent’s responses; the connector itself connects independently of it.

1
Issue a token and put it in the environment variable

Open account, the tab “Connectors”, block “Other environments” and click “Issue token”. The token is displayed once.

Keep it in an environment variable rather than in the configuration text, because profile files can easily end up in backups and repositories.

export CASUSLEGAL_TOKEN=vasrf_conn_your_token

The token remains valid while the subscription is active and opens all paid databases. It does not disrupt already configured Claude and ChatGPT it does not break it.

2
Add the server to the profile patch layer

User profile changes are stored in the file cordis.patch.yml in the profile directory. For a web profile this is ~/.dsh/profiles/web/cordis.patch.yml. The adjacent cordis.yml — this is the profile root; it must not be edited, as stated in the file itself.

A new entry is added via insert. This is the key point. A patch without insert is treated as a change to an existing entry, and dsh will silently skip it with a warning patch: entry … not found.

~/.dsh/profiles/web/cordis.patch.yml

- insert: - id: mcp-casuslegal name: '@deepseek-ai/dsh-mcp-client' config: serverName: casuslegal transport: streamable-http url: https://mcp.casus.legal/one/mcp headers: Authorization: !!js '`Bearer ${process.env.CASUSLEGAL_TOKEN}`' # one search takes ~30 seconds: the default value (60 000 ms) is insufficient toolCallTimeoutMs: 180000

The connection address is https://mcp.casus.legal/one/mcp. This is a single address: it provides access to all databases covered by your subscription, and it automatically selects the appropriate AI model based on the subject of the question. If you need a connector for a single database, separate addresses are also available (IP Court — https://sip.casus.legal/mcp, KAS — https://kas.casus.legal/mcp, KUD — https://kud.casus.legal/mcp), but the address must then match the database covered by your subscription; otherwise, the server will respond “the subscription is inactive or has expired.” There is no need to keep both the single address and separate addresses at the same time: the AI model will see two identical sets of tools and search twice. The complete table of addresses is below, under the steps.

In serverName Latin letters, digits, hyphens and underscores are allowed, up to 32 characters, and the value must be unique among connected servers. Tool names are generated from it mcp__casuslegal__….

If you need several databases, add one block for each to the same list, changing id, serverName and the address from the table below. The token is the same in all blocks.

3
Check that the entry has appeared in the profile tree

A separate command prints the assembled profile configuration. It does not start the environment:

dsh --profile web --dump-config | tail -20

At the end of the output, your entry should appear with a source marker # == ~/.dsh/profiles/web/cordis.patch.yml. If a warning was printed instead patch: entry … not found, this means that insert from step 2 was lost.

4
Launch dsh and make sure the plugin has started

Start the environment: dsh web — it will start a local web interface and print its address.

DeepSeek Harness main web-interface screen: a session list and Settings button on the left, with an input field in the center.
Main screen DeepSeek Harness. The button Settings — at the bottom left.

Open Settings → Plugins: this page lists the plugins in the installed build.

The Plugins section in DeepSeek Harness settings, with the Plugin configuration and Plugin list tabs.
Section Plugins: the tab Plugin configuration — settings, Plugin list — the full list.

Go to the tab Plugin list and enter in the search field mcp. The entry mcp-client in the status Enabled means that the client is mounted and connecting to our server.

The Plugin list tab with the mcp filter: one mcp-client entry found with Enabled status.
Filter by word mcp: mcp-client — Enabled. This is what a mounted connector looks like.

Next, ask the agent a substantive question, for example: “Find Supreme Court of the Russian Federation case law on reducing a penalty under Article 333 of the Civil Code of the Russian Federation.” The connector’s tools will be provided to the model under the names mcp__casuslegal__….

Addresses: single and database-specific

DatabaseserverNameAddress (URL)
All subscribed databases at oncecasuslegalhttps://mcp.casus.legal/one/mcp
Commercial cassation districts (all)casuslegal_okrugahttps://mcp.casus.legal/okrug/mcp
Higher courts: Constitutional Court · Supreme Court · Supreme Commercial Courtcasuslegalhttps://mcp.casus.legal/mcp
Intellectual Property Court (IP Court)casuslegal_siphttps://sip.casus.legal/mcp
Administrative cases (KAS · Judicial Chamber for Administrative Cases of the Supreme Court of the Russian Federation)casuslegal_kashttps://kas.casus.legal/mcp
Criminal cases (KUD · Judicial Chamber for Criminal Cases of the Supreme Court of the Russian Federation)casuslegal_kudhttps://kud.casus.legal/mcp

Useful plugin fields

FieldPurpose
toolCallTimeoutMsTimeout for a single tool call. The default is 60 000 ms; for corpus searches, set it to 180 000.
failOnStartupErrorWith the value true the build will not start if the connector is unavailable. This is useful for avoiding unknowingly working “without case law.”
reconnect.enabledAutomatic reconnection after a connection loss. Enabled by default.

Typical errors

At startup, the warning “patch: entry … not found” appears

The patch is missing insert. Without it, the entry is treated as a change to an existing plugin with that id, and dsh it is skipped. The connector simply does not appear, without an explicit error.

Check the block from step 2 and repeat dsh --profile web --dump-config.

The plugin is Enabled, but the model has no tools

The client activates even when the connection fails; this is intentional: the build must not fail because a server is unavailable. Check that the variable CASUSLEGAL_TOKEN is visible to the process, meaning that it has been exported in the same shell from which dsh.

To make such cases immediately visible, set in the configuration failOnStartupError: true.

Transport: streamable-http or sse?

Only streamable-http. Our address works over Streamable HTTP; with the value sse or stdio the connection cannot be established.

The tool call times out

A single corpus search takes about 30 seconds, and a complex question triggers several searches in succession. The standard 60 000 ms is insufficient; set toolCallTimeoutMs: 180000.

The connector returns a subscription error

Open the “Connectors” tab in your account and check the subscription period for the required database. Each corpus is billed separately; “Higher Courts” is included in every plan.

The token has been lost

It is not shown again. Issue a new one in the account and replace the environment variable’s value; existing connections will not be disconnected.

RU