Overview
gizzi mcp manages Model Context Protocol (MCP) servers that extend the Allternit runtime with external tools and context sources. You can register local command-based servers, connect to remote HTTP servers, and handle OAuth authentication from the terminal.
MCP servers declared through the CLI are written to your gizzi.json or gizzi.jsonc configuration, either in the current project or globally.
Protocol versions (2026-07-28 and older servers)
Gizzi speaks MCP 2026-07-28 and every earlier revision, using the official TypeScript SDK v2 (@modelcontextprotocol/client / server / core). You don’t configure anything: on the first connect to a server Gizzi sends server/discover.
The verdict is cached per server in
mcp-era.json in Gizzi’s data directory, keyed by the server’s URL or command:
- A 2026-07-28 verdict skips the probe. Gizzi confirms it with one
server/discoveron the live connection. For local servers this saves spawning a second probe process. - An older-server verdict goes straight to
initializeand expires after 24 hours, so an upgraded server is picked up the next day. - Changing a server’s URL or command,
gizzi mcp auth, orgizzi mcp logoutclears the cached verdict.
gizzi mcp list shows the result next to each connected server. For example, connected · 2026-07-28 is a 2026-07-28 server, and connected · legacy 2025-06-18 is an older one.
To override detection for one server, set protocol on its entry:
- Tool names are namespaced as
mcp__<server>__<tool>, in a stable order: servers by name, then each server’s tools by name. Name collisions get the same suffix on every run. - Approval flags (
allternit/approvedin_meta) are sent on tool calls. - The MCP Apps UI capability is sent to every server.
timeoutapplies to connecting and to requests.
Command reference
Listing servers
Show every configured server and its current status:- Server name and type (
localorremote) - Connection status:
connected,disabled,needs authentication,failed, ornot initialized - For remote servers, the target URL and whether OAuth credentials are stored
- Error hints when a server failed to connect
Adding a server
Run the interactive wizard to register a server:- Location — current project (
gizzi.jsonor.gizzi/gizzi.json) or global config. - Name — a short identifier used in commands and runtime tool routing.
- Type —
localorremote.
Local server
For a local server, provide the shell command to start it:Remote server
For a remote server, provide the HTTPS URL. You can then opt into OAuth and supply a pre-registered client ID and optional client secret, or leave the client ID empty and let Gizzi identify itself (see How Gizzi identifies itself to OAuth servers)."oauth": false.
Removing a server
Remove a server interactively:Authenticating with OAuth
Remote MCP servers that require OAuth can be authenticated through the browser:authenticated, expired, or not authenticated.
How Gizzi identifies itself to OAuth servers
Whenoauth.clientId is not set, Gizzi picks the first method the authorization server supports:
- Client ID Metadata Document (CIMD). MCP 2026-07-28 prefers this method over dynamic client registration. If the authorization server advertises
client_id_metadata_document_supported, Gizzi useshttps://platform.allternit.com/oauth/gizzi-client.jsonas itsclient_id. That document lists Gizzi’s loopback redirect URIs (http://127.0.0.1:19876/mcp/oauth/callbackandhttp://localhost:19876/mcp/oauth/callback). Nothing is registered and nothing is stored per server. - Dynamic client registration (RFC 7591). This is the fallback for servers without CIMD. MCP 2026-07-28 deprecates it, but Gizzi still supports it. The registered client is stored with the server’s tokens.
- If the server supports neither method,
gizzi mcp listshowsneeds client registration. Add a pre-registeredclientId(andclientSecretif the server requires one) to the server’soauthblock.
clientId always takes precedence. To turn CIMD off, set MCP_OAUTH_CLIENT_METADATA_URL to an empty string. To test against a different document, set it to that document’s URL.
The authorization callback is checked against the issuer the flow started with (RFC 9207 iss), so a mixed-up or forged callback is rejected.
Logging out
Delete stored OAuth tokens and client registration for a server:logout without a name presents a picker for all servers that have stored credentials.
Debugging OAuth
Usedebug to inspect the OAuth handshake and basic HTTP connectivity:
- Stored auth status and token expiry
- Whether a refresh token is present
- Client registration details
- HTTP response status from the server
- Which protocol era the server speaks. The probe is a
server/discoverrequest: a 2026-07-28 server lists its supported versions, and an older server rejects it. WWW-Authenticateheader analysis- Whether the OAuth flow can be triggered successfully
needs authentication or failed in gizzi mcp list.
Server status reference
Common positional arguments
Most
mcp commands are interactive by default when name is omitted, except for debug where the name is required.
Configuration file locations
The CLI searches for a config file in this order inside the project:gizzi.jsoncgizzi.json.gizzi/gizzi.jsonc.gizzi/gizzi.json
gizzi.json. For global scope it writes to the equivalent path under ~/.config/gizzi-code/.
Disabling MCP support
MCP support is enabled by default. To disable it for a session:Related docs
- Gizzi Code Overview — what the CLI is and how it fits into the Allternit platform
- Configuration — config files, profiles, and environment variables
- Headless Execution — running agents non-interactively with
gizzi exec - Permission Profiles — controlling tool approval rules