|
|
3 bulan lalu | |
|---|---|---|
| .. | ||
| src | 3 bulan lalu | |
| .env.example | 3 bulan lalu | |
| Dockerfile | 3 bulan lalu | |
| README.md | 3 bulan lalu | |
| package-lock.json | 3 bulan lalu | |
| package.json | 3 bulan lalu | |
| tsconfig.json | 3 bulan lalu | |
A Model Context Protocol (MCP) server that provides LLMs with programmatic access to the self-hostable SaaS platform. This enables AI assistants to interact with user authentication, organizations, applications, deployments, and storage.
The MCP server provides tools for:
saas_login - Login to the platformsaas_logout - Logout from the platformsaas_get_current_user - Get current user infosaas_register_user - Register new userssaas_list_organizations - List user's organizationssaas_create_organization - Create new organizationsaas_get_organization - Get organization detailssaas_list_applications - List applications in an orgsaas_create_application - Create new applicationsaas_get_application - Get application detailssaas_deploy_application - Deploy an applicationsaas_get_deployments - Get deployment historysaas_health_check - Check platform healthsaas_get_platform_stats - Get platform statisticssaas_list_files - List files in storagesaas_upload_file - Upload filessaas_download_file - Download filessaas_delete_file - Delete filescd mcp-server
npm install -g .
cd mcp-server
npm install
npm run build
npm link
cp .env.example .env
# Edit .env with your SaaS platform URLs
Add to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"saas-platform": {
"command": "mcp-saas-server",
"env": {
"SAAS_API_URL": "http://localhost",
"SAAS_AUTH_URL": "http://localhost/auth",
"SAAS_STORAGE_URL": "http://localhost/storage"
}
}
}
}
Restart Claude Desktop after adding the configuration.
# Login to the platform
saas_login(email="user@example.com", password="password123")
# Get current user info
saas_get_current_user()
# Logout when done
saas_logout()
# List organizations
saas_list_organizations()
# Create new organization
saas_create_organization(
name="My Startup",
slug="my-startup",
description="Building amazing things"
)
# List applications in an organization
saas_list_applications(organizationId="org-uuid")
# Create new application
saas_create_application(
name="My App",
slug="my-app",
organizationId="org-uuid",
description="A TypeScript application",
repositoryUrl="https://github.com/user/repo.git",
buildCommand="npm run build",
startCommand="npm start"
)
# Deploy the application
saas_deploy_application(
applicationId="app-uuid",
version="1.0.0",
commitHash="abc123"
)
# Check deployment status
saas_get_deployments(applicationId="app-uuid")
# Upload a file
saas_upload_file(
path="/uploads/config.json",
content='{"key": "value"}',
contentType="application/json"
)
# List files
saas_list_files(path="/uploads")
# Download a file
saas_download_file(path="/uploads/config.json")
# Check platform health
saas_health_check()
# Get platform statistics
saas_get_platform_stats()
# Install dependencies
npm install
# Build the server
npm run build
# Run in development mode
npm run dev
# Install MCP Inspector globally
npm install -g @modelcontextprotocol/inspector
# Run the inspector with your server
mcp-inspector dist/index.js
src/tools/src/index.tsListToolsRequestSchema handler| Variable | Default | Description |
|---|---|---|
SAAS_API_URL |
http://localhost |
Base URL for API Gateway |
SAAS_AUTH_URL |
http://localhost/auth |
Auth service URL |
SAAS_STORAGE_URL |
http://localhost/storage |
Storage service URL |
DEBUG |
false |
Enable debug logging |
The MCP server provides comprehensive error handling:
All errors include detailed messages to help with debugging.
The MCP server respects rate limits from the underlying platform services. If you encounter rate limiting, wait before retrying operations.
MIT License - see parent project LICENSE file