Codapult
TarifsPluginsDocs
Codapult

Le boilerplate SaaS pour les créateurs

Produit

  • Tarifs
  • Plugins
  • Documentation

Entreprise

  • Contact
  • GitHub

Mentions légales

  • Politique de confidentialité
  • Conditions d'utilisation

© 2026 Codapult. Tous droits réservés.

Tous les articles

Getting Started

  • Introduction
  • Quick Start
  • Project Structure

Configuration

  • Environment Variables
  • App Configuration

Authentication

  • Authentication
  • OAuth Providers
  • Two-Factor & Passwordless
  • Enterprise SSO (SAML)

Database

  • Database
  • Migrations

Teams

  • Teams & Organizations
  • Permissions & RBAC

Payments

  • Payments & Billing
  • Stripe Setup
  • LemonSqueezy Setup
  • Polar Setup
  • Payment Webhooks

Api

  • API Layer
  • tRPC
  • GraphQL

Ai

  • AI Features

Email

  • Email
  • Email Templates

Infrastructure

  • Infrastructure
  • File Storage
  • Background Jobs

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Security

  • Security

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture

Plugins

  • Plugin System
  • AI Kit Plugin
  • CRM Plugin
  • Helpdesk Plugin
  • Email Marketing Plugin

Deployment

  • Deployment
  • Troubleshooting

Upgrading

  • Upgrading Codapult

Developer Tools

  • MCP Server
  • Testing
Developer Tools

MCP Server

Give AI coding assistants deep access to your Codapult project via Model Context Protocol.

What Is MCP

The Model Context Protocol (MCP) server ships as part of @codapult/cli. It gives AI coding assistants — Cursor, Claude Desktop, Windsurf, Codex, and others — structured access to your project's schema, environment, plugins, deployment status, and more without copy-pasting context.

The server exposes 19 tools, 6 resources, and 2 prompt templates over a JSON-RPC stdio transport.

Setup

Prerequisites

Make sure the CLI is built before configuring your editor:

cd ../codapult-cli && pnpm install && npx tsc

Cursor

A .cursor/mcp.json is already included in the project root:

{
  "mcpServers": {
    "codapult": {
      "command": "node",
      "args": ["../codapult-cli/dist/index.js", "mcp-server"],
      "cwd": "."
    }
  }
}

Open Settings → MCP and verify the codapult server is listed and active.

Claude Desktop

Add the following to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "codapult": {
      "command": "node",
      "args": ["/absolute/path/to/codapult-cli/dist/index.js", "mcp-server"]
    }
  }
}

Other Editors

Any MCP-compatible editor can connect. Point it to the stdio transport:

node /path/to/codapult-cli/dist/index.js mcp-server

Available Tools

The MCP server provides 19 tools organized into 6 categories.

Project Introspection

ToolDescription
codapult_project_statusAdapters, plugins, features, git status
codapult_project_configRead src/config/app.ts
codapult_run_checksRun lint, typecheck, and/or tests
codapult_doctorHealth check: files, TypeScript, env

Database

ToolDescription
codapult_db_get_tablesList all tables with column counts
codapult_db_get_table_infoColumns, types, constraints for a table
codapult_db_statusProvider, table count, migrations

Environment

ToolDescription
codapult_env_schemaAll vars from .env.example with descriptions
codapult_env_readCurrent .env.local values + validation
codapult_env_updateSet a single env variable

Plugins

ToolDescription
codapult_plugins_listList installed plugins
codapult_plugins_addInstall a plugin (patches schema, config, etc.)
codapult_plugins_removeUninstall a plugin
codapult_plugins_migrateUpdate plugin schema and prepare DB migration

Code Generation

ToolDescription
codapult_generate_pageDashboard page (server component, auth, Card UI)
codapult_generate_apiAPI route (auth + rate limit + Zod)
codapult_generate_actionServer action (auth + Zod)
codapult_generate_pluginFull plugin scaffold

Deployment

ToolDescription
codapult_deploy_statusDockerfile, Helm, Terraform, Pulumi readiness

Resources

Resources are read-only data that AI assistants can automatically load as context:

ResourceURIDescription
codapult_schemacodapult://schemaFull Drizzle ORM schema (all tables)
codapult_app_configcodapult://config/appApp config (brand, features, AI, auth)
codapult_agents_mdcodapult://agentsAGENTS.md (project conventions)
codapult_env_examplecodapult://env-example.env.example (all env vars with docs)
codapult_validationcodapult://validationAll Zod validation schemas
codapult_navigationcodapult://config/navigationDashboard and admin sidebar items

Resources are automatically available in clients that support MCP resources (e.g. Claude Desktop).

Prompt Templates

The MCP server provides context-aware prompt templates that auto-inject your current project schema and configuration:

TemplatePurpose
codapult_code_reviewReview code against Codapult conventions (API pattern, TypeScript, adapters)
codapult_schema_designDesign a Drizzle ORM table following Codapult conventions

Usage Examples

Once connected, your AI assistant automatically has access to all tools. Try asking:

  • "What adapters is the project using?"
  • "List all database tables"
  • "Add the ai-kit plugin"
  • "Generate a new dashboard page called analytics"
  • "Check deployment readiness"
  • "What environment variables am I missing?"
  • "Run the linter and fix any errors"

The AI assistant calls the appropriate MCP tool and gets structured data back — no manual context needed.

Architecture

┌─────────────┐    JSON-RPC / stdio    ┌──────────────────┐
│  AI Editor   │ ◀────────────────────▶ │  Codapult MCP    │
│  (Cursor,    │                        │  Server           │
│   Claude)    │                        │  (@codapult/cli)  │
└─────────────┘                        └──────────────────┘
                                                │
                                                ▼
                                       ┌──────────────────┐
                                       │  Codapult         │
                                       │  Project Files    │
                                       │  (schema, env,    │
                                       │   config, etc.)   │
                                       └──────────────────┘

The MCP server reads project files directly and executes CLI commands. No database connection or API keys are needed for basic operation.

Troubleshooting

Server not showing up

  1. Verify the CLI is built: ls ../codapult-cli/dist/index.js
  2. Test manually:
    echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1.0"}}}' | node ../codapult-cli/dist/index.js mcp-server
    
  3. Check that .cursor/mcp.json paths are correct

Tools not working

The MCP server must be run from the Codapult project directory (or a child directory). It traverses up to find package.json with name: "codapult".

After updating @codapult/cli

Rebuild the CLI so the MCP server picks up changes:

cd ../codapult-cli && npx tsc
Upgrading CodapultTesting