DeploymentConnect External MCP Clients To Your Application
Deployment

MCP Management in Mindbricks

Comprehensive guide to MCP (Model Context Protocol) in Mindbricks: how generated projects expose MCP tools, the MCP-BFF aggregation layer, and how to use the Mindbricks Genesis MCP server to design and manage projects with AI agents.

Overview

Mindbricks provides MCP integration at two levels:

  1. Generated Project MCP — Every generated microservice exposes its Business APIs as MCP tools, aggregated through the MCP-BFF service
  2. Mindbricks Genesis MCP — The Mindbricks SaaS platform itself exposes an MCP server for AI-driven project design, configuration, and frontend development

Part 1: MCP in Generated Projects

What Generated Projects Provide

When you build and deploy a Mindbricks project, each service automatically exposes its Business APIs as MCP tools. This means every CRUD operation, custom query, workflow action, or integration endpoint you define in your project configuration becomes available as a structured MCP tool — no additional coding required.

Each generated service runs an MCP endpoint at:

{serviceUrl}/mcp

The tools include:

  • Data CRUD operations — Create, read, update, delete, and list records
  • Custom Business APIs — Any API you define in your business logic (filtered queries, aggregations, batch operations)
  • File operations — Upload, download, and manage attachments (if S3 is configured)
  • Payment flows — Payment intents, subscription management (if Stripe is configured)
  • Auth operations — User management, API key management, permission assignments

Controlling MCP Tool Visibility

By default, all Business APIs are exposed as MCP tools. You can exclude specific APIs from MCP exposure by setting blockMcp: true on a Business API. This is useful for internal APIs that should only be accessed via REST.

The MCP-BFF Aggregation Layer

External AI agents don't connect to individual services. Instead, the MCP-BFF (Backend-for-Frontend) service aggregates tools from all services into a single unified MCP endpoint.

Two transports are supported:

TransportEndpointRecommendation
StreamableHTTP (primary){appUrl}/mcpbff-api/mcpPreferred for modern MCP clients (Cursor, Claude Desktop)
SSE (legacy fallback){appUrl}/mcpbff-api/mcp/sseFor older MCP clients that don't support StreamableHTTP

Where {appUrl} follows the standard Mindbricks URL pattern:

  • Preview: https://{codename}.prw.mindbricks.com
  • Staging: https://{codename}-stage.mindbricks.co
  • Production: https://{codename}.mindbricks.co

The MCP-BFF:

  • Discovers tools from all registered services
  • Presents a unified tool catalog to connecting clients
  • Routes tool calls to the correct service
  • Propagates authentication context (JWT or API key sessions)
  • Supports tenant-aware routing in multi-tenant projects

When MCP Is Useful in Generated Projects

MCP integration makes generated projects immediately consumable by AI agents. Common use cases include:

  • AI-powered frontends — Tools like Lovable, Bolt, or Cursor can use MCP tools to interact with your backend while building the frontend
  • Automated workflows — AI agents can execute multi-step business operations by composing MCP tool calls
  • Data exploration — AI agents can query, filter, and aggregate your application data through natural language
  • Admin dashboards — AI chat interfaces can provide admin users with natural language access to management operations
  • Integration scripts — Automated pipelines can use MCP tools to read or write data across services

Frontend Prompts

Each generated project produces frontend prompt documents — detailed markdown guides that describe how to build the frontend for each part of the application. These prompts are served through the MCP-BFF's documentation endpoints:

  • GET /api/docs/prompts — Lists all available prompts with metadata
  • GET /api/docs/prompts/:promptName — Returns a specific prompt as markdown

Prompts cover:

  • Authentication pages (login, register, forgot password)
  • Profile management (user settings, avatar, API key management)
  • User administration (user list, role assignment)
  • Verification flows (email, mobile, 2FA)
  • Service-specific CRUD pages (one per business service)
  • Payment flows (if configured)

Authentication for MCP Clients

MCP clients must authenticate when connecting. Two methods are supported:

  1. JWT Token — Pass a valid JWT in the Authorization: Bearer {token} header
  2. API Key (recommended for AI agents) — Pass an API key in the Authorization: Bearer sk_mbx_... header

API keys are preferred for AI agents because they don't expire like JWT access tokens. The system detects API keys by their sk_mbx_ prefix and validates them through Redis cache or the auth service.


Part 2: Mindbricks SaaS MCP for Project Design

What Is the Genesis MCP Server

The Mindbricks Genesis MCP Server is a dedicated MCP endpoint exposed by the Mindbricks platform itself. It allows AI agents, external tools, and automation workflows to:

  • Read and modify project configurations
  • Access the Mindbricks Pattern Ontology documentation
  • Generate frontend prompts for any project
  • Create, update, or delete entire projects

This is the same engine that powers the Ada assistant in the Mindbricks dashboard, now accessible to any MCP-compatible client.

Genesis MCP Server URL

Two transports are supported:

TransportEndpointRecommendation
StreamableHTTP (primary)https://app.mindbricks.com/api/genesis/mcpPreferred for modern MCP clients (Cursor, Claude Desktop)
SSE (legacy fallback)https://app.mindbricks.com/api/genesis/mcp/sseFor older MCP clients that don't support StreamableHTTP

Authentication Required: You must use an API Key for authentication. Pass it as a bearer token:

Authorization: Bearer sk_mbx_your_api_key_here

OpenAuth (OAuth) is not supported yet. Only API key authentication is currently available for the Genesis MCP server.

How to Create an API Key

  1. Log into the Mindbricks dashboard at https://app.mindbricks.com
  2. Navigate to your Profile page
  3. Open the API Keys section
  4. Create a new secret API key with a descriptive name (e.g., "Cursor MCP", "Lovable Agent")
  5. Copy the key immediately — it is shown only once

Available Tools

The Genesis MCP server exposes the following tool categories:

Schema Tools

ToolDescription
getTypeSchemaGet the JSON Schema for any Mindbricks pattern type (Service, DataObject, BusinessApi, etc.)
listTypeNamesList all available pattern type names

Project Data Tools

ToolDescription
readPathRead project configuration at a specific path (e.g., /services/customer/dataObjects/order)
writePathUpdate project configuration at a specific path
deletePathDelete a configuration item (property, data object, business API, service)
listPathList children at a path level
getFullProjectGet the complete project JSON
saveFullProjectSave a complete project JSON
getProjectOverviewGet a lightweight summary of the project structure

Documentation Tools

ToolDescription
getOntologyDocsGet the full Mindbricks Pattern Ontology documentation
getOntologyIndexGet the ontology table of contents

Frontend Prompt Tools

ToolDescription
listFrontendPromptsList all frontend prompt documents for a project
getFrontendPromptGet a specific frontend prompt rendered as markdown

MCP Prompts (Native)

In addition to tools, the Genesis MCP server exposes native MCP prompts — a first-class MCP primitive that injects content directly into the AI conversation context. In compatible clients (Claude Desktop, Cursor), these appear as selectable items:

PromptDescription
frontendPromptSelect a frontend development guide by project and index. The full rendered guide is injected into the conversation.
projectOverviewLoad the complete project structure as context — services, data objects, APIs, and configuration.

Native MCP prompts are the preferred way to load frontend guides interactively, while the tool versions (listFrontendPrompts, getFrontendPrompt) are better for programmatic or automated workflows.

Use Cases

1. Build Frontend with AI Agents

AI coding agents (Lovable, Bolt, Cursor) can use the Genesis MCP to understand your backend and build a matching frontend:

  1. Connect the AI agent to the Genesis MCP server
  2. The agent calls getProjectOverview to understand the project structure
  3. The agent calls listFrontendPrompts and getFrontendPrompt to get detailed UI requirements and API documentation
  4. The agent uses the prompts to generate frontend pages with correct API integration

Frontend prompts include complete REST API documentation (endpoints, request/response schemas, authentication headers) so the AI agent can produce working frontend code immediately.

2. Update Backend Design from Frontend Needs

When building a frontend, you often discover that the backend needs adjustments — new fields, new APIs, or different query patterns. With the Genesis MCP:

  1. The AI agent identifies that a new field or API is needed
  2. It calls readPath to see the current configuration
  3. It calls getOntologyDocs to understand the pattern structure
  4. It calls writePath to add the new field, API, or configuration
  5. The project is automatically versioned and ready for regeneration

This creates a feedback loop where frontend development drives backend evolution, all through AI agents.

3. Full Project Design with Natural Language

You can describe your project requirements to an AI agent connected to the Genesis MCP, and it can create or modify the entire project configuration:

  • "Add a comments data object to the blog service with userId, content, and createdAt fields"
  • "Create a new analytics service with pageView tracking and daily aggregation APIs"
  • "Enable API key authentication and add rate limiting to the public APIs"

Connecting External Tools

Cursor

Add the following to your Cursor MCP settings (.cursor/mcp.json):

{
  "mcpServers": {
    "mindbricks": {
      "url": "https://app.mindbricks.com/api/genesis/mcp",
      "headers": {
        "Authorization": "Bearer sk_mbx_your_api_key_here"
      }
    }
  }
}

Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "mindbricks": {
      "url": "https://app.mindbricks.com/api/genesis/mcp",
      "headers": {
        "Authorization": "Bearer sk_mbx_your_api_key_here"
      }
    }
  }
}

If your Claude Desktop version does not support StreamableHTTP, use the SSE fallback:

{
  "mcpServers": {
    "mindbricks": {
      "transport": "sse",
      "url": "https://app.mindbricks.com/api/genesis/mcp/sse",
      "headers": {
        "Authorization": "Bearer sk_mbx_your_api_key_here"
      }
    }
  }
}

Other MCP Clients

Any MCP-compatible client can connect using either transport:

  • StreamableHTTP (preferred): POST https://app.mindbricks.com/api/genesis/mcp
  • SSE (legacy fallback): GET https://app.mindbricks.com/api/genesis/mcp/sse
  • Authentication: Authorization: Bearer sk_mbx_... header

Was this page helpful?
Built with Documentation.AI

Last updated today