The agent endpoint
Meerkat exposes its control plane (the API the console itself calls, as opposed to the traffic of your applications) to an AI assistant over MCP (Model Context Protocol). The assistant does not learn a REST API: it gets a list of tools with names, descriptions and argument schemas, and calls them.
What an agent may do is its perimeter: read only, or read and change. It is chosen when the agent is approved, or carried by the token it uses (see Access tokens, MCP and API).
Turning it on
The endpoint is off by default. You need the root account: approving an agent hands it root's powers over the gateway, within the perimeter you pick.
Switch the endpoint on
Open Infra, MCP (/infra/mcp) and turn on Accept agents on the control plane. The address agents use appears beside the switch: the console's own address followed by /mcp.

Copy your client's command
Under Connect an agent, pick your client (Claude Code, Gemini CLI, Kimi CLI, Codex CLI, or Other (JSON) for a configuration file) and copy its command. For Claude Code:
claude mcp add --transport http -s user meerkat https://console.example.com/mcp
Run it, then approve in the browser
Run the command in a terminal. The first call opens this console in your browser, on a Connect an agent page that names the agent and the machine its answer goes to. Sign in as root if asked, choose Read only (the default) or Read and change, then press Connect. No token is copied anywhere.
Check that it answers
Ask the agent to describe the gateway. It calls describe_gateway, which answers with the edition, the version and its own perimeter:
{
"product": "Meerkat, an app-gateway that also holds the identity of the applications behind it",
"version": "1.24.0",
"edition": "ee",
"enterprise": true,
"tenancy": "multi",
"routes": 12,
"users": 48,
"tenants": 3,
"actingAs": "admin",
"perimeter": { "token": "Claude Code", "mayChange": false }
}
See it in the console
Back on Infra, MCP, the agent is listed under Connected agents with its perimeter and when it last called. The Disconnect button beside it cuts it off at once.
When the certificate comes from a private authority
When the console is served over HTTPS with a certificate signed by your own authority, or self-signed, the agent refuses it until it trusts that authority. Open My certificate comes from a private authority on the same screen and pick your system: a Node.js client (Claude Code, Gemini CLI) reads NODE_EXTRA_CA_CERTS, the others use the system's own authorities.
echo 'export NODE_EXTRA_CA_CERTS=/path/to/ca.crt' >> ~/.zshrc && source ~/.zshrc
Then restart the agent from a new terminal.
When the client cannot open a browser
Open My client cannot do that. Mint a console token on Infra, Access tokens (/infra/access-tokens, New console token), keep it in the MEERKAT_MCP_TOKEN environment variable, and use the command shown there, which sends it as a header:
claude mcp add --transport http -s user meerkat https://console.example.com/mcp \
--header "Authorization: Bearer $MEERKAT_MCP_TOKEN"
The endpoint also answers a plain HTTP call with that token, which is the quickest way to check it from a script:
curl -X POST https://console.example.com/mcp \
-H "Authorization: Bearer $MEERKAT_MCP_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
What a token may do
The tools a caller sees are the tools its perimeter opens: a read-only agent is not shown the writing ones. The same guards apply as in the console: whoever administers a domain gets that domain's tools, and nobody gets more by asking an assistant instead of clicking.
An example exchange
You ask: which route answers GET /api/orders/42? The agent calls test_routing:
{ "request": { "method": "GET", "path": "/api/orders/42" } }
The answer names the winning route and what every other route did with the request (its path did not match, its host did not match, its access rule refused the caller). If the route you expected is not the winner, the line for that route says why. Pass as to ask the same question for a given person: a route's access rule takes part in choosing it.
The tools
Gateway and routes
| Tool | What it answers |
|---|---|
describe_gateway |
Which edition, which version, how much of everything, and the caller's own perimeter. Call it first. |
list_routes, get_route |
The routes, then one of them in full. |
test_routing |
Which route a given request would reach, and why. |
list_operations, call_route |
What a route's service offers, then a real call to it through the gateway. |
save_route, delete_route |
Write a route and apply it at once. |
list_route_bricks |
The catalogue of predicates and filters, with their parameters. |
list_services |
What the gateway sees running around it. |
read_traffic |
What is passing through right now. |
read_logs |
The gateway's own last lines, on the node that answered. |
read_audit |
The audit trail, within the caller's own scope. |
Access: accounts, tenants and roles
| Tool | What it answers |
|---|---|
list_users, save_user |
The accounts; add a local account or change its name, e-mail, language or whether it is enabled. |
list_tenants |
The tenants. |
list_members, save_member |
The people in one tenant; join somebody to a tenant and set the role groups they hold there. |
list_groups, save_group, delete_group |
The role groups of one tenant and the roles each one grants. |
list_roles, save_role, delete_role |
The role catalogue. A role still named by a rule cannot be removed. |
list_role_references |
Every rule that names a role: routes, per-endpoint policies, role maps, scheduled calls. |
Scheduled calls
| Tool | What it answers |
|---|---|
list_schedules |
The scheduled calls: what runs at night, how often, as whom, and how the last run ended. |
list_schedule_runs |
What each run of one schedule did, newest first. |
pause_schedule, run_schedule |
Stop a scheduled call, let it fire again, or bring its next turn forward to now. |
describe_schedule |
Write what a scheduled call is for, when its service did not say. |
cancel_schedule_run |
Stop the run a scheduled call has in flight: closed at once, the service told at its next report. |
Configuration
| Tool | What it answers |
|---|---|
export_configuration |
The whole configuration, as a readable document. |
import_configuration |
Apply a configuration document to this gateway. |
save_configuration, list_configurations, activate_configuration |
Named configurations to come back to, and the switch to one; replace refreshes one from the running state, before a push. |
compose_configuration |
One configuration composed from two, value by value: preview it, apply it, or save it. |
list_git_locations, save_git_location |
The git repositories a configuration is read from and written to. |
push_configuration, pull_configuration |
Commit a saved configuration to its repository; read one from a repository and keep it beside the running one, without applying it. |
Sign-in, identity and look
| Tool | What it answers |
|---|---|
list_oidc_clients, save_oidc_client, try_oidc_sign_in |
The applications signing in through the gateway, and what one would receive for a given person. |
delete_oidc_client, regenerate_oidc_client_secret |
Remove a client; replace a confidential client's secret (the old one stops working at once). |
get_signing_keys, set_issuer, renew_signing_keys, preview_identity |
The issuer and the public keys, and what a draft identity would send. |
get_settings, save_portal |
The global settings, and the application catalogue (its portal mode, the bar, on the Enterprise image only). |
get_branding, save_branding |
The identity the built-in pages wear. |
list_themes |
The colour palettes, and which is active. |
list_languages, read_language, write_language |
The languages of the built-in pages, every string of one beside the English, and new wordings. |
Notifications
| Tool | What it answers |
|---|---|
list_notifications |
What the services sent their users: to which tenant, how many received and read it. |
withdraw_notification |
Take a notification back: it shows as withdrawn on every recipient's page. |
Everything the console does
The tools above answer the frequent questions well. For everything else, three tools reach the whole control plane - the API the console itself calls:
| Tool | What it does |
|---|---|
list_admin_api |
The sections, then the endpoints of one, with a summary when the API's documentation has one. |
read_admin_api |
A GET, as the console would. |
call_admin_api |
Any request: create a tenant, undo a change from the history, edit a theme or a setting. |
They go through the same endpoints as the console, with the agent's own token: the endpoint's guard decides, a read-only token stays read-only, and the audit trail names the token. Nothing is reimplemented, so nothing is out of step.
What stays closed is short, and each refusal gives its reason:
- the certificates and their private keys, the ACME accounts (opening one accepts an authority's terms) and the trusted authorities;
- the vault: an agent works with
$names, a secret is typed by a person; - minting control-plane tokens;
- the backups (a file to download, a database copy);
- the TLS doors and ports and the switch that lets agents in: a change there can cut the console off. A configuration an agent imports, activates or restores is refused if it changes them.
Calling the services behind the routes
list_operations reads a route's OpenAPI spec: every operation with the public path to call - the route's prefix added when the route strips it - and, for one operation, its parameters, body and responses with the schemas they reference. Each operation also says what the application requires to call it, when its spec says so (public, a signed-in caller, or roles), and the route's declared roles come with the catalogue roles they are tied to (see Per-endpoint security): the agent knows which roles to pass to call_route to be let in, or kept out.
call_route sends a real request through the route and returns the status, the headers and the body (cut at 64 KiB). It is handed to the application plane in process, so everything a client meets applies: the route's access rule, the per-endpoint security, the filters, the quotas, and the identity the route forwards to the service.
- As whom. By default the caller is
agent, holding every role of the catalogue - in the identity the service receives too - so an administrator's agent is not stopped by rights it would have to manage. Passasandrolesto call as somebody shaped otherwise, andtenantfor a route reserved to tenants. - Why a refusal. A
403says why in its body: the gateway names the role or the tenant missing, and a service's own reason comes back as the service wrote it. - For real. A
POST,PUTorDELETEchanges the service's data. The call is offered to a full-access token, never to a read-only one, and every call is written to the audit trail with the token that made it. The service receives the marker headers of a simulated call, so its own log tells a test from real traffic.
Pictures are described, never sent
A logo or a page background is stored as a data URI, and a megabyte of base64 would cost more of a conversation than everything else an answer says. So the reading tools return a line about the image instead of its bytes:
"background": { "image": "<png, 45 KiB>", "fit": "cover", "dim": 30 }
This matters when writing back. An assistant reads, changes one field, and sends the whole object again - so a summary in an image field means keep what is stored. To change a picture, pass an https URL and the gateway fetches it itself; to remove one, pass "none".
"storefront" and the gateway stores the drawing.