Authentication
MCP Server authentication uses JWT tokens with bcrypt hashing, role-based access control, and four deployment modes including standalone, 1Password, Local Vault, and HCP Vault.
Last updated
Was this helpful?
Was this helpful?
# Direct values in config file
DB_HOST=localhost
DB_PASSWORD=your_password
SECRET_KEY=your_secret_key
JWT_SECRET_KEY=your_jwt_secret
GEMINI_API_KEY=your_api_key# RAG API
rag-api.exe --config=config.env.secure.local
# MCP Server
$env:MCP_CONFIG="config.env.secure.local"
mcp-server.exe# 1Password references
DB_USER=op://Employee/RAG-Database/username
DB_PASSWORD=op://Employee/RAG-Database/password
SECRET_KEY=op://Employee/RAG-Security/secret-key
JWT_SECRET_KEY=op://Employee/RAG-Security/jwt-secret
GEMINI_API_KEY=op://Employee/RAG-API-Keys/gemini# RAG API
op run --env-file=config.env.1password.employee -- rag-api.exe
# MCP Server
op run --env-file=config.env.1password.employee -- mcp-server.exe# Vault Configuration
VAULT_ADDR=http://127.0.0.1:8200
VAULT_TOKEN=rag-root-token
VAULT_SKIP_VERIFY=true
VAULT_SECRET_PATH=rag-in-a-box
VAULT_MOUNT_POINT=secret# Start Vault in dev mode
vault server -dev -dev-root-token-id="rag-root-token"
# Store secrets
vault kv put secret/rag-in-a-box/database \
DB_USER=root \
DB_PASSWORD=Password123! \
DB_NAME=kb_chunks
vault kv put secret/rag-in-a-box/security \
SECRET_KEY=your_secret_key \
JWT_SECRET_KEY=your_jwt_secret
vault kv put secret/rag-in-a-box/api-keys \
GEMINI_API_KEY=your_api_key# RAG API
rag-api.exe --config=config.env.vault.local
# MCP Server
$env:MCP_CONFIG="config.env.vault.local"
mcp-server.exe# HCP Vault Configuration
VAULT_ADDR=https://your-vault-cluster.hashicorp.cloud:8200
VAULT_NAMESPACE=admin
VAULT_SKIP_VERIFY=false
VAULT_SECRET_PATH=rag-in-a-box
VAULT_MOUNT_POINT=secret
# AppRole Authentication
VAULT_ROLE_ID=your-vault-role-id
VAULT_SECRET_ID=your-vault-secret-id# RAG API
rag-api.exe --config=config.env.hcp.live
# MCP Server
$env:MCP_CONFIG="config.env.hcp.live"
mcp-server.exe