Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MODE | No | Server mode: 'mcp' for MCP protocol or 'api' for HTTP server | mcp |
| DB_SSL | No | Enable SSL for PostgreSQL connection | false |
| DB_HOST | No | PostgreSQL database host | localhost |
| DB_NAME | No | PostgreSQL database name | ai_mcp_gateway |
| DB_PORT | No | PostgreSQL database port | 5432 |
| DB_USER | No | PostgreSQL database user | postgres |
| API_HOST | No | HTTP API server host | 0.0.0.0 |
| API_PORT | No | HTTP API server port | 3000 |
| LOG_FILE | No | Path to log file | logs/ai-mcp-gateway.log |
| REDIS_DB | No | Redis database number | 0 |
| LOG_LEVEL | No | Logging level | info |
| REDIS_HOST | No | Redis server hostname | localhost |
| REDIS_PORT | No | Redis server port | 6379 |
| DB_PASSWORD | No | PostgreSQL database password | |
| DATABASE_URL | No | PostgreSQL connection URL | |
| DEFAULT_LAYER | No | Default routing layer | L0 |
| OPENAI_API_KEY | No | API key for OpenAI service | |
| REDIS_PASSWORD | No | Redis server password (optional) | |
| API_CORS_ORIGIN | No | CORS origin for HTTP API | * |
| MCP_SERVER_NAME | No | MCP server name | ai-mcp-gateway |
| ANTHROPIC_API_KEY | No | API key for Anthropic service | |
| OSS_MODEL_ENABLED | No | Enable or disable OSS/Local models | false |
| ENABLE_CROSS_CHECK | No | Enable cross-checking between models | true |
| MCP_SERVER_VERSION | No | MCP server version | 0.1.0 |
| OPENROUTER_API_KEY | No | API key for OpenRouter service | |
| OSS_MODEL_ENDPOINT | No | Endpoint URL for OSS/Local models | http://localhost:11434 |
| COST_ALERT_THRESHOLD | No | Cost alert threshold in dollars | 1.00 |
| ENABLE_AUTO_ESCALATE | No | Enable automatic escalation to higher layers | true |
| ENABLE_COST_TRACKING | No | Enable cost tracking | true |
| MAX_ESCALATION_LAYER | No | Maximum layer for auto-escalation | L2 |
Schema
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
No tools | |