@atlashub/smartstack-mcp
v1.2.0
Published
MCP Server for SmartStack/AtlasHub - Conventions validation, migrations analysis, scaffolding
Maintainers
Readme
@smartstack/mcp-server
MCP (Model Context Protocol) server for SmartStack/AtlasHub platform development.
Features
Tools
| Tool | Description |
|------|-------------|
| validate_conventions | Validate AtlasHub conventions (SQL schemas, domain table prefixes, migration naming, service interfaces) |
| check_migrations | Analyze EF Core migrations for conflicts and ordering issues |
| scaffold_extension | Generate code for services, entities, controllers, or React components |
| api_docs | Get API endpoint documentation from Swagger or code analysis |
Resources
| Resource URI | Description |
|--------------|-------------|
| smartstack://conventions | AtlasHub naming conventions and best practices |
| smartstack://project | Current project information and structure |
| smartstack://api/{endpoint} | API endpoint documentation |
| smartstack://schema/{table} | Database schema information |
Installation
# Clone and install dependencies
cd "D:\01 - projets\SmartStack.mcp\02-Develop"
npm install
# Build
npm run buildConfiguration
Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| SMARTSTACK_PROJECT_PATH | Path to SmartStack.app project | D:/SmartStack.app/features/Rework-to-package |
| SMARTSTACK_API_URL | SmartStack API URL | https://localhost:7055 |
| SMARTSTACK_API_ENABLED | Enable API integration | true |
| LOG_LEVEL | Logging level (debug, info, warn, error) | info |
Claude Desktop Configuration
Add to your Claude Desktop config file (claude_desktop_config.json):
{
"mcpServers": {
"smartstack": {
"command": "node",
"args": ["D:/01 - projets/SmartStack.mcp/02-Develop/dist/index.js"],
"env": {
"SMARTSTACK_PROJECT_PATH": "D:/SmartStack.app/features/Rework-to-package",
"SMARTSTACK_API_URL": "https://localhost:7055"
}
}
}
}Claude Code Configuration
Add to your .claude/settings.json:
{
"mcpServers": {
"smartstack": {
"command": "node",
"args": ["D:/01 - projets/SmartStack.mcp/02-Develop/dist/index.js"],
"env": {
"SMARTSTACK_PROJECT_PATH": "D:/SmartStack.app/features/Rework-to-package"
}
}
}
}Usage Examples
Validate Conventions
Use validate_conventions tool with checks: ["tables", "migrations", "services"]Check Migrations
Use check_migrations tool with compareBranch: "develop"Scaffold a Service
Use scaffold_extension tool with:
- type: "service"
- name: "UserProfile"
- options: { methods: ["GetByIdAsync", "UpdateAsync"] }Get API Documentation
Use api_docs tool with:
- endpoint: "/api/users"
- format: "markdown"Development
# Watch mode
npm run dev
# Test with MCP Inspector
npm run inspect
# Type check
npm run typecheck
# Lint
npm run lintProject Structure
src/
├── index.ts # Entry point
├── server.ts # MCP server configuration
├── config.ts # Configuration management
├── tools/ # MCP tool implementations
│ ├── validate-conventions.ts
│ ├── check-migrations.ts
│ ├── scaffold-extension.ts
│ └── api-docs.ts
├── resources/ # MCP resource implementations
│ ├── conventions.ts
│ ├── project-info.ts
│ ├── api-endpoints.ts
│ └── db-schema.ts
├── lib/ # Shared libraries
│ ├── detector.ts # Project detection
│ └── logger.ts # Logging utilities
├── types/ # TypeScript types
│ └── index.ts
└── utils/ # Utility functions
├── fs.ts # File system operations
├── git.ts # Git commands
└── dotnet.ts # .NET CLI commandsAtlasHub Conventions
This MCP server enforces the following conventions:
SQL Schemas
core: SmartStack platform tablesextensions: Client extension tables
Table Prefixes (by domain)
Tables use domain-specific prefixes within schemas:
auth_*- Authorization (Users, Roles, Permissions)nav_*- Navigation (Contexts, Applications, Modules)usr_*- User profiles (Profiles, Preferences)ai_*- AI features (Providers, Models, Prompts)cfg_*- Configuration (Settings)wkf_*- Workflows (EmailTemplates, Workflows)support_*- Support (Tickets, Comments)entra_*- Entra sync (Groups, SyncState)ref_*- References (Companies, Departments)loc_*- Localization (Languages, Translations)lic_*- Licensing (Licenses)
Example: .ToTable("auth_Users", "core")
Migration Naming
Format: YYYYMMDD_NNN_Description
- Example:
20260115_001_InitialSchema
Service Pattern
- Interface:
I{Name}Service - Implementation:
{Name}Service
Namespace Structure
- Domain:
SmartStack.Domain - Application:
SmartStack.Application - Infrastructure:
SmartStack.Infrastructure - API:
SmartStack.Api
License
MIT - AtlasHub
