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
Follow the Claude Code CLI installation guide
3
Add Documentation
Index at least one library:
Installation
Automatic Installation (Recommended)
OpenGround provides an automatic installer that uses theclaude CLI:
- Removes any existing OpenGround MCP configuration
- Registers the
openground-mcpserver with Claude Code - 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 theclaude 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-mcpas 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
openground in the list3
Test in Conversation
Ask Claude: “What libraries are available in openground?”Claude should call the
list_libraries_tool and show your indexed documentationUsing 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: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. Theopenground-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:WSL (Windows Subsystem for Linux)
If running Claude Code on Windows but OpenGround in WSL, use the WSL configuration:wsl.exe wrapper:
Troubleshooting
Error: ‘claude’ CLI not found
Theclaude 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
2
Test Server Manually
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: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