> ## Documentation Index
> Fetch the complete documentation index at: https://docs.logic.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code CLI Integration

> Connect Logic MCP servers to Claude Code command-line interface

## Overview

Claude Code is Anthropic's CLI tool for AI-assisted software development. You can connect your Logic MCP server to make Logic agents available during coding sessions.

## Prerequisites

* **Claude Code CLI** installed ([installation guide](https://claude.com/claude-code))
* **Logic MCP server** created ([Quick Start guide](/mcp/quick-start))
* **Server URL** from Logic organization settings

## Adding Logic MCP Server

### Using Claude Code Commands

<Note>
  **Important**: Run this command in your terminal, not within a Claude Code
  session.
</Note>

Add your Logic MCP server using the `claude mcp add` command:

```bash theme={null}
claude mcp add --transport http [SERVER_NAME] [MCP_SERVER_URL]
```

**Parameters:**

* `--transport http` - Required for HTTP-based MCP servers like Logic
* `[SERVER_NAME]` - A name to identify this server (e.g., "logic-docs")
* `[MCP_SERVER_URL]` - Your Logic MCP server URL from [organization settings](https://app.logic.inc/settings/organization-settings/mcp-servers)

### Managing MCP Servers

**List configured servers:**

```bash theme={null}
claude mcp list
```

**Remove a server:**

```bash theme={null}
claude mcp remove [SERVER_NAME]
```

## Using Logic Agents

Once configured, Logic agents are available in your Claude Code sessions.

### Verifying Your Connection

To check if your Logic MCP server is connected:

1. **Start a Claude Code session**
2. **Type `/mcp`** in your chat
3. **Verify your Logic server shows as connected**

If the server appears and shows a connected status, Logic agents are available for use.

### Accessing Logic Agents

Claude Code can automatically access your Logic agents based on the conversation context. You can:

* Ask Claude Code to use specific Logic agents by name
* Let Claude Code discover and suggest relevant Logic agents
* Execute Logic agents with parameters as needed

**Example usage:**

```
Can you run the "code-review" Logic agent on the current branch?
```

Claude Code will execute the Logic agent and incorporate the results into its response.

<Info>
  Long-running Logic agents are handled asynchronously. Learn more about
  [async task execution](/mcp/async-tasks).
</Info>

## Next Steps

* [Learn about async tasks](/mcp/async-tasks) - Handle long-running Logic agents
* [Explore agent scope](/mcp/agent-scope) - Control tool availability
