Skip to main content

Overview

Codex is an AI-powered CLI tool for software development. You can connect your Logic MCP server to make Logic documents available during coding sessions.

Prerequisites

  • Codex CLI installed
  • Logic MCP server created (Quick Start guide)
  • Server URL from Logic organization settings

Adding Logic MCP Server

Using Codex Commands

Important: Run this command in your terminal, not within a Codex session.
Add your Logic MCP server using the codex mcp add command:
codex mcp add [SERVER_NAME] --url [MCP_SERVER_URL]
Parameters:
  • [SERVER_NAME] - A name to identify this server (e.g., “logic-docs”)
  • --url [MCP_SERVER_URL] - Your Logic MCP server URL from organization settings
Example:
codex mcp add logic-docs --url https://mcp.logic.inc/your-server-id

Managing MCP Servers

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

Using Logic Documents

Once configured, Logic documents are available in your Codex sessions.

Verifying Your Connection

To check if your Logic MCP server is connected:
  1. Start a Codex session
  2. Type /mcp in your chat
  3. Verify your Logic server shows as “enabled”
If the server appears with an enabled status, Logic documents are available for use.

Accessing Logic Documents

Codex can automatically access your Logic documents based on the conversation context. You can:
  • Ask Codex to use specific Logic documents by name
  • Let Codex 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?
Codex 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.

Next Steps