DocumentationNeuronMCP Documentation
Documentation Branch: You are viewing documentation for the main branch (3.0.0-devel). Select a branch to view its documentation:
NeuronMCP Setup
Overview
The NeuronMCP Configuration Schema provides a comprehensive, production-grade database schema that sets up everything needed for NeuronMCP to work seamlessly with NeuronDB. This includes LLM models with encrypted API keys, vector index configurations, worker settings, ML model defaults, tool configurations, and system-wide settings.
The schema follows database best practices with proper normalization, security, and extensibility:
- 13 Normalized Tables - Organized by concern (LLM models, indexes, workers, ML, tools, system)
- 30+ Management Functions - Complete CRUD operations for all configurations
- Pre-populated Defaults - 50+ LLM models, index templates, worker configs, ML defaults
- Security - Encrypted API keys using pgcrypto
- Backward Compatible - Falls back to GUC settings if database config not found
Quick Start
1. Run Setup Script
Run setup script
cd NeuronMCP
./scripts/neuronmcp-setup.sh
# Or with custom database connection:
DB_HOST=localhost DB_PORT=5432 DB_NAME=neurondb DB_USER=postgres ./scripts/neuronmcp-setup.sh2. Set API Keys
Set API keys for models
# Set API key for a model
SELECT neurondb_set_model_key('text-embedding-3-small', 'sk-your-api-key-here');
# Set API key with expiration
SELECT neurondb_set_model_key('gpt-4', 'sk-your-key', NOW() + INTERVAL '90 days');3. Verify Setup
Verify configuration
# View all active models
SELECT * FROM neurondb.v_llm_models_active;
# View models ready for use (have API keys)
SELECT * FROM neurondb.v_llm_models_ready;
# Get all configurations
SELECT neurondb_get_all_configs();Schema Structure
The configuration schema includes:
- LLM Models & Providers (5 tables) - Provider management, model catalog, API key storage, model configurations, and usage tracking
- Vector Indexes (2 tables) - Index configurations and templates
- Workers (2 tables) - Worker configurations and schedules
- ML Defaults (2 tables) - ML algorithm defaults and hyperparameter templates
- Tool Configurations (1 table) - Tool-specific configurations
- System Settings (1 table) - System-wide configuration settings
Setting API Keys
API keys are encrypted using pgcrypto and stored securely in the database:
- Use
neurondb_set_model_key()function to set API keys - Keys are automatically encrypted before storage
- Support for key expiration dates
- Keys are decrypted automatically when needed by NeuronMCP
Verification
After setup, verify your configuration:
- Check active models:
SELECT * FROM neurondb.v_llm_models_active; - Check ready models (with API keys):
SELECT * FROM neurondb.v_llm_models_ready; - View all configurations:
SELECT neurondb_get_all_configs(); - Test MCP server connection