Skip to main content

Claude Code Integration

Install OpenGround’s MCP server in Claude Code to enable real-time documentation search during conversations.

Prerequisites

1

Install OpenGround

2

Install Claude Code CLI

3

Add Documentation

Index at least one library:

Installation

OpenGround provides an automatic installer that uses the claude CLI:
This command:
  1. Removes any existing OpenGround MCP configuration
  2. Registers the openground-mcp server with Claude Code
  3. Configures stdio transport at user scope
Success! You should see: “Successfully installed openground to Claude Code!”

Manual Installation

If the automatic installer fails, you can manually install using the claude CLI:

Configuration Details

The automatic installer creates this configuration:

Configuration Location

Claude Code stores MCP configurations at:
  • macOS: ~/.claude/mcp.json
  • Linux: ~/.config/claude/mcp.json
  • Windows: %APPDATA%\Claude\mcp.json

Transport Protocol

OpenGround uses stdio (standard input/output) transport:
  • Claude Code spawns openground-mcp as a subprocess
  • Communication happens over stdin/stdout
  • No network configuration required

Verification

1

Restart Claude Code

Quit and restart Claude Code completely
2

Check MCP Status

You should see openground in the list
3

Test in Conversation

Ask Claude: “What libraries are available in openground?”Claude should call the list_libraries_tool and show your indexed documentation

Using OpenGround with Claude Code

Basic Usage

Once installed, Claude Code will automatically use OpenGround when appropriate:

Explicit Tool Usage

You can explicitly request documentation searches:

Claude Code Agent (Advanced)

For isolated documentation searches, you can create a dedicated OpenGround agent.

What is a Claude Code Agent?

Agents in Claude Code are subagents that:
  • Run in isolated contexts
  • Have access to specific tools
  • Can be invoked automatically or manually
  • Keep your main conversation focused

Installing the Agent

1

Create Agent Directory

2

Create Agent Definition

Create ~/.claude/agents/openground-docs-search.md:
3

Restart Claude Code

Quit and restart for the agent to be recognized

Using the Agent

The agent runs in an isolated context to avoid cluttering your main conversation: Automatic invocation:
Manual invocation:

Agent Workflow

1

List Available Libraries

Agent checks what documentation is in your database
2

Search Documentation

Performs semantic search for your query
3

Present Results

Shows relevant snippets with source URLs
4

Fetch Full Content

Gets complete pages when needed

Platform-Specific Notes

macOS

No special configuration needed. The openground-mcp command should be in your PATH after pip installation.

Linux

Ensure pip’s bin directory is in your PATH:

Windows

Ensure Python Scripts directory is in your PATH:
If not found, add Python Scripts to PATH:

WSL (Windows Subsystem for Linux)

If running Claude Code on Windows but OpenGround in WSL, use the WSL configuration:
This generates a configuration using wsl.exe wrapper:

Troubleshooting

Error: ‘claude’ CLI not found

The claude CLI is not installed. Install it from: https://code.claude.com/docs/en/cli Alternatively, use manual configuration:

MCP Server Not Starting

1

Verify Installation

Should return the path to the executable
2

Test Server Manually

Should start without errors (use Ctrl+C to exit)
3

Check Claude Code Logs

Look for error messages in Claude Code’s console or logs

No Search Results

Verify documentation is indexed:

Agent Not Found

Make sure the agent file is in the correct location:
  • Global: ~/.claude/agents/openground-docs-search.md
  • Project: .claude/agents/openground-docs-search.md

Updating Configuration

To update your OpenGround MCP configuration:
The installer automatically removes old configurations before installing.

Next Steps

Add Libraries

Index more documentation sources

Configure Search

Customize search behavior

MCP Overview

Learn more about MCP architecture

Custom Agents

Use with other MCP clients