Repository navigation
v0.5.0
Added
-
Downstream resources and prompts reach the MCP client: a server whose config
names them inexpose(["resources"],["prompts"], or both) contributes
them through the newlist_resources,read_resource,list_promptsand
get_prompttools. Withoutexposethe client still sees tools alone, and an
unknown value is a config error — the server does not start. Permissions
address them asresource:<uri>andprompt:<name>, so the existing rules
and profiles apply unchanged; answers are cut atmaxBytes(32768 by default
for a read) and the full one lands intool-out. The listings honour the same
rules: adefault: denykeeps a resource out oflist_resourcesuntil a rule
allows it. -
exposeis editable from the panel: the server form carries two checkboxes
(resources, prompts), the registry reads and validates the field onPOST /api/serversandPUT /api/servers/<name>, and an unknown value is a400
that names what is allowed. Unchecking both removes the field. -
An edit no longer restarts a whole set:
PUT /api/sets/<id>,PUT /api/servers/<name>and the newPOST /api/sets/<id>/reloadwrite
servers.jsonand sendSIGHUPto the set process alone — its stdio children
have no handler and keep running. The process rereads the file and answers in
reload.statusnext to it (nonce,generation,applied,restartNeeded,
error); the nonce the panel puts intoreload.requestbefore the signal
keeps a late answer to an earlier attempt from being taken for this one. Calls
in flight to the other servers keep their sessions, and the set's pid and
restart counter stay put. A transport change (port,open,path,
host,allowedHosts) is still applied by a restart and lands in
restartNeeded; keys are the exception and travel by reload (below);path,hostandallowedHostsin a hand-edited
servers.jsonland there too and the set is restarted by hand. A server's
envandenvAlloware not reloadable either, so an edit of them restarts
the sets using that server. A broken config leaves the process on the previous one and
reports the cause. A failed reload does not lose the edit:PUT /api/sets/<id>
answers 200 withreloadError, andPUT /api/servers/<name>lists the sets it
could not apply inreloadErrors. That answer now names the setsreloaded
instead ofrestarted;restartedstill carries the same list for one
release. -
A set serves several keys at once. Every key carries
id, its token,
createdAt,revokedAt,profileandlabel; the token never leaves the
server and the hash lives only in the listener's memory. Issuing a key no
longer revokes the previous one, and revoking one key no longer stops the
set — only the last active key does. A set keeps up to 8 active keys and the
ninth answers409. The routes areGET /api/sets/<id>/keys(ids, labels,
profiles and dates, never a token),POST /api/sets/<id>/keyswith an optional
{"label":…,"profile":…}(the token is in that answer only) andDELETE /api/sets/<id>/keys/<keyID>;PUT /api/sets/<id>withtokenstill replaces
the primary key, and creates one when the set has no active key. A new key
reaches a running set by reload, not by restart: the transport takes the whole
authTokenslist, compares the presented token with every active key's
sha256 in constant time per element, and takes the caller's fingerprint — and
so its profile and rate limit — from the token that matched. Keys issued
before this release read as a one-element list, and anotebecomes the key's
label. -
The panel states where it is reachable:
MCPRIG_PUBLIC_URLsets the public
address (http(s)://host[:port][/prefix]), and it becomes the only source of
the OAuth redirect (<publicUrl>/oauth/callback, path prefix kept) and of the
decision that the session cookie isSecure. A bad value — no scheme, no
host, credentials, query, fragment or a
trailing/— stops the panel at startup instead of falling back silently.
Without it the redirect is built fromMCPRIG_HOSTandMCPRIG_PORTas
before.mcprig doctorprints the effective redirect and flags one that
cannot receive the code (no host, port0, loopback behindhttps). -
The panel can serve TLS itself:
MCPRIG_TLS_CERTandMCPRIG_TLS_KEYmake it
listen over https. Both are required together, and an unreadable file fails
startup loudly instead of quietly dropping to http. -
A set can cap how often a caller calls its tools:
rateLimit: {"perMinute": 120, "burst": 20, "perTool": {"serena/find_symbol": {"perMinute": 10, "burst": 2}}}in the set's record. Each inner call of
invoke_manycounts on its own, a caller is identified by the fingerprint of
its key (in an open set, by its address), and a refused call is an ordinary tool error that never reaches a
server —/statsreports it asthrottled. No block, or zeros, means no
limit. The field is edited inregistry.jsonor over the API, asnotify. -
A truncated tool answer can be fetched over HTTP:
GET /tool-out/<name>
serves the saved file behind the same guard as/mcp— bearer key,
allowedHosts, Origin — and the truncation marker names that URL when the set
runs over HTTP with a key. The file is never served anonymously, even in an
open set, and a name pastMCPRIG_TOOLOUT_TTL(24h by default) answers410. -
mcprig statusshows panel health and, per set, its state, port, tool count,
key and last call;mcprig logsprints a set's or a server's log tail with
-fand--json. Both take--panel(defaultMCPRIG_PANEL_URL, else
MCPRIG_PORT) and log in withMCPRIG_PASSWORDor the reverse-proxy secret. -
A set can report failures on its own:
notify: {"webhook": "https://…"}in the
set's record sendsset.crashed,set.restart_failedand
server.unhealthyas one JSON POST per transition — 5 s timeout, three
attempts, and never a token,envor command in the body. The address itself
never reaches the log, even when it carries a query token. -
The panel has a Log drawer per server and Show more under the call
history: the drawer reads the set's log filtered by server name, and the
button pages/api/callsbybeforeuntil a page comes back short. Paging
pauses the 5 s refresh and shows resume next to it, which returns to the
first page. -
A key can be narrowed to a profile of its set:
profiles: {"reader": {"deny": ["*/*_write"], "allow": ["*"]}}in the set's record, and a key
issued with{"profile": "reader"}(a400lists the set's profiles, or
says the set has none). The profile applies afterpermissionsand only
narrows — a rule's denial keeps its own message.list_commandshides what
the profile refuses,invoke_commandandinvoke_manyrefuse it as a tool
error naming the profile, and a key without a profile behaves as before.
The field is edited inregistry.jsonor over the API, asnotify. -
Tracing crosses the proxy: a client's W3C
traceparentin_meta(SEP-414)
is validated (version00, non-zero ids, noff), becomes the parent of the
call's span and goes down to the upstream in the_metaofinvoke_command,
read_resourceandget_prompt; nothing else from the client's_metais
forwarded. Spans —mcp.tool.call,mcp.server.connect,mcp.reload, with
names and outcome only, never a key or its fingerprint — are exported over
OTLP/HTTP whenOTEL_EXPORTER_OTLP_ENDPOINTis set, and cost nothing (no
recording, no network) when it is not. -
A changed tool descriptor is quarantined: the set remembers
name,
description,inputSchema,outputSchemaandannotationshashed into
sets/<id>/tools.lock.json, approves a tool the first time it appears
(approvedBy: "auto") and refusesinvoke_commandandinvoke_manyfor that
tool once the descriptor differs —isError,_meta.lazyMcpPolicy: "quarantine"and a message with the old and new hash and the command that
lifts the block. Neighbours on the same server and other calls of the same
batch run as usual;list_commandsmarks the toolchanged: true.
A person approves the new descriptor from the Tools drawer of the panel
(GET /api/sets/<id>/tools,POST /api/sets/<id>/tools/approve,{"all": true}included) or with the newmcprig approve --set <id> <server/tool>…/--all,
which talks to the same routes. The check does not depend on a warm
catalogue: a cold cache is filled first, and a catalogue that cannot be read
refuses the call (list_commands {refresh:true}no longer empties the
neighbours' caches either). The panel's browse session applies the same
record — a changed tool is marked in its listing and refused with403
before the downstream sees the call. The record survives a set restart, and
entries of a server removed from a set are pruned when the set config is
rebuilt. Without a set data directory (MCPRIG_DATA_DIR) there is no record
and no quarantine.
Changed
X-Forwarded-ProtoandX-Forwarded-Hostare trusted only when
MCPRIG_PROXY_SECRETis set. Without it both are ignored for the Host and
Origin checks and for thehttpsmark, so a client can no longer claim
httpsor a different public host by sending a header; the OAuth redirect
never depends on them. The session cookie isSecure
whenever the public address ishttpsor the panel has its own certificate,
no longer only when the request itself arrived over TLS.- Login failures are counted by the socket address and by the address from
X-Forwarded-For: rotating the header behind a trusted proxy no longer
bypasses the five-per-minute limit, and a request is refused when either
counter is over it. - Browse sessions in the panel now apply the server's
permissionsto tool
calls, the same gateinvoke_commanduses: a denied call answers403
instead of reaching the server. Resources and prompts are not covered yet. - A server's
permissionsblock now survives the panel and the registry:
POST /api/servers,PATCH /api/servers/<name>and import keep it in
registry.json, so browse andinvoke_commandenforce the same rules. A
broken block is refused with400instead of being dropped. _configErrorno longer appears in a config file: a validation defect stays
in memory (list_serversstill reports it ashealthy: false), and a file
that already carries the key stops marking that server broken on the next
load.- Russian user-facing text is proofread with
ru-text: panel strings, CLI
output and server error messages use sentence case, the «вы» form, one term
per concept and the "what — why — what to do" shape of an error. Counts agree
with their numeral, percentages print as4,8%,mcprig authnames the
deadline as a clock time, and the schema line shows the tool count it already
passed in. The Russian documentation follows the same rules. - The panel's Overview tab now leads with the set's servers: the seven-day
summary (calls, error rate, p50, p95) moved below the servers table and reads
as a one-line caption, the set rail ends withN sets · K running, and the
action column has anActionsheader. Copy key is disabled while the set
is open and has no key prefix, it copies the bare prefix rather than the
prefix…shown in the panel, and the unused Reveal key button is gone. - Documentation is restructured:
docs/en/index.mdanddocs/ru/index.mdare
the entry points, every product page carries a language switch and a "See
also" block, and plans, decisions, audits, proposals and the TS contract moved
todocs/history/.bash scripts/docs-check.sh(also a CI step) fails on a
broken link, a personal path, an orphan page, language drift and a stale fact
indocs/anchors.txt.
Added
- The authorize button in a server row of the panel runs the OAuth flow from
the browser: the link is drawn in a dialog, the code comes back to
http://<panel host>:<panel port>/oauth/callback, and the set restarts itself
once the token is saved. A provider that refuses plainhttpfor a
non-loopback address (dynamic registration answersinvalid_redirect_uri)
still needs TLS in front of the panel. mcprig auth --set <set> <server>authorizes a server that asks for OAuth:
the command prints the authorization link and waits for the redirect instead
of starting a browser, so it works over SSH and on a host without a graphical
session. The token goes to the set'soauth.jsonand is picked up on the next
set start. The interactive step deliberately lives outside a client request:
a set's health probe allows 15 s and a person at a browser needs minutes.- The Calls tab lists the meta-tools
list_servers,list_commandsand
describe_commands(servermcprig) and the reason a call failed: the text
is shortened in the row and shown in full in a tooltip. Previously only calls
of child tools reached the history and the counters. - The raw history journal (
raw-YYYY-MM-DD.jsonl) carries anerrfield: the
failure reason as one line of at most 300 bytes with newlines replaced by
spaces. Old rows without the field are read as before.