Backend Architect MCP Server
Supports the architecting and development of FastAPI applications, including scaffolding project structures, planning API routes, and generating endpoint code.
Facilitates building backends using Supabase for the database layer, specifically through planning and generating SQLModel schemas and relationships.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Backend Architect MCP Server initialize a new FastAPI project and tell me what to build next"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Backend Architect MCP Server
An expert MCP toolchain designed to act as a Backend Architect for AI agents. This server enforces a strict "Atomic Development" workflow for building Python FastAPI + Supabase backends.
🚀 Overview
The Backend Architect server guides an agent through a Plan -> Prompt -> Write loop, ensuring that database models, API routes, and tests are built in the correct dependency order.
Key Features
Atomic Development: Focuses on one component at a time.
Workflow Enforcement: Models → Routes → Tests (respects model dependencies).
Auto-Imports: Automatically updates
__init__.pyfiles for models and routes.State Persistence: Maintains
.mcp_state.jsonto track building progress.Contextual Prompts: Generates specialized system prompts for each component.
Related MCP server: mcp-chain-of-thought
🛠️ Tech Stack
Python 3.12
MCP SDK (FastMCP)
UV (Dependency Manager)
Pydantic (State Validation)
📦 Installation
Ensure you have uv installed. Then, clone the repository and install dependencies:
# Clone the repository
cd mcp_fastapi
# Install dependencies and run the server
uv run server.py🛠️ Tools Reference
1. Initialization
initialize_project(root_path: str = "."): Scaffolds the FastAPI project structure andpyproject.toml. Defaults to the current working directory.
2. Planning
save_roles_plan(roles: list): Define user roles and permissions.save_database_plan(models: list): Define SQLModel schemas and relationships.save_route_plan(routes: list): Define API endpoints and methods.save_test_plan(tests: list): Define simulation scenarios.
3. Execution
get_next_pending_task(): The "Traffic Cop" that tells you exactly what to build next.get_file_instruction(task_type: str, task_name: str): Returns a strict system prompt for the AI to follow.write_component_file(type: str, name: str, content: str): Writes the code and marks the task as "done".
🔄 The Loop
Initialize: Set up your project root.
Plan: Feed the architect your schemas and endpoints.
Draft: Ask
get_next_pending_task()for the current objective.Learn: Get instructions via
get_file_instruction().Write: Submit code via
write_component_file().Repeat: Until the entire backend is architected.
⚙️ MCP Configuration
Add this to your MCP settings file (e.g., mcp_config.json or your IDE's MCP settings):
{
"mcpServers": {
"backend-architect": {
"command": "uv",
"args": [
"run",
"--project",
"/path/to/server/directory",
"python",
"server.py"
]
}
}
}Use the absolute path to the directory where you cloned this repository for the--project argument. This ensures the server can find its dependencies regardless of where your AI agent is currently working.
Built with ❤️ for the AI-First Developer.
Available Tools
9 toolsget_file_instructionC
Returns a strict SYSTEM PROMPT for the agent to write the code.
Inputs: task_type (required), task_name (required). Returns: result
get_next_pending_taskA
Returns the first unbuilt item. Priority: Models -> Routes -> Tests.
Inputs: no named parameters. Returns: result
initialize_projectB
Creates the folder structure and pyproject.toml configured for uv. Defaults to current directory.
Inputs: root_path. Returns: result
save_database_planC
Saves table schemas (fields, types, relationships) to state.
Inputs: models (required). Returns: result
save_organization_contextC
Saves the organizational context and complex operation requirements to state.
Inputs: context (required). Returns: result
save_roles_planC
Saves user roles/permissions to state. Each role should have 'name', 'description', and 'permissions'.
Inputs: roles (required). Returns: result
save_route_planB
Saves API endpoints (method, path, summary) to state.
Inputs: routes (required). Returns: result
save_test_planC
Saves simulation scenarios to state.
Inputs: tests (required). Returns: result
write_component_fileC
Writes the file and marks the task as done.
Inputs: type (required), name (required), content (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose with no overlap: get_file_instruction provides a prompt, get_next_pending_task fetches tasks, initialize_project sets up structure, save_* tools store different planning aspects, and write_component_file writes files. The descriptions clearly differentiate their functions, preventing agent misselection.
The naming follows a consistent verb_noun pattern with minor deviations: most tools use verb_noun (e.g., save_database_plan, initialize_project), but get_file_instruction and get_next_pending_task use verb_adjective_noun, and write_component_file uses verb_noun_noun. This slight inconsistency is readable but not perfectly uniform.
With 9 tools, the count is well-scoped for backend project management, covering initialization, planning, task management, and file writing. Each tool earns its place by addressing specific aspects of the workflow, avoiding bloat or thin coverage.
The tool set covers core backend development workflows: project setup, planning (database, roles, routes, tests, context), task management, and file writing. Minor gaps exist, such as no tools for updating or deleting plans, but agents can work around this by re-saving or using existing tools effectively.
Maintenance
Related MCP Connectors
AI-native programming language and toolchain for accountable, verifiable agent-driven development.
Backend platform for AI agents: one agentstack.execute tool runs batched steps over +700 actions (hosting, storage, auth, payments, CRM, app builder).
Design, build and run teams of AI agents with checked handoffs between them.
Supabase-compatible Postgres for agents: projects, branches, SQL, auth, storage, email.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP Shrimp Task Manager is a task tool built for AI Agents, emphasizing chain-of-thought, reflection, and style consistency. It converts natural language into structured dev tasks with dependency tracking and iterative refinement, enabling agent-like developer behavior in reasoning AI systems.15405 npm2,150TypeScriptMIT
- AlicenseBqualityDmaintenanceShrimp Task Manager is a task tool built for AI Agents, emphasizing chain-of-thought, reflection, and style consistency. It converts natural language into structured dev tasks with dependency tracking and iterative refinement, enabling agent-like developer behavior in reasoning AI systems.15199 npm21MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to access and manage Supabase projects through the Model Context Protocol, supporting database operations, edge functions, storage, and documentation search. It provides a complete toolset for SQL execution, migration management, and real-time project debugging.-
- FlicenseAqualityCmaintenanceEnables AI agents to scaffold production-ready FastAPI applications from YAML architecture specifications, generating modular project structures with routers, models, and tests.1-