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

Connect to Hermes

The fourth officially supported environment. Unlike the other three, the program itself is free, while any model of your choice can be connected to it.

Hermes is an agent from the Nous Research laboratory. There is a desktop application for Windows, macOS and Linux, as well as a terminal version; they share the same settings. The CasusLegal connector is added as an MCP server: two fields and sign-in through Telegram or with a password. Both methods are described below: with and without the application.

How Hermes differs from Claude, ChatGPT and Grok

Advantage 1
The program itself is free

Hermes and its desktop application are distributed free of charge under an open-source MIT licence. There is no subscription for the agent itself: you pay only for the tokens used by the model you connect. If the model runs locally, you do not pay for those either.

For comparison: custom connectors in Claude and ChatGPT are available only on the assistants’ paid plans. The exception is Grok: xAI states that connectors are available to all users, including those on the free plan; on that plan, the fast model from the Fast line responds, and the number of requests is limited.

Advantage 2
Any model, not just one

In Claude works Claude, in ChatGPT — GPT, in Grok — Grok. Hermes is not tied to a model. A single key OpenRouter gives immediate access to hundreds of models from different developers. Alternatively, you can connect a direct provider key: Anthropic, OpenAI, Google, xAI, DeepSeek, Qwen, Kimi, GLM, MiniMax and others (the Hermes documentation lists more than thirty). You can run a model locally (Ollama, LM Studio, llama.cpp) or specify any URL of your choice, compatible with the OpenAI format.

The model can be switched directly in the dialogue using the command /model; the connector remains connected.

Advantage 3
Models can be compared using the same question

The same query, the same CasusLegal database, different models—and you can immediately see which handles case law more accurately, which deals with quotations more carefully, and which is simply cheaper for the same volume.

This comparison is not available in the other three environments: there, the choice is limited to the assistant developer’s own models.

Advantage 4
Choose the price to suit the task

You can conduct an initial search using an inexpensive or free model, and analyse the selected judicial acts using an expensive one. Hermes shows current-session usage and context occupancy in the status bar, while the command /usage.

The CasusLegal subscription is a single subscription and does not affect the model’s cost: the connector returns the same judicial acts regardless of the model. The available ways to pay for tokens are discussed below, in the section “How to pay for the model.”

Advantage 5
Materials remain on your computer

Hermes operates locally: the conversation, memory, keys and settings are stored in the profile folder on your computer, not in the developer’s cloud. The contents of requests are sent only where you send them yourself: to the selected model provider and the CasusLegal connector.

For working with client materials, this is a materially different arrangement from a cloud chat.

Advantage 6
The application and terminal are one program

The configuration, keys and dialogue history are shared: connect a connector in the application, and it is also available in the terminal, and vice versa. You can switch freely.

Scheduled tasks, sub-agents and skills are also available there, including CasusLegal skills.

EnvironmentModelFee for the environment itself
Claudeonly Claudethe assistant’s paid plan
ChatGPTGPT onlypaid plan + developer mode
Grokonly Grokno: connectors are available on the free plan as well; the subscription removes the limits
Hermesany: OpenRouter, a direct provider key, or a local modelno, the program is free

Plan terms Claude, ChatGPT and Grok are set by their developers and may change without our involvement; check their websites before purchasing.

Database access. Introductory free requests in the web chat and Telegram bot do not apply to the connector. Before connecting for the first time, enable in your account a three-day free trial or subscribe to the required database.
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.
⚠️ The server name must use Latin characters only. The name under which the connector is added to Hermes (casuslegal, sip, kas, kud), is used in internal tool identifiers. A Cyrillic name breaks their assembly: the server will connect and appear in the settings, but in a chat the model will respond that it cannot see any tools. If you have already named it in Russian, delete the server and add it again using Latin characters.

Installing Hermes

If Hermes is already installed, proceed directly to connecting the connector. There are two installation methods; the result is the same, only the process differs.

Option A — desktop application (suitable for most users)

Open official Hermes website, download the installer for your system and run it. On first launch, the application will ask which provider and model to use; you can change this choice at any time.

On Windows, the installer does not require administrator privileges and automatically obtains the necessary components.

Option B — terminal

Windows, PowerShell:

iex (irm https://hermes-agent.nousresearch.com/install.ps1)

macOS, Linux or WSL2:

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

After installation, close and reopen the terminal, then check hermes --version and perform the initial setup hermes setup. The application from the already installed terminal version is opened with the command hermes desktop.

Connecting the connector in the application

You will not need the terminal.

1
Open the MCP section

In the Hermes left-hand menu, select Skills, then go to the MCP and click New Server. A file editor will open on the right mcp.json.

The application is developing rapidly, and menu item names change from version to version. If there is no such section, look in the settings for MCP servers or connect the connector from the terminal: the process below produces the same result.

2
Add the CasusLegal server

If there are no other servers yet, replace the contents of the editor with this text:

{ "mcpServers": { "casuslegal": { "url": "https://mcp.casus.legal/one/mcp", "auth": "oauth" } } }

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 in that case the address must match the database you paid for; otherwise the server will respond “subscription inactive or expired.” There is no need to keep a unified address and separate addresses at the same time: the AI will see two identical sets of tools and search twice. The server name must be written using Latin characters. The full address table is below.

If there are mcp.json already other servers, do not delete them: add the block casuslegal inside the existing object mcpServers, separating adjacent blocks with a comma.

3
Save and enable the server

Click Save and make sure that the toggle next to the server is enabled: Hermes will immediately check the connection. If the status Needs authentication, select the server and click Authenticate.

4
Authenticate

The CasusLegal sign-in page will open in your browser. The simplest option is to click “Sign in via Telegram”: an account will be created automatically if you do not already have one. The second option is the connector access password from your account dashboard. Confirm access and return to Hermes.

After a successful sign-in, a green indicator will light up next to the server, and its card will display a list of available tools.

5
Start a new chat

Open a new chat and ask a substantive question, for example: “Find, through CasusLegal, Supreme Court case law on reducing a penalty under Article 333 of the Civil Code of the Russian Federation.” The response should include the details of the decisions with links to their full texts.

If the tools have not been picked up, enter in the chat /reload-mcp and start the chat again.

Connecting the connector through the terminal

1
Add an MCP server
hermes mcp add casuslegal --url "https://mcp.casus.legal/one/mcp" --auth oauth

Name casuslegal is used only within your Hermes; you can replace it with any short name Latin characters.

2
Authenticate

Hermes will open the CasusLegal sign-in page in your browser: sign in through Telegram or with a password and confirm access. If the browser does not open automatically, copy the link shown in the terminal and open it manually.

3
Enable the tools

Hermes will connect to the server, display the tools it finds and offer to enable all of them at once or selectively. Enable all of them: the database tools are read-only. You can change the set later with the command hermes mcp configure casuslegal.

4
Restart Hermes and check the connection

The easiest way is to close and reopen Hermes. If it is already running, enter in the chat /reload-mcp, then /new.

Check
hermes mcp list # next to casuslegal — ✓ enabled hermes mcp test casuslegal # Connected and number of tools

Addresses: single and database-specific

A single connector at the unified address is sufficient: it provides access to all databases you have paid for. Separate addresses are needed only if you deliberately want a connector for one database; in that case, each is connected separately and requires separate authentication. There is one subscription, and it applies across all environments at once.

DatabaseServer nameAddress (URL)
All subscribed databases at oncecasuslegalhttps://mcp.casus.legal/one/mcp
Commercial cassation districts (all)okrugahttps://mcp.casus.legal/okrug/mcp
Higher courts: Constitutional Court · Supreme Court · Supreme Commercial Courtcasuslegalhttps://mcp.casus.legal/mcp
Intellectual Property Court (IP Court)siphttps://sip.casus.legal/mcp
Administrative cases (KAS · Judicial Chamber for Administrative Cases of the Supreme Court of the Russian Federation)kashttps://kas.casus.legal/mcp
Criminal cases (KUD · Judicial Chamber for Criminal Cases of the Supreme Court of the Russian Federation)kudhttps://kud.casus.legal/mcp
Separate databases in the application: mcp.json (if a unified address is not needed)
{ "mcpServers": { "casuslegal": { "url": "https://mcp.casus.legal/mcp", "auth": "oauth" }, "sip": { "url": "https://sip.casus.legal/mcp", "auth": "oauth" }, "kas": { "url": "https://kas.casus.legal/mcp", "auth": "oauth" }, "kud": { "url": "https://kud.casus.legal/mcp", "auth": "oauth" } } }
Separate databases in the terminal (if a unified address is not needed)
hermes mcp add casuslegal --url "https://mcp.casus.legal/mcp" --auth oauth hermes mcp add sip --url "https://sip.casus.legal/mcp" --auth oauth hermes mcp add kas --url "https://kas.casus.legal/mcp" --auth oauth hermes mcp add kud --url "https://kud.casus.legal/mcp" --auth oauth

Which model to choose

Model requirements

A connector is a set of tools that the model calls itself, so not every model will work. Two capabilities are required: reliable tool calling and a context window of at least 64,000 tokens: this is a requirement of the Hermes documentation. Case law comes in substantial case cards, and the larger the window, the longer the research that a single chat can handle.

A practical choice is strong models from Anthropic, OpenAI and Google; the most convenient approach is to connect them using a single OpenRouter key, without opening accounts with each developer separately. Small local models are suitable for trying things out and getting familiar with them, but tool calls fail more often in a long sequence.

The model is changed with the command /model directly in the chat; there is no need to reconnect the connector.

How to pay for the model

Hermes itself is free, so there is only one question: whose tokens you use. There are three options, and they can be combined: you can set up several providers and switch between them as you work.

Option 1 — Hermes developer subscription (Nous Portal)

Nous Research has its own subscription Nous Portal. A single OAuth sign-in provides access to more than three hundred models at once (Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax, Grok), plus “Tool Gateway”: web search, image generation, speech synthesis and a cloud browser without separate keys for each service. The Hermes documentation calls this the recommended option.

hermes setup --portal # fresh installation: sign-in, provider and tools all at once hermes model # already installed: select Nous Portal from the list hermes portal info # what is connected and where requests are sent

There are four plans, one of them free. The amount paid is credited to the account with a 10% bonus; the unused balance is partially carried over to the next month:

PlanPrice per monthCreditsWhat is available
Free0nofree portal models only (list below)
Plus20 dollars22 dollars, carryover up to 10entire catalog and built-in tools
Super100 dollars110 dollars, carryover up to 50same, with higher limits
Ultra200 dollars220 dollars, carryover up to 100same, with higher limits

The portal documentation also promises subscribers a 10% discount from providers that charge by the token. Prices were checked against the portal on 1 August 2026 and may change without our involvement; check them on the portal itself before paying.

Path 2 — your ChatGPT subscription and other subscriptions already paid for

There is no need to pay separately for tokens: Hermes can work with your current subscription ChatGPT. In the provider list, this is OpenAI Codex. Sign-in is performed using a device code: Hermes displays an address and code, and you confirm it in a browser under your OpenAI account. No API key is required, and you do not need to install Codex CLI (and if it is already installed, Hermes will use its credentials). Codex models are available; usage is deducted from your subscription limits, and the command /usage shows the remaining balance and accumulated limit resets.

Other subscriptions can be connected in the same way if you have already paid for them:

SubscriptionHow to connectWhat is important to know
ChatGPThermes model → OpenAI Codex, sign-in with a device codeCodex models, usage charged against subscription limits
Claudehermes model → Anthropic, OAuth sign-inMax plan only and purchased “extra usage” credits: the basic Max limit is not used, and a Pro subscription is insufficient for this path. Otherwise, use an Anthropic API key with pay-per-token billing
Grokhermes model → xAI Grok OAuthSuperGrok or Premium+ subscription required; no API key is required
GitHub Copilothermes model → GitHub Copilotthe Copilot subscription provides access to GPT-5.x, Claude, and Gemini; the classic token ghp_ will not work
MiniMax, Qwenhermes model → MiniMax (OAuth) or Qwen OAuthsign-in through a browser, without an API key

The terms of these subscriptions are set by their owners and may be changed without our involvement. Checked against the Hermes documentation on 1 August 2026.

Path 3 — free models

You can try the “Hermes + connector” combination without paying for tokens. Free models are available both through the developer’s own portal and through OpenRouter; on both, the identifier ends in :free.

On the free Nous Portal plan (1 August 2026), five models are available:

  • poolside/laguna-s-2.1:free — a context window of around one million tokens;
  • poolside/laguna-xs-2.1:free, stepfun/step-3.7-flash:free;
  • tencent/hy3:free, inclusionai/ling-3.0-flash:free.

The free plan provides no monetary credits: paid catalogue models are unavailable on it; only these five work.

On OpenRouter the following, among others, were free on the same date:

  • nvidia/nemotron-3-ultra-550b-a55b:free — a context window of around one million tokens;
  • nvidia/nemotron-3-super-120b-a12b:free and the nemotron-3-nano;
  • google/gemma-4-31b-it:free, google/gemma-4-26b-a4b-it:free;
  • openai/gpt-oss-20b:free, inclusionai/ling-3.0-flash:free.

All of those meet the 64,000-token threshold that Hermes requires of a model. The suffix :free is mandatory: without it, the same identifier denotes the paid version of the same model. In the dialogue, switching looks like this:

/model nvidia/nemotron-3-ultra-550b-a55b:free

Two more free options: a key for build.nvidia.com (called NVIDIA NIM) and your own model on your computer through Ollama or LM Studio, where there is no charge for tokens at all.

The free selection changes: models come and go, and one-time promotions end: free access to Nemotron 3 Ultra on Nous Portal was available from 4 to 18 June 2026 and has now closed. Before working, check the provider’s list.

With free models, long chains of tool calls fail more often. They are sufficient for preliminary case-law searches; for analysing selected judgments, it is better to switch to a capable paid model.

An intermediate option is models that cost next to nothing. For example, deepseek/deepseek-v4-flash in the Nous Portal catalogue: a context window of around one million tokens at approximately 11 cents per million input tokens and 22 cents per million output tokens. It is not free, but for legal-search volumes it costs less than a cup of coffee per month.

Separately: the new Kimi K3

Kimi K3 was released on 16 July 2026 and became Moonshot AI’s current flagship model, replacing K2.5 and K2.6. Its context window is around one million tokens, meaning that a single dialogue can contain significantly more case-law cards than with most models.

In Hermes, it can be enabled in two ways:

  • through OpenRouter or Nous Portal — identifier moonshotai/kimi-k3. As at 1 August 2026, the price on OpenRouter was $3 per million input tokens and $15 per million output tokens;
  • directly from Moonshot — key KIMI_API_KEY in file ~/.hermes/.env, provider kimi-coding, model kimi-k3.
/model moonshotai/kimi-k3 # switch directly in the dialogue

It is convenient to run the same question on K3 and on a familiar model, and then compare how each handled the case law found: selection of judgments, citation accuracy, and response cost.

How to use it after connection

You do not need to remember the technical names of the tools: write in ordinary language, and Hermes will select the appropriate one:

The scope of access is determined by the CasusLegal account under which you authenticated. More techniques are collected on the pages “Scenarios” and “Tips”.

Typical errors

The server is connected, but there are no tools in the dialogue

First, follow the standard procedure: run /reload-mcp and create a new dialogue: Hermes does not pick up configuration changes immediately. If that does not help, close and restart the program.

Check the connection with the command hermes mcp test casuslegal: it should respond Connected and display the number of tools. General diagnostics — hermes doctor.

The second common cause is a Cyrillic server name. Delete it (hermes mcp remove casuslegal) and create it again using Latin characters.

The browser did not open or authentication failed

Copy the authentication link shown in the terminal and open it manually. You can repeat sign-in at any time: hermes mcp login casuslegal, and in the application — Skills → MCP, select the server and click Authenticate.

It is more convenient to start sign-in from a separate terminal window rather than from an ongoing dialogue: more time is allowed there for authentication.

The connector access password is set in your account and does not coincide with sign-in through Telegram.

Sign-in succeeded, but the connector returns a refusal

Open the “Connectors” tab in your account and check the subscription status specifically for the database you are accessing: the databases have different addresses, and a subscription to “Higher Courts” does not open the IP Court, the Judicial Chamber for Administrative Cases or the Judicial Chamber for Criminal Cases.

Introductory free queries in the web chat and Telegram bot do not extend to the connector.

The model responds from its own knowledge without consulting the database

Say explicitly: “use CasusLegal and find …”. If the tools are still not called after that, the issue is usually the model; see the section “Which model is suitable”: an overly small context window or weak support for tool calling.

It is easy to test this assumption: switch with the command /model to another model and repeat the same question.

There is no MCP tab in the application or no hermes mcp command in the terminal

The version is outdated. Run hermes update and restart the program.

Several databases are needed at once

List them in mcp.json or add them using commands: ready-made blocks are provided above, in the “Addresses of the four databases” section. Authentication must be completed separately for each database.

There is one subscription, and it works in all environments at once: you do not need to reconnect the connector when switching from Hermes to Claude or ChatGPT is not required.

Official Hermes links

RU