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/discover on the live connection. For local servers this saves spawning a second probe process.
  • An older-server verdict goes straight to initialize and expires after 24 hours, so an upgraded server is picked up the next day.
  • Changing a server’s URL or command, gizzi mcp auth, or gizzi mcp logout clears the cached verdict.
For a local (stdio) server, the first probe runs in a short-lived copy of the server process. A server that doesn’t answer within 5 seconds is treated as an older server. 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:
The behaviors below work the same in both protocol eras:
  • 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/approved in _meta) are sent on tool calls.
  • The MCP Apps UI capability is sent to every server.
  • timeout applies to connecting and to requests.
Gizzi’s own MCP servers answer both protocol eras. This includes the knowledge-vault Lens server.

Command reference

Listing servers

Show every configured server and its current status:
Each entry displays:
  • Server name and type (local or remote)
  • Connection status: connected, disabled, needs authentication, failed, or not 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:
The wizard prompts for:
  1. Location — current project (gizzi.json or .gizzi/gizzi.json) or global config.
  2. Name — a short identifier used in commands and runtime tool routing.
  3. Type — local or remote.

Local server

For a local server, provide the shell command to start it:
This writes an entry like:

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).
To disable OAuth for a remote server, set "oauth": false.

Removing a server

Remove a server interactively:
Or pass the name directly:
The command locates the config file that defines the server (project or global) and removes the entry while preserving JSONC comments.

Authenticating with OAuth

Remote MCP servers that require OAuth can be authenticated through the browser:
If you omit the name, the CLI lists all OAuth-capable servers and lets you pick one. The command opens the provider’s authorization URL in your default browser and stores the tokens locally. If the browser cannot be opened automatically, the URL is printed so you can complete the flow manually. Check the current auth status at any time:
Statuses shown are authenticated, expired, or not authenticated.

How Gizzi identifies itself to OAuth servers

When oauth.clientId is not set, Gizzi picks the first method the authorization server supports:
  1. 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 uses https://platform.allternit.com/oauth/gizzi-client.json as its client_id. That document lists Gizzi’s loopback redirect URIs (http://127.0.0.1:19876/mcp/oauth/callback and http://localhost:19876/mcp/oauth/callback). Nothing is registered and nothing is stored per server.
  2. 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.
  3. If the server supports neither method, gizzi mcp list shows needs client registration. Add a pre-registered clientId (and clientSecret if the server requires one) to the server’s oauth block.
A configured 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:
Running logout without a name presents a picker for all servers that have stored credentials.

Debugging OAuth

Use debug to inspect the OAuth handshake and basic HTTP connectivity:
The command prints:
  • 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/discover request: a 2026-07-28 server lists its supported versions, and an older server rejects it.
  • WWW-Authenticate header analysis
  • Whether the OAuth flow can be triggered successfully
This is useful when a remote server shows 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:
  1. gizzi.jsonc
  2. gizzi.json
  3. .gizzi/gizzi.jsonc
  4. .gizzi/gizzi.json
If none exist, the wizard defaults to 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: