@genlobe/mcp-server 2.2.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -116
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2203 -1474
- package/package.json +41 -41
package/README.md
CHANGED
|
@@ -1,116 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## 📊 End-User Endpoint Coverage
|
|
92
|
-
|
|
93
|
-
Categories currently documented in `get_end_user_endpoints`:
|
|
94
|
-
|
|
95
|
-
| Category | Routes | Status |
|
|
96
|
-
|----------|--------|--------|
|
|
97
|
-
| `authentication` | `/v1/auth/*` | ✅ Complete |
|
|
98
|
-
| `organizations` | `/v1/organizations/*` (incl. subscription, usage, members) | ✅ Complete |
|
|
99
|
-
| `subscriptions` | `/v1/subscriptions/*` | ✅ Complete |
|
|
100
|
-
| `billing` | `/v1/billing/*` | ✅ Complete |
|
|
101
|
-
| `plans` | `/v1/plans/*` | ✅ Complete |
|
|
102
|
-
| `agents` | `/v1/user/agents/*` | ✅ Complete |
|
|
103
|
-
| `users` | `/v1/users/*` | ✅ Complete |
|
|
104
|
-
| `usage` | `/v1/api/usage/*`, `/v1/usage/*` | ✅ Complete |
|
|
105
|
-
| `entities` | `/v1/entity/schemas/*`, `/v1/entity/records/*` | ✅ Complete |
|
|
106
|
-
| `departments` | `/v1/departments/*` | ✅ Complete |
|
|
107
|
-
| `ai` | `/v1/ai/completions` | ✅ Complete |
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## 🔧 Environment Variables
|
|
112
|
-
|
|
113
|
-
| Variable | Description | Required |
|
|
114
|
-
|----------|-------------|----------|
|
|
115
|
-
| `SAAS_API_URL` | API base URL | Yes |
|
|
116
|
-
| `SAAS_API_KEY` | API Key for accessing protected docs | No |
|
|
1
|
+
# 🔌 MCP Server for Multi-tenant SaaS API
|
|
2
|
+
|
|
3
|
+
This MCP Server provides AI-enabled IDEs (GitHub Copilot, Cursor, Claude, etc.) with comprehensive API documentation to help build frontend applications.
|
|
4
|
+
|
|
5
|
+
## ⚠️ Important: Two Types of Endpoints
|
|
6
|
+
|
|
7
|
+
This API has **TWO types of endpoints**:
|
|
8
|
+
|
|
9
|
+
1. **Tenant/Dashboard endpoints** (`/v1/tenant-auth/*`, `/v1/dashboard/*`)
|
|
10
|
+
- For tenant admins managing their SaaS account
|
|
11
|
+
- Uses JWT from tenant login
|
|
12
|
+
- **NOT for end-user frontends**
|
|
13
|
+
|
|
14
|
+
2. **End-user endpoints** (`/v1/auth/*`, `/v1/organizations/*`, etc.)
|
|
15
|
+
- For building frontend applications
|
|
16
|
+
- Uses API Key (`X-API-Key`) + User JWT
|
|
17
|
+
- **USE THESE for end-user frontends**
|
|
18
|
+
|
|
19
|
+
## 🚀 Installation
|
|
20
|
+
|
|
21
|
+
Add this to your project's `.vscode/mcp.json`:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"servers": {
|
|
26
|
+
"multiagent": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["-y", "https://api.your-domain.com/static/mcp-server.tgz"],
|
|
29
|
+
"env": {
|
|
30
|
+
"SAAS_API_URL": "https://api.your-domain.com"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Restart VS Code and you're ready!
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🛠️ Available Tools
|
|
42
|
+
|
|
43
|
+
| Tool | Description |
|
|
44
|
+
|------|-------------|
|
|
45
|
+
| `get_api_overview` | High-level API architecture overview |
|
|
46
|
+
| `get_end_user_endpoints` | Detailed documentation for end-user endpoints |
|
|
47
|
+
| `get_request_headers` | Required HTTP headers for API requests |
|
|
48
|
+
| `get_sdk_template` | Complete TypeScript SDK template |
|
|
49
|
+
| `get_authentication_flow` | Step-by-step auth implementation guide |
|
|
50
|
+
| `get_common_patterns` | Best practices for frontend development |
|
|
51
|
+
| `search_endpoints` | Search endpoints by keyword |
|
|
52
|
+
| `get_endpoint_details` | Get details of a specific endpoint |
|
|
53
|
+
| `get_openapi_spec` | Full OpenAPI specification from live API |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 📋 Quick Start for AI Assistants
|
|
58
|
+
|
|
59
|
+
When building a frontend for end-users:
|
|
60
|
+
|
|
61
|
+
1. **Call `get_api_overview`** first to understand the architecture
|
|
62
|
+
2. **Call `get_authentication_flow`** to implement login/register
|
|
63
|
+
3. **Call `get_end_user_endpoints`** to see all available endpoints
|
|
64
|
+
4. **Call `get_sdk_template`** to get a ready-to-use API client
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 📦 Local Development
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
cd mcp-server
|
|
72
|
+
npm install
|
|
73
|
+
npm run build
|
|
74
|
+
npm pack # Creates .tgz package
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 🔧 Environment Variables
|
|
80
|
+
|
|
81
|
+
| Variable | Description | Required |
|
|
82
|
+
|----------|-------------|----------|
|
|
83
|
+
| `SAAS_API_URL` | API base URL | Yes |
|
|
84
|
+
| `SAAS_API_KEY` | API Key for accessing protected docs | No |
|
|
85
|
+
|
|
86
|
+
|
package/dist/index.d.ts
CHANGED