Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Using Hilberon from an AI agent

Connect an AI agent to Hilberon's MCP server: the address, how signing in works, the six tools, an example call, and what to keep in mind.

Guides7 min read
  • AI agents,
  • MCP

An AI agent can hand mathematics to Hilberon while it works: evaluate an integral, solve an equation, look up a function or check a line of a student's work. It does this over MCP. This guide shows how to connect one.

What MCP is

The Model Context Protocol (MCP) is an open protocol through which an AI application calls tools that a server offers. Hilberon's API includes an MCP server, so an agent that speaks MCP uses the same engine as the solver and the command-line tool.

Diagram: an AI agent, an MCP client, sends tools/call with a bearer token to Hilberon at api.hilberon.com/mcp and gets the result back. Hilberon lists six tools, two of which spend credits. Below, the three steps of signing in once.
Figure 1.

The agent calls a tool with its token, and Hilberon answers with text for the agent and the API's JSON document. Signing in happens once, in your browser.

The address

Code
https://api.hilberon.com/mcp

The server speaks Streamable HTTP. It offers tools only, with no resources and no prompts.

Signing in

You do not paste a secret into the agent's configuration. After you add the server, the agent signs you in with OAuth:

  1. It sends you to Hilberon in your browser. If you are not signed in, you sign in first.
  2. A page asks you to approve the connection. It shows the name the app gave itself and what the app will be able to do.
  3. The agent keeps the token it receives.

The connection is a sign-in of your account. It is listed in Settings, under Devices, where you can sign it out. Changing your password or recovering your account ends it too.

A connected app can do less than you can on the site. It runs queries and step checks, and reads your account and usage. It cannot change your plan, buy, cancel, change your settings, read your payments, or manage your keys and other sign-ins.

There is no refresh token. When the sign-in ends, because it went unused too long, reached its longest life or was signed out, the agent asks you to sign in again.

A sign-in spends your plan's credits on Plus and Pro. On the Free plan, a connected app cannot run queries.

With an API key

An agent can also send an API key, as Authorization: Bearer hbk_…. A key spends prepaid credits only. Keys are made on the Account page. A key with no purchase behind it yet still connects, and each tool answers that a purchase is required.

Adding the server to your agent

With the Hilberon CLI

If the Hilberon command-line tool is installed, one command sets up the agents on your machine:

Shell
hilberon setup

It finds the agent harnesses on the machine, installs a skill with the language guide and adds the MCP server. It writes no token to any file: each agent signs you in by itself, and setup says how for each one.

Shell
hilberon setup --dry-run     # show the plan
hilberon setup --project     # write into the current project instead of your profile
hilberon setup --uninstall   # remove only what setup added

It supports Claude Code, Codex, Gemini CLI, Cursor, OpenCode, GitHub Copilot (VS Code and CLI), Windsurf, Claude Desktop and any harness that reads Agent Skills. Claude Desktop takes a remote server in its own settings, so for it setup names the place instead of writing the entry.

The Agents and MCP section of the Hilberon developers page: the command hilberon setup, the agents it supports, and its options --dry-run, --project and --uninstall
Figure 2.

The same commands on the developers page, which also has the line that installs the command-line tool.

By hand

Add the address to your client, then sign in.

By hand
ClientHow to add the server
Claude Codeclaude mcp add --transport http hilberon https://api.hilberon.com/mcp, then run /mcp in Claude Code and sign in
Codexcodex mcp add hilberon --url https://api.hilberon.com/mcp, then codex mcp login hilberon
Gemini CLIgemini mcp add --transport http hilberon https://api.hilberon.com/mcp, then run /mcp auth hilberon in Gemini CLI
OpenCodeopencode mcp add hilberon --url https://api.hilberon.com/mcp, then opencode mcp auth hilberon
VS Codecode --add-mcp '{"name":"hilberon","type":"http","url":"https://api.hilberon.com/mcp"}'
Cursorthe entry below, in ~/.cursor/mcp.json
claude.aiIn Customize → Connectors, choose Add custom connector and paste the address. On Team and Enterprise, an Owner adds it in Organization settings → Connectors and each member connects
ChatGPTIn chatgpt.com/plugins, choose the plus button, then Add custom MCP server; enter the address as the Server URL and choose OAuth. Workspace permissions apply

The entry for Cursor:

JSON
{
  "mcpServers": {
    "hilberon": { "url": "https://api.hilberon.com/mcp" }
  }
}

The tools

The tools
ToolWhat it doesSpends credits
hilberon_guideThe language guide: the syntax, the forms for matrices, equations, differential equations and limits, what queries cost and what each status meansNo
hilberon_checkChecks a query's syntax, with positions, hints and suggested fixesNo
hilberon_functionsLooks up functions: a function's name gives its forms, parameters and examples, and other words search the catalogNo
hilberon_queryEvaluates a query, and on request returns a verified derivation (steps) and other methods of the same problem (alternatives)Yes
hilberon_check_stepSays whether a line a student wrote is a line of the verified derivation of a problem, and which step it isYes
hilberon_accountShows the plan, the credit balances and the limitsNo

A query is an expression in Hilberon syntax, such as integrate(x*exp(x), x), not a sentence.

Read the guide first

The server tells an agent to read hilberon_guide once, before its first query, and to use hilberon_check for a form it is unsure of. A query does not need hilberon_account first.

An example exchange

You ask your agent to integrate xexx e^x and to show the steps. The agent writes the problem as a query and calls hilberon_query:

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "hilberon_query",
    "arguments": {
      "query": "integrate(x*exp(x), x)",
      "steps": true
    }
  }
}

The result has two parts. content is text for the agent to read: the answer first, with its status and its cost, and with steps one numbered sentence per step, quoted from Hilberon's catalog of rules, and under a step that makes a choice, the reason for it. structuredContent is the document the HTTP API returns for the same query. Here it is shortened, down to its first step:

JSON
{
  "status": "solved",
  "result": { "input": "e^x*(x - 1)" },
  "methods": [
    { "id": "integrate.parts" },
    { "id": "integrate.table" },
    { "id": "algebra.common_factor" },
    { "id": "integrate.constant_of_integration" }
  ],
  "steps": {
    "verified": true,
    "task": "integrate.indefinite",
    "answer": { "input": "e^x*(x - 1) + C" },
    "items": [
      {
        "id": 1,
        "rule": "integrate.parts",
        "bind": {
          "u": { "input": "x" },
          "dv": { "input": "e^x" },
          "du": { "input": "1" },
          "v": { "input": "e^x" }
        },
        "state": { "input": "x*e^x - integrate(e^x, x)" },
        "explanation": {
          "text": "Integrate by parts with `u = x` and `dv = e^x dx`. Then `du = 1 dx` and `v = e^x`, so the integral equals `u v` minus the integral of `v du`."
        }
      }
    ]
  }
}

The agent reads the answer, ex(x−1)+Ce^x(x - 1) + C, and the derivation, and passes them on to you.

What to keep in mind

  • Only hilberon_query and hilberon_check_step spend credits. A syntax error costs nothing.
  • Ask for steps only when you want the derivation: it costs more than the plain answer.
  • effort bounds how far the engine searches and the most a call may spend: a level, or a whole number of credits. A call that names none runs at your setting for agents, or at standard. A query that reaches its bound is charged that much and comes back partial.
  • For a while after a query comes back partial, sending it again at the same effort or a lower one is refused at no charge, since the engine would stop at the same place. A higher effort is a new run, and it is charged.
  • A sign-in has no daily spend limit unless you set one, in Settings, under Devices.
  • When a charge comes with a notice, such as credits running low, the text adds a line that starts with Note for the user:. It asks nothing of the agent and is no reason to retry or to spend more.
  • A failed call is a result, not a protocol error: it is marked isError, and its text gives the error and a hint, so the agent can correct the call.
  • Closing the connection cancels a call. The engine stops, and the work it did is charged. A retry is a new call, with its own charge.
  • To keep a query out of the samples Hilberon keeps to improve the engine, for example when it comes from private work, the agent passes improve: false. Otherwise your account's settings decide.

The developers page has the commands in one place, and the API reference describes the HTTP API that the tools run on.