Unified MCP Server for RationalBloks - Backend API + Thin Frontend Layer for AI agents
Project description
RationalBloks MCP Server
The AI-First Backend Platform - Deploy production APIs in minutes, let AI agents build your frontend.
๐ What's New in v0.5.0
THIN FRONTEND MCP - The frontend MCP is now a thin layer that provides guardrails, not generation. The AI agent writes all views, forms, and custom UI.
Philosophy Change:
- Backend MCP (18 tools): Deterministic, reliable infrastructure operations
- Frontend MCP (6 tools): Bootstrap only - clone, types, API glue, config
- AI Agent: Creative work - writes custom views (kanban, calendar, cards - not boring tables!)
THE ONE WAY Architecture:
@rationalbloks/frontblok-auth: Authentication and token management@rationalbloks/frontblok-crud: Generic CRUD viagetApi()datablokApi.ts: The glue file that wires them together
Installation
# Using pip
pip install rationalbloks-mcp
# Using uv (recommended)
uv pip install rationalbloks-mcp
# Using pipx (isolated environment)
pipx install rationalbloks-mcp
Quick Start
1. Get Your API Key
- Visit rationalbloks.com/settings
- Create an API Key
- Copy the key (format:
rb_sk_...)
2. Configure Your AI Agent
VS Code / Cursor
Add to settings.json:
{
"mcp.servers": {
"rationalbloks": {
"command": "rationalbloks-mcp",
"env": {
"RATIONALBLOKS_API_KEY": "rb_sk_your_key_here"
}
}
}
}
Reload window: Ctrl+Shift+P โ "Developer: Reload Window"
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"rationalbloks": {
"command": "rationalbloks-mcp",
"env": {
"RATIONALBLOKS_API_KEY": "rb_sk_your_key_here"
}
}
}
}
Config location:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Modes
| Mode | Tools | Use Case |
|---|---|---|
| full (default) | 24 | Complete fullstack development |
| backend | 18 | API/database operations only |
| frontend | 6 | Frontend bootstrap only |
# Full mode (default)
rationalbloks-mcp
# Backend only
RATIONALBLOKS_MODE=backend rationalbloks-mcp
# Frontend only
RATIONALBLOKS_MODE=frontend rationalbloks-mcp
Backend MCP (18 Tools)
The backend MCP provides deterministic, reliable infrastructure operations.
Read Operations (11 tools)
| Tool | Description |
|---|---|
list_projects |
List all your projects |
get_project |
Get project details |
get_schema |
Get current JSON schema |
get_user_info |
Get authenticated user info |
get_job_status |
Check deployment job status |
get_project_info |
Detailed project info with K8s status |
get_version_history |
Git commit history |
get_template_schemas |
โญ Pre-built schema templates |
get_subscription_status |
Plan and usage limits |
get_project_usage |
CPU/memory metrics |
get_schema_at_version |
Schema at specific commit |
Write Operations (7 tools)
| Tool | Description |
|---|---|
create_project |
Create new project from schema |
update_schema |
Update project schema |
deploy_staging |
Deploy to staging environment |
deploy_production |
Deploy to production |
delete_project |
Delete project permanently |
rollback_project |
Rollback to previous version |
rename_project |
Rename project |
Schema Format (CRITICAL)
// โ
CORRECT - FLAT format
{
"tasks": {
"title": {"type": "string", "max_length": 200, "required": true},
"status": {"type": "string", "max_length": 50, "enum": ["pending", "done"]}
}
}
// โ WRONG - nested 'fields' key
{
"tasks": {
"fields": {
"title": {"type": "string"}
}
}
}
Field Types
| Type | Required Properties |
|---|---|
string |
max_length (e.g., 255) |
text |
None |
integer |
None |
decimal |
precision, scale |
boolean |
None |
uuid |
None |
date |
None |
datetime |
None |
json |
None |
Auto-Generated Fields
Don't define these - they're automatic:
id(UUID primary key)created_at(datetime)updated_at(datetime)
User Authentication
NEVER create users/customers/employees tables with email/password. Use the built-in app_users table:
{
"employee_profiles": {
"user_id": {"type": "uuid", "foreign_key": "app_users.id", "required": true},
"department": {"type": "string", "max_length": 100}
}
}
Frontend MCP (6 Tools)
The frontend MCP is a THIN LAYER that provides guardrails, not generation. The AI agent writes all views, forms, and custom UI.
๐ TEACH Tools (2)
| Tool | Description |
|---|---|
get_frontend_guidelines |
THE ONE WAY architecture documentation |
get_template_structure |
Explore rationalbloksfront template files |
๐ง BOOTSTRAP Tools (4)
| Tool | Description |
|---|---|
clone_template |
Clone rationalbloksfront from GitHub |
generate_types |
Generate TypeScript interfaces from schema |
generate_api_service |
Generate datablokApi.ts (THE ONE WAY glue) |
configure_api_url |
Set VITE_DATABASE_API_URL in .env |
The Philosophy
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP (THIN LAYER) โ
โ โ
โ ๐ TEACH: get_frontend_guidelines, get_template_structure โ
โ ๐ง BOOTSTRAP: clone_template, generate_types, โ
โ generate_api_service, configure_api_url โ
โ โ
โ That's it. The MCP provides guardrails, not generation. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI AGENT (Creative Work) โ
โ โ
โ โจ Write custom views (kanban, calendar, cards, maps) โ
โ โจ Design forms with appropriate inputs โ
โ โจ Create meaningful dashboards โ
โ โจ Set up routes and navbar โ
โ โจ Make it beautiful and domain-specific โ
โ โ
โ Following THE ONE WAY: all imports from datablokApi.ts โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
THE ONE WAY Architecture
All frontend code follows this pattern:
datablokApi.ts (Generated by MCP)
import { createAuthApi, createAuthProvider, useAuth } from '@rationalbloks/frontblok-auth';
import { initApi, getApi } from '@rationalbloks/frontblok-crud';
const API_URL = import.meta.env.VITE_DATABASE_API_URL;
export const authApi = createAuthApi(API_URL);
initApi(authApi);
export const ENTITIES = {
TASKS: 'tasks',
PROJECTS: 'projects',
} as const;
export const ClientAuthProvider = createAuthProvider(authApi);
export const useClientAuth = useAuth;
export { getApi };
Usage in Components (Written by AI)
import { getApi, ENTITIES, useClientAuth } from '../services/datablokApi';
import type { Task } from '../types/generated';
// CRUD operations
const tasks = await getApi().getAll<Task>(ENTITIES.TASKS);
const task = await getApi().getOne<Task>(ENTITIES.TASKS, id);
await getApi().create<Task>(ENTITIES.TASKS, { title: 'New Task' });
await getApi().update<Task>(ENTITIES.TASKS, id, { title: 'Updated' });
await getApi().remove(ENTITIES.TASKS, id);
// Authentication
const { user, isAuthenticated, login, logout } = useClientAuth();
Recommended Workflow
Step 1: Create Backend
"Create a task management API with tasks, projects, and comments"
The AI agent will:
- Design the schema following the rules
- Use
create_projectto deploy the backend - Wait for deployment with
get_job_status
Step 2: Bootstrap Frontend
"Clone the template and set up the frontend for my task manager"
The AI agent will:
- Read
get_frontend_guidelinesto understand THE ONE WAY - Use
clone_templateto get fresh project - Use
generate_typesto create TypeScript interfaces - Use
generate_api_serviceto createdatablokApi.ts - Use
configure_api_urlto set the backend URL
Step 3: AI Writes Custom Views
"Create a kanban board view for tasks with drag-and-drop between status columns"
The AI agent will:
- Write
TasksView.tsxwith kanban UI - Use
getApi().getAll()andgetApi().update()for data - Import types from
../types/generated - Follow the patterns from
get_frontend_guidelines
Environment Variables
| Variable | Description | Default |
|---|---|---|
RATIONALBLOKS_API_KEY |
Your API key (required) | - |
RATIONALBLOKS_MODE |
Mode: full, backend, frontend | full |
RATIONALBLOKS_BASE_URL |
API Gateway URL | https://businessblok.rationalbloks.com |
RATIONALBLOKS_TIMEOUT |
Request timeout (seconds) | 30 |
RATIONALBLOKS_LOG_LEVEL |
Log level | INFO |
NPM Packages
The generated frontend uses these npm packages:
| Package | Purpose |
|---|---|
@rationalbloks/frontblok-auth |
Authentication, tokens, user context |
@rationalbloks/frontblok-crud |
Generic CRUD via getApi() |
Install in your project:
npm install @rationalbloks/frontblok-auth @rationalbloks/frontblok-crud
Support
- Documentation: rationalbloks.com/docs
- Issues: github.com/rationalbloks/rationalbloks-mcp/issues
- Email: support@rationalbloks.com
License
Proprietary - Copyright 2026 RationalBloks. All Rights Reserved.
See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rationalbloks_mcp-0.5.0.tar.gz.
File metadata
- Download URL: rationalbloks_mcp-0.5.0.tar.gz
- Upload date:
- Size: 34.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88ee92f6b9e4f88e42865d2bed32d2554c0fd8ea4f33b98281bea09938e80028
|
|
| MD5 |
f1e987c36ab1522d402d667d3cda7b4f
|
|
| BLAKE2b-256 |
5eceda8b327c4cce64ab9e2be1f2c5873d9a557d0c83ce2e6f15e9c2c027a467
|
File details
Details for the file rationalbloks_mcp-0.5.0-py3-none-any.whl.
File metadata
- Download URL: rationalbloks_mcp-0.5.0-py3-none-any.whl
- Upload date:
- Size: 42.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
968d05213e5cdac17b797083269a2a98319f5f24f8dbfa0f738f160d41a8513e
|
|
| MD5 |
2007b9418a90a553e81a299241538cf1
|
|
| BLAKE2b-256 |
da92229750ce23bf8434e6a6bff04ae82aff3d8aedae5db80768163ddf6e8def
|