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

# Using Linkly AI in Claude Code

> Integrate your Linkly AI local knowledge base with Claude Code, providing document search and reading capabilities to the AI coding assistant

## What You Can Do

<AccordionGroup>
  <Accordion title="Let the AI read design documents before writing code">
    Use Linkly AI's `search` tool in the terminal to retrieve architecture
    decision records, then use `read` to read specific specifications. Claude
    Code can then write code with a full understanding of project conventions —
    reducing style inconsistencies or violations of design principles.
  </Accordion>

  <Accordion title="Trace historical decisions and avoid repeating past mistakes">
    Quickly use Linkly AI to find records of "why it was designed this way."
    With an understanding of historical context, the AI gives suggestions that
    are more grounded in reality — not just generic answers disconnected from
    your situation.
  </Accordion>

  <Accordion title="Seamlessly reference documents within a command-line workflow">
    Without leaving the terminal, search for requirements documents and API
    specifications on your computer through Linkly AI's `search` tool directly
    in Claude Code conversations — stay focused without being interrupted by
    frequent window switching.
  </Accordion>
</AccordionGroup>

## Prerequisites

* [Claude Code](https://claude.ai/code) installed
* Linkly AI Desktop running with the MCP service active

## Configuration Steps

<Tabs>
  <Tab title="MCP HTTP (Recommended)" icon="globe">
    Run in your terminal:

    ```bash theme={null}
    claude mcp add --transport http linkly-ai http://127.0.0.1:60606/mcp
    ```
  </Tab>

  <Tab title="MCP Stdio" icon="terminal">
    First [install Linkly AI CLI](/docs/en/use-cli), then run:

    ```bash theme={null}
    claude mcp add linkly-ai -- linkly mcp
    ```
  </Tab>

  <Tab title="CLI" icon="square-terminal">
    First [install Linkly AI CLI](/docs/en/use-cli). Once installed, Claude Code can directly call CLI commands to search and read your documents:

    ```bash theme={null}
    linkly search "keyword"
    linkly read <document-id>
    ```
  </Tab>
</Tabs>

<Tip>
  We recommend also installing [Linkly AI Skills](/docs/en/use-skills) to teach the
  AI assistant how to efficiently use Linkly AI's tools, improving search and
  reading efficiency.
</Tip>

## Verify the Connection

After adding, send the following prompt in Claude Code to verify:

```
Search my documents for content about project design
```

If configured correctly, Claude Code will call Linkly AI's `search` tool and return the search results.

## FAQ

<AccordionGroup>
  <Accordion title="HTTP method connection failed">
    Check whether Linkly AI Desktop is running and whether the MCP service is
    active. You can run `curl http://127.0.0.1:60606/mcp` in the terminal to
    test connectivity.
  </Accordion>

  <Accordion title="Stdio method says it cannot find the linkly command">
    Make sure you have [installed Linkly AI CLI](/docs/en/use-cli) and that the
    `linkly` command is available in your PATH.
  </Accordion>
</AccordionGroup>
