Skip to main content

Overview

Gemini CLI is Google’s command-line tool for AI-assisted software development. You can connect your Logic MCP server to make Logic documents available during coding sessions.

Prerequisites

Adding Logic MCP Server

Using Gemini Commands

Important: Run this command in your terminal, not within a Gemini CLI session.
Add your Logic MCP server using the gemini mcp add command:
gemini mcp add --transport http --scope user [SERVER_NAME] [MCP_SERVER_URL]
Parameters:
  • --transport http - Required for HTTP-based MCP servers like Logic
  • --scope user - Sets the server globally for all projects (omit for project-specific configuration)
  • [SERVER_NAME] - A name to identify this server (e.g., “logic-docs”)
  • [MCP_SERVER_URL] - Your Logic MCP server URL from organization settings
Omit --scope user to configure the server for only the current project directory.

Managing MCP Servers

List configured servers:
gemini mcp list
Remove a server:
gemini mcp remove [SERVER_NAME]

Using Logic Documents

Once configured, Logic documents are available in your Gemini CLI sessions.

Verifying Your Connection

To check if your Logic MCP server is connected:
  1. Run gemini mcp list in your terminal
  2. Verify your Logic server shows as “Connected”
If the server appears with a Connected status, Logic documents are available for use.

Accessing Logic Documents

Gemini CLI can automatically access your Logic documents based on the conversation context. You can:
  • Ask Gemini CLI to use specific Logic documents by name
  • Let Gemini CLI discover and suggest relevant Logic documents
  • Execute Logic documents with parameters as needed
Example usage:
Can you run the "code-review" Logic document on the current branch?
Gemini CLI will execute the Logic document and incorporate the results into its response.
Long-running Logic documents are handled asynchronously. Learn more about async task execution.
Loop Detection WarningWhen running long-running Logic documents, Gemini CLI may display a “potential loop detected” warning due to repeated polling of the execution status. When prompted, select “Disable loop detection for this session” to allow the async task to complete.

Next Steps