# Connect your agent `logMcp` is log's MCP server. It gives your agent every `log` command as a tool. The installer puts it on your PATH next to `log`. ## Claude Code ```bash claude mcp add log -- logMcp ``` You add it once. `logMcp` reloads its own code whenever log changes, so you never restart Claude Code for new code (rule 167): - It waits until no call or job is running, swaps the server underneath, and tells Claude Code the tools changed. - A tool added since the session started is always reachable through `logCall`. - `LOG_MCP_RELOAD=off` turns this off. ## Codex ```bash codex mcp add log -- logMcp ``` ## Cursor In `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project): ```json { "mcpServers": { "log": { "command": "logMcp" } } } ``` ## Antigravity (App, CLI, IDE) In `.agents/mcp_config.json` (workspace-level) or `~/.gemini/config/mcp_config.json` (global): ```json { "mcpServers": { "log": { "command": "bun", "args": ["bin/logMcp.ts"], "timeoutSeconds": 300 } } } ``` Or if `logMcp` is installed on your `PATH`: ```json { "mcpServers": { "log": { "command": "logMcp" } } } ``` In Antigravity IDE or App, you can also open the agent panel's top-right menu (**...**) > **MCP Servers** > **Manage MCP Servers** > **View raw config** to edit `mcp_config.json` directly. ## Any other MCP client Run `logMcp` as a stdio server, with no arguments. It reads your settings from `~/.logCli/.env`, like `log` does. ## Over HTTP For a client that can't start a process, serve the tools over HTTP: ```bash logMcp --http --port 7337 claude mcp add --transport http log http://127.0.0.1:7337/mcp ``` `--host` and `--port` change where it listens. Off your own machine (not `127.0.0.1`) it won't start without a token: set `LOG_MCP_TOKEN` in `~/.logCli/.env`, and clients send `Authorization: Bearer `. ## First call Your agent's first call is `getGuide({ topic: "logMcpInstructions" })`. It lists every use case and how to ask for it. `getGuide({ useCase: "/" })` reads one [use case](useCases/README.md). Every tool's description names its guide, the use cases that call it and the AGENTS.md rules it falls under; AGENTS.md itself is the resource `log://agents` ([MCP server](specs/mcpServer.md)). ## Find and run any command Three tools reach every command, so your agent doesn't have to know which tool to call: - `logSearch { "query": "send a dm on x" }` finds the commands for a job, in plain words. - `logGet { "id": "twitter.dm" }` gives the command's inputs and a call that works. - `logCall { "id": "twitter.dm", "inputs": { … } }` runs it, through the same checks as the command's own tool. A command that acts on a platform needs `live: true` and `confirmLive: true`. More: [the catalog guide](guides/logCatalog.md). ## Watch a long call Calls that take a while write one line per step to `~/.logCli/mcp/.log`. Follow along with: ```bash tail -f ~/.logCli/mcp/$(date -u +%F).log ``` Next: [using log well](usingLog.md).