MCP Server Overview
OpenGround provides a Model Context Protocol (MCP) server that enables AI agents to search your local documentation database in real-time.What is MCP?
The Model Context Protocol is an open protocol that standardizes how AI applications provide context to Large Language Models (LLMs). It enables secure, controlled access to data sources through a client-server architecture.How OpenGround Uses MCP
OpenGround implements an MCP server (openground-mcp) that exposes three powerful tools to AI agents:
search_documents_tool
Search documentation using semantic search and BM25 hybrid retrieval
list_libraries_tool
View all available libraries and versions in your local database
get_full_content_tool
Retrieve complete page content from search results
Server Architecture
The MCP server runs as a subprocess managed by your AI agent. Communication happens over stdio (standard input/output), which provides:- Security: No network exposure, runs locally only
- Performance: Direct process communication with zero network latency
- Simplicity: No ports, no authentication, no TLS configuration
Benefits
1. Real-Time Documentation Access
Instead of relying on the AI’s training data (which may be outdated), agents can query the latest official documentation from your local database.2. Isolated Context
Documentation searches run in a separate context, preventing your main conversation from being cluttered with search results.3. Offline Operation
Once documentation is indexed, all searches work completely offline—no API calls, no rate limits.4. Version-Specific Results
Search documentation for specific library versions, ensuring compatibility with your project dependencies.5. Multi-Library Support
Index and search documentation from multiple frameworks simultaneously:MCP Tool Details
search_documents_tool
Performs hybrid search (semantic + BM25) against your local documentation database. Parameters:query(string): The search querylibrary_name(string): Which library to search (e.g., “react”, “fastapi”)version(string): Library version (e.g., “latest”, “v18.2.0”)
list_libraries_tool
Lists all documentation libraries and their versions available in your local database. Parameters: None Returns: Dictionary mapping library names to lists of available versionsget_full_content_tool
Retrieves the complete content of a documentation page by URL. Parameters:url(string): The page URL from search resultsversion(string): Library version
Agent Workflow
When you ask an AI agent about a library, the typical workflow is:Server Configuration
The MCP server uses your OpenGround configuration:Performance Optimizations
Theopenground-mcp server includes several optimizations:
- Background initialization: Embedding models are loaded in a background thread
- Cache warming: Metadata is pre-cached on startup
- Minimal logging: Stdout pollution is suppressed for clean stdio communication