Skip to content

Commit ba67ce6

Browse files
authored
Merge pull request #191 from deploystackio/feat/mail
Feat/mail
2 parents fff6dda + 2a573ba commit ba67ce6

File tree

8 files changed

+543
-547
lines changed

8 files changed

+543
-547
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: Gateway Client Configuration API
3+
description: Developer guide for the Gateway Client Configuration endpoint that provides pre-formatted configuration files for MCP clients to connect to the DeployStack Gateway
4+
---
5+
6+
# Gateway Client Configuration API
7+
8+
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.
9+
10+
## Overview
11+
12+
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`.
13+
14+
## API Endpoint
15+
16+
**Route:** `GET /api/gateway/config/:client`
17+
18+
**Parameters:**
19+
- `:client` - The MCP client type (required)
20+
- Supported values: `claude-desktop`, `cline`, `vscode`, `cursor`, `windsurf`
21+
22+
**Authentication:** Dual authentication support
23+
- Cookie-based authentication (web users)
24+
- OAuth2 Bearer token authentication (CLI users)
25+
26+
**Required Permission:** `gateway.config:read`
27+
**Required OAuth2 Scope:** `gateway:config:read`
28+
29+
## Client Configurations
30+
31+
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`
32+
33+
**Supported Clients:**
34+
- `claude-desktop` - Claude Desktop application
35+
- `cline` - Cline VS Code extension
36+
- `vscode` - VS Code MCP extension
37+
- `cursor` - Cursor IDE
38+
- `windsurf` - Windsurf AI IDE
39+
40+
**Configuration Source:** For the current client configuration formats and JSON structures, see the `generateClientConfig()` function in:
41+
42+
```bash
43+
services/backend/src/routes/gateway/config/get-client-config.ts
44+
```
45+
46+
## Permission System
47+
48+
### Role Assignments
49+
50+
The `gateway.config:read` permission is assigned to:
51+
- **global_admin** - Basic access to get gateway configs they need
52+
- **global_user** - Basic access to get gateway configs they need
53+
54+
### OAuth2 Scope
55+
56+
The `gateway:config:read` OAuth2 scope:
57+
- **Purpose:** Enables CLI tools and OAuth2 clients to fetch gateway configurations
58+
- **Description:** "Generate client-specific gateway configuration files"
59+
- **Gateway Integration:** Automatically requested during gateway OAuth login
60+
61+
## Future Enhancements
62+
63+
### Additional Client Types
64+
- **Zed Editor** - Growing popularity in developer community
65+
- **Neovim** - Popular among command-line developers
66+
- **Custom Clients** - Generic JSON format for custom integrations
67+
68+
### Configuration Customization
69+
- **Environment Variables** - Support for different gateway URLs
70+
- **TLS/SSL Support** - When gateway supports secure connections
71+
- **Authentication Tokens** - If gateway adds authentication in future
72+
73+
## Related Documentation
74+
75+
- [Backend API Security](/development/backend/api-security) - Security patterns and authorization
76+
- [Backend OAuth2 Server](/development/backend/oauth2-server) - OAuth2 implementation details
77+
- [Gateway OAuth Implementation](/development/gateway/oauth) - Gateway OAuth client
78+
- [Gateway SSE Transport](/development/gateway/sse-transport) - Gateway SSE architecture

docs/development/backend/index.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar: Getting Started
55
---
66

77
import { Card, Cards } from 'fumadocs-ui/components/card';
8-
import { Database, Shield, Plug, Settings, Mail, TestTube, Wrench, BookOpen } from 'lucide-react';
8+
import { Database, Shield, Plug, Settings, Mail, TestTube, Wrench, BookOpen, Terminal } from 'lucide-react';
99

1010
# DeployStack Backend Development
1111

@@ -96,6 +96,14 @@ The development server starts at `http://localhost:3000` with API documentation
9696
>
9797
User roles, permissions system, and access control implementation details.
9898
</Card>
99+
100+
<Card
101+
icon={<Terminal />}
102+
href="/deploystack/development/backend/gateway-client-config"
103+
title="Gateway Client Configuration"
104+
>
105+
API endpoint for generating client-specific gateway configuration files with dual authentication support.
106+
</Card>
99107
</Cards>
100108

101109
## Project Structure

0 commit comments

Comments
 (0)