Search documentation

Type a word or phrase to search documentation.

    Guides

    Connect AI tools with MCP

    Connect an MCP-compatible AI client to Legra so it can query data and carry out approved workspace tasks.

    Prepare access

    Install Legra, sign in with legra account login, and verify a query from the terminal. Select a workspace you intend the client to use. The client process must be able to find the legra executable and use the same account access.

    Configure the client

    For clients that accept an mcpServers configuration, add a process-based connection like this, replacing research with your workspace:

    {
      "mcpServers": {
        "legra": {
          "command": "legra",
          "args": ["--workspace", "research", "system", "mcp", "serve"]
        }
      }
    }
    

    Use an absolute executable path if the desktop client cannot find legra. Configuration file locations vary by client; use its MCP setup instructions.

    For Codex, register the command from your terminal:

    codex mcp add legra -- legra --workspace research system mcp serve
    

    Restart or reconnect the client after changing its configuration.

    Try a read-only task

    Ask the client to list available branches or query a known graph. Check that it is using the intended workspace before allowing a data change.

    Workspace selection supplies a default context, not an access restriction. Workspace permissions and the client's approval controls determine what actions can proceed. Review requests to update data, delete resources, or change access.

    Give the client a reviewable task

    For changes, name the proposal branch, the sources to use, and the checks you expect before review. Ask the client to explain its proposed changes and keep supporting evidence with the work. Review the result before merging it into the branch your team uses as its shared starting point.

    See Working with AI for the complete cycle of inheriting knowledge, preparing a contribution, and retaining accepted work for future sessions.

    Troubleshoot

    • If the executable is missing, check its path in the client configuration.
    • If authentication fails, repeat sign-in from the environment used by the client.
    • If results are empty, verify the workspace, branch, and graph selection.
    • If the connection closes immediately, inspect the client's MCP log for the command's error message.

    See the MCP command reference for the launch command.