@atlashub/smartstack-mcp 1.2.0 → 1.2.2
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 +88 -199
- package/config/default-config.json +62 -62
- package/dist/index.js +89 -61
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/component.tsx.hbs +298 -298
- package/templates/controller.cs.hbs +166 -166
- package/templates/entity-extension.cs.hbs +87 -87
- package/templates/service-extension.cs.hbs +53 -53
package/README.md
CHANGED
|
@@ -1,199 +1,88 @@
|
|
|
1
|
-
# @smartstack
|
|
2
|
-
|
|
3
|
-
MCP
|
|
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
|
-
Use validate_conventions tool with checks: ["tables", "migrations", "services"]
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Check Migrations
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
Use check_migrations tool with compareBranch: "develop"
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Scaffold a Service
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
Use scaffold_extension tool with:
|
|
102
|
-
- type: "service"
|
|
103
|
-
- name: "UserProfile"
|
|
104
|
-
- options: { methods: ["GetByIdAsync", "UpdateAsync"] }
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Get API Documentation
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
Use api_docs tool with:
|
|
111
|
-
- endpoint: "/api/users"
|
|
112
|
-
- format: "markdown"
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Development
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
# Watch mode
|
|
119
|
-
npm run dev
|
|
120
|
-
|
|
121
|
-
# Test with MCP Inspector
|
|
122
|
-
npm run inspect
|
|
123
|
-
|
|
124
|
-
# Type check
|
|
125
|
-
npm run typecheck
|
|
126
|
-
|
|
127
|
-
# Lint
|
|
128
|
-
npm run lint
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
## Project Structure
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
src/
|
|
135
|
-
├── index.ts # Entry point
|
|
136
|
-
├── server.ts # MCP server configuration
|
|
137
|
-
├── config.ts # Configuration management
|
|
138
|
-
├── tools/ # MCP tool implementations
|
|
139
|
-
│ ├── validate-conventions.ts
|
|
140
|
-
│ ├── check-migrations.ts
|
|
141
|
-
│ ├── scaffold-extension.ts
|
|
142
|
-
│ └── api-docs.ts
|
|
143
|
-
├── resources/ # MCP resource implementations
|
|
144
|
-
│ ├── conventions.ts
|
|
145
|
-
│ ├── project-info.ts
|
|
146
|
-
│ ├── api-endpoints.ts
|
|
147
|
-
│ └── db-schema.ts
|
|
148
|
-
├── lib/ # Shared libraries
|
|
149
|
-
│ ├── detector.ts # Project detection
|
|
150
|
-
│ └── logger.ts # Logging utilities
|
|
151
|
-
├── types/ # TypeScript types
|
|
152
|
-
│ └── index.ts
|
|
153
|
-
└── utils/ # Utility functions
|
|
154
|
-
├── fs.ts # File system operations
|
|
155
|
-
├── git.ts # Git commands
|
|
156
|
-
└── dotnet.ts # .NET CLI commands
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## AtlasHub Conventions
|
|
160
|
-
|
|
161
|
-
This MCP server enforces the following conventions:
|
|
162
|
-
|
|
163
|
-
### SQL Schemas
|
|
164
|
-
- **`core`**: SmartStack platform tables
|
|
165
|
-
- **`extensions`**: Client extension tables
|
|
166
|
-
|
|
167
|
-
### Table Prefixes (by domain)
|
|
168
|
-
Tables use domain-specific prefixes within schemas:
|
|
169
|
-
- `auth_*` - Authorization (Users, Roles, Permissions)
|
|
170
|
-
- `nav_*` - Navigation (Contexts, Applications, Modules)
|
|
171
|
-
- `usr_*` - User profiles (Profiles, Preferences)
|
|
172
|
-
- `ai_*` - AI features (Providers, Models, Prompts)
|
|
173
|
-
- `cfg_*` - Configuration (Settings)
|
|
174
|
-
- `wkf_*` - Workflows (EmailTemplates, Workflows)
|
|
175
|
-
- `support_*` - Support (Tickets, Comments)
|
|
176
|
-
- `entra_*` - Entra sync (Groups, SyncState)
|
|
177
|
-
- `ref_*` - References (Companies, Departments)
|
|
178
|
-
- `loc_*` - Localization (Languages, Translations)
|
|
179
|
-
- `lic_*` - Licensing (Licenses)
|
|
180
|
-
|
|
181
|
-
Example: `.ToTable("auth_Users", "core")`
|
|
182
|
-
|
|
183
|
-
### Migration Naming
|
|
184
|
-
Format: `YYYYMMDD_NNN_Description`
|
|
185
|
-
- Example: `20260115_001_InitialSchema`
|
|
186
|
-
|
|
187
|
-
### Service Pattern
|
|
188
|
-
- Interface: `I{Name}Service`
|
|
189
|
-
- Implementation: `{Name}Service`
|
|
190
|
-
|
|
191
|
-
### Namespace Structure
|
|
192
|
-
- Domain: `SmartStack.Domain`
|
|
193
|
-
- Application: `SmartStack.Application`
|
|
194
|
-
- Infrastructure: `SmartStack.Infrastructure`
|
|
195
|
-
- API: `SmartStack.Api`
|
|
196
|
-
|
|
197
|
-
## License
|
|
198
|
-
|
|
199
|
-
MIT - AtlasHub
|
|
1
|
+
# @atlashub/smartstack-mcp
|
|
2
|
+
|
|
3
|
+
MCP server for SmartStack/AtlasHub platform development.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @atlashub/smartstack-mcp
|
|
9
|
+
claude mcp add -s user smartstack -- smartstack-mcp
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
### Claude Code CLI
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
claude mcp add -s user smartstack -- npx -y @atlashub/smartstack-mcp
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### VS Code
|
|
21
|
+
|
|
22
|
+
Create `.mcp.json` at project root:
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"mcpServers": {
|
|
27
|
+
"smartstack": {
|
|
28
|
+
"command": "npx",
|
|
29
|
+
"args": ["-y", "@atlashub/smartstack-mcp"]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Claude Desktop
|
|
36
|
+
|
|
37
|
+
Config file location:
|
|
38
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
39
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"smartstack": {
|
|
45
|
+
"command": "npx",
|
|
46
|
+
"args": ["-y", "@atlashub/smartstack-mcp"]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Context7 (Optional)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
claude mcp add context7 -s user -- npx -y @upstash/context7-mcp
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
| Variable | Description | Required |
|
|
61
|
+
|----------|-------------|----------|
|
|
62
|
+
| `SMARTSTACK_PROJECT_PATH` | Path to your SmartStack.app project | Yes |
|
|
63
|
+
| `SMARTSTACK_API_URL` | SmartStack API URL | No |
|
|
64
|
+
| `LOG_LEVEL` | Logging level (debug, info, warn, error) | No |
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
### Tools
|
|
69
|
+
|
|
70
|
+
| Tool | Description |
|
|
71
|
+
|------|-------------|
|
|
72
|
+
| `validate_conventions` | Validate AtlasHub conventions |
|
|
73
|
+
| `check_migrations` | Analyze EF Core migrations |
|
|
74
|
+
| `scaffold_extension` | Generate code scaffolding |
|
|
75
|
+
| `api_docs` | Get API documentation |
|
|
76
|
+
|
|
77
|
+
### Resources
|
|
78
|
+
|
|
79
|
+
| Resource URI | Description |
|
|
80
|
+
|--------------|-------------|
|
|
81
|
+
| `smartstack://conventions` | Naming conventions |
|
|
82
|
+
| `smartstack://project` | Project information |
|
|
83
|
+
| `smartstack://api/{endpoint}` | API documentation |
|
|
84
|
+
| `smartstack://schema/{table}` | Database schema |
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT - AtlasHub
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://atlashub.ch/schemas/smartstack-mcp-config.json",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"smartstack": {
|
|
5
|
-
"projectPath": "D:/SmartStack.app/features/Rework-to-package",
|
|
6
|
-
"apiUrl": "https://localhost:7055",
|
|
7
|
-
"apiEnabled": true
|
|
8
|
-
},
|
|
9
|
-
"conventions": {
|
|
10
|
-
"schemas": {
|
|
11
|
-
"platform": "core",
|
|
12
|
-
"extensions": "extensions"
|
|
13
|
-
},
|
|
14
|
-
"tablePrefixes": [
|
|
15
|
-
"auth_",
|
|
16
|
-
"nav_",
|
|
17
|
-
"usr_",
|
|
18
|
-
"ai_",
|
|
19
|
-
"cfg_",
|
|
20
|
-
"wkf_",
|
|
21
|
-
"support_",
|
|
22
|
-
"entra_",
|
|
23
|
-
"ref_",
|
|
24
|
-
"loc_",
|
|
25
|
-
"lic_"
|
|
26
|
-
],
|
|
27
|
-
"migrationFormat": "YYYYMMDD_NNN_{Description}",
|
|
28
|
-
"namespaces": {
|
|
29
|
-
"domain": "SmartStack.Domain",
|
|
30
|
-
"application": "SmartStack.Application",
|
|
31
|
-
"infrastructure": "SmartStack.Infrastructure",
|
|
32
|
-
"api": "SmartStack.Api"
|
|
33
|
-
},
|
|
34
|
-
"servicePattern": {
|
|
35
|
-
"interface": "I{Name}Service",
|
|
36
|
-
"implementation": "{Name}Service"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"efcore": {
|
|
40
|
-
"contexts": [
|
|
41
|
-
{
|
|
42
|
-
"name": "ApplicationDbContext",
|
|
43
|
-
"projectPath": "auto-detect",
|
|
44
|
-
"migrationsFolder": "Migrations"
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"validation": {
|
|
48
|
-
"checkModelSnapshot": true,
|
|
49
|
-
"checkMigrationOrder": true,
|
|
50
|
-
"requireBuildSuccess": true
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"scaffolding": {
|
|
54
|
-
"outputPath": "auto-detect",
|
|
55
|
-
"templates": {
|
|
56
|
-
"service": "templates/service-extension.cs.hbs",
|
|
57
|
-
"entity": "templates/entity-extension.cs.hbs",
|
|
58
|
-
"controller": "templates/controller.cs.hbs",
|
|
59
|
-
"component": "templates/component.tsx.hbs"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://atlashub.ch/schemas/smartstack-mcp-config.json",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"smartstack": {
|
|
5
|
+
"projectPath": "D:/SmartStack.app/features/Rework-to-package",
|
|
6
|
+
"apiUrl": "https://localhost:7055",
|
|
7
|
+
"apiEnabled": true
|
|
8
|
+
},
|
|
9
|
+
"conventions": {
|
|
10
|
+
"schemas": {
|
|
11
|
+
"platform": "core",
|
|
12
|
+
"extensions": "extensions"
|
|
13
|
+
},
|
|
14
|
+
"tablePrefixes": [
|
|
15
|
+
"auth_",
|
|
16
|
+
"nav_",
|
|
17
|
+
"usr_",
|
|
18
|
+
"ai_",
|
|
19
|
+
"cfg_",
|
|
20
|
+
"wkf_",
|
|
21
|
+
"support_",
|
|
22
|
+
"entra_",
|
|
23
|
+
"ref_",
|
|
24
|
+
"loc_",
|
|
25
|
+
"lic_"
|
|
26
|
+
],
|
|
27
|
+
"migrationFormat": "YYYYMMDD_NNN_{Description}",
|
|
28
|
+
"namespaces": {
|
|
29
|
+
"domain": "SmartStack.Domain",
|
|
30
|
+
"application": "SmartStack.Application",
|
|
31
|
+
"infrastructure": "SmartStack.Infrastructure",
|
|
32
|
+
"api": "SmartStack.Api"
|
|
33
|
+
},
|
|
34
|
+
"servicePattern": {
|
|
35
|
+
"interface": "I{Name}Service",
|
|
36
|
+
"implementation": "{Name}Service"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"efcore": {
|
|
40
|
+
"contexts": [
|
|
41
|
+
{
|
|
42
|
+
"name": "ApplicationDbContext",
|
|
43
|
+
"projectPath": "auto-detect",
|
|
44
|
+
"migrationsFolder": "Migrations"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"validation": {
|
|
48
|
+
"checkModelSnapshot": true,
|
|
49
|
+
"checkMigrationOrder": true,
|
|
50
|
+
"requireBuildSuccess": true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"scaffolding": {
|
|
54
|
+
"outputPath": "auto-detect",
|
|
55
|
+
"templates": {
|
|
56
|
+
"service": "templates/service-extension.cs.hbs",
|
|
57
|
+
"entity": "templates/entity-extension.cs.hbs",
|
|
58
|
+
"controller": "templates/controller.cs.hbs",
|
|
59
|
+
"component": "templates/component.tsx.hbs"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|