Gateway Client Configuration API
The Gateway Client Configuration API provides pre-formatted configuration files for various MCP clients to connect to the local DeployStack Gateway. This eliminates manual configuration steps and reduces setup errors for developers.
Overview
The endpoint generates client-specific JSON configurations that users can directly use in their MCP clients (Claude Desktop, Cline, VSCode, Cursor, Windsurf) to connect to their local DeployStack Gateway running on http://localhost:9095/sse
.
API Endpoint
Route: GET /api/gateway/config/:client
Parameters:
:client
- The MCP client type (required)- Supported values:
claude-desktop
,cline
,vscode
,cursor
,windsurf
- Supported values:
Authentication: Dual authentication support
- Cookie-based authentication (web users)
- OAuth2 Bearer token authentication (CLI users)
Required Permission: gateway.config:read
Required OAuth2 Scope: gateway:config:read
Client Configurations
The endpoint supports multiple MCP client types, each with its own optimized configuration format. All configurations use the DeployStack Gateway's SSE endpoint: http://localhost:9095/sse
Supported Clients:
claude-desktop
- Claude Desktop applicationcline
- Cline VS Code extensionvscode
- VS Code MCP extensioncursor
- Cursor IDEwindsurf
- Windsurf AI IDE
Configuration Source: For the current client configuration formats and JSON structures, see the generateClientConfig()
function in:
services/backend/src/routes/gateway/config/get-client-config.ts
Permission System
Role Assignments
The gateway.config:read
permission is assigned to:
- global_admin - Basic access to get gateway configs they need
- global_user - Basic access to get gateway configs they need
OAuth2 Scope
The gateway:config:read
OAuth2 scope:
- Purpose: Enables CLI tools and OAuth2 clients to fetch gateway configurations
- Description: "Generate client-specific gateway configuration files"
- Gateway Integration: Automatically requested during gateway OAuth login
Future Enhancements
Additional Client Types
- Zed Editor - Growing popularity in developer community
- Neovim - Popular among command-line developers
- Custom Clients - Generic JSON format for custom integrations
Configuration Customization
- Environment Variables - Support for different gateway URLs
- TLS/SSL Support - When gateway supports secure connections
- Authentication Tokens - If gateway adds authentication in future
Related Documentation
- Backend API Security - Security patterns and authorization
- Backend OAuth2 Server - OAuth2 implementation details
- Gateway OAuth Implementation - Gateway OAuth client
- Gateway SSE Transport - Gateway SSE architecture
Environment Variables
Complete guide to configuring and using environment variables in the DeployStack backend application for both development and production environments.
Global Settings Management
Comprehensive key-value store system with group organization, encryption support, and auto-initialization for DeployStack Backend configuration management.