CLICommandsl4 mcp

l4 mcp serve

l4 mcp serve runs the LevelFour MCP tools locally, speaking the protocol over stdin and stdout. It reads your cloud data through the LevelFour API with the credential already in your keychain.

l4 mcp serve

You rarely run this yourself. l4 mcp install points Claude Desktop at it, because claude_desktop_config.json starts stdio servers and cannot send an Authorization header to a remote one. Run by hand it waits for a client that will never speak.

What it serves

The read tools, under the same names and schemas as the hosted server, so an agent that learned to route against one gets the same answers from the other. The tools that record a decision are not served here, so the local surface is smaller than the hosted one. They need a read-write credential and run on the hosted server only.

To accept or reject from the terminal instead, use l4 rec accept and l4 rec reject.

Why your key stays put

Nothing is written into the client's configuration file. The server reads through the API with the credential l4 already resolves, so this is the one client path where the key never leaves the keychain. It reaches exactly what that credential reaches, and nothing more.

Output

The protocol occupies stdout, so every notice goes to stderr, which your client captures into its own log. Claude Desktop writes mcp-server-levelfour.log. The server prints two lines at startup:

levelfour mcp 0.1.1 serving 16 tools over stdio
reading the LevelFour API with the stored credential
Those two lines are what a healthy start looks like. They name which binary answered and how much of the surface it carries.

Errors

ExitSymptomCause
4Authentication requiredNo token resolvable; run l4 auth login or set LEVELFOUR_TOKEN

A client disconnecting is a normal ending and exits 0. Returning an error there would make every ordinary exit non-zero, which clients log as a crashed server. Every other code follows the standard CLI exit conventions.