Overview
The OpenGround MCP server can be customized through configuration files, environment variables, and runtime settings. This guide covers all configuration options and best practices.Configuration File
Location
OpenGround uses a JSON configuration file located at: Linux/macOS:Structure
Configuration Options
Database Settings
Path to the LanceDB database directory. All documentation vectors and metadata are stored here.Example:
"/Users/john/.local/share/openground/lancedb"Name of the LanceDB table containing documentation chunks.Example:
"documents", "docs_v2"Base directory for storing raw downloaded documentation HTML/markdown files.Example:
"/Users/john/.local/share/openground/raw_data"Extraction Settings
Maximum number of concurrent HTTP requests when downloading documentation.Range: 1-200
Recommended: 20-100 depending on network bandwidth
Recommended: 20-100 depending on network bandwidth
Embedding Settings
Number of text chunks to process in a single embedding batch.Range: 1-128
Memory impact: Higher = more memory usage
Speed impact: Higher = faster processing
Memory impact: Higher = more memory usage
Speed impact: Higher = faster processing
Maximum number of characters per documentation chunk.Range: 200-2000
Recommended: 600-1000 for balanced context
Recommended: 600-1000 for balanced context
Number of overlapping characters between adjacent chunks.Range: 0-500
Purpose: Ensures context continuity across chunk boundaries
Purpose: Ensures context continuity across chunk boundaries
Hugging Face model identifier for generating embeddings.Popular options:
"BAAI/bge-small-en-v1.5"- Fast, 384 dimensions (default)"BAAI/bge-base-en-v1.5"- Balanced, 768 dimensions"BAAI/bge-large-en-v1.5"- Highest quality, 1024 dimensions
Dimensionality of the embedding vectors. Must match the model’s output dimension.Model dimensions:
- BGE-small: 384
- BGE-base: 768
- BGE-large: 1024
Backend library for generating embeddings.Options:
"fastembed"- Fast, optimized for CPU (default)"sentence-transformers"- More models, GPU support
Query Settings
Number of search results returned by
Recommended: 3-10 for most use cases
search_documents_tool.Range: 1-100Recommended: 3-10 for most use cases
Source Settings
Automatically detect and add project-local source definitions.Purpose: Enables project-specific documentation sources via
.openground/sources.jsonEnvironment Variables
System Environment
These environment variables are set automatically by the MCP server at startup:Disables tokenizer parallelism to prevent stdout pollution.Purpose: Ensures clean JSON-RPC communication with MCP clients
Reduces transformers library logging to errors only.Purpose: Prevents debug logs from interfering with MCP protocol
Suppresses fastembed transformers logging.Purpose: Clean server output
User Environment Variables
You can set these before running the MCP server:Overrides the default config directory location.Example:
Result: Config file at
export XDG_CONFIG_HOME=/custom/configResult: Config file at
/custom/config/openground/config.jsonOverrides the default data directory location.Example:
Result: Database at
export XDG_DATA_HOME=/custom/dataResult: Database at
/custom/data/openground/lancedbMCP Server Configuration
FastMCP Settings
The server is built using FastMCP with these settings:Server Startup Process
- Environment setup: Set silence environment variables
- Background initialization: Start daemon thread to pre-load resources
- Cache warming: Load library metadata and embedding model
- MCP transport: Initialize stdio transport
- Ready signal: Log “Server is fully ready” message
Pre-loading Behavior
The server pre-loads resources in a background thread:- First tool call is instant (no cold start)
- Embedding model is in memory
- Library metadata is cached
- Number of libraries in database
- Embedding model size
- Disk I/O speed
Managing Configuration
View Current Config
Set Individual Values
Reset to Defaults
Edit Manually
Performance Tuning
For Fast Search (Low Latency)
- Search: < 100ms
- Model size: ~90MB
- Memory usage: ~200MB
For High Accuracy (Better Results)
- Search: 200-500ms
- Model size: ~1.3GB
- Memory usage: ~2GB
- Better semantic understanding
For Large Documentation Sets
- Faster ingestion
- Smaller chunks = more granular search
- Higher batch size = faster embedding
For Memory-Constrained Systems
- Lower memory footprint
- Slower processing
- Still good search quality
Advanced Configuration
Custom Database Location
Move database to SSD for better performance:Multiple Environments
Use different configs for development vs. production: Development:Project-Local Sources
Create project-specific documentation sources:.openground/sources.json:
sources.auto_add_local: true, this source is automatically available when working in this directory.
Troubleshooting
Config File Not Found
Symptom: Server uses all defaults Solution: Create config file:Invalid JSON
Error:Invalid JSON in config file
Solution: Validate JSON syntax:
Changes Not Taking Effect
Symptom: Modified config but server still uses old values Solution: Configuration is cached at server startup. Restart your MCP client to reload the server with new config.Database Path Issues
Error:Database not found or Table doesn't exist
Solution: Verify paths are correct and accessible:
Embedding Model Download Fails
Symptom: Server hangs or errors during initialization Solution:- Check internet connection
- Manually download model:
- Use alternative model:
Best Practices
Configuration Checklist
- Config file is valid JSON
-
db_pathpoints to accessible directory -
embedding_dimensionsmatchesembedding_model -
chunk_size>chunk_overlap -
top_kis reasonable (3-20) -
concurrency_limitdoesn’t overwhelm network - Environment variables don’t conflict
- Server restarts after config changes
Next Steps
Search Documents
Learn how to effectively search documentation with your configured server
List Libraries
Understand available libraries and versions