MCP Server

Connect Cursor, Claude Desktop, or Claude Code to LaraDashboard using the built-in MCP server — enable MCP, generate agent tokens, and manage your site from your local AI agent.

MCP Server

LaraDashboard ships with a native Model Context Protocol (MCP) server. Connect Cursor, Claude Desktop, or Claude Code once, then manage content, CRM, forms, email, and operations from your local AI agent — without opening the admin panel for every task.

Overview

Feature Description
Endpoint /mcp on your LaraDashboard site
Authentication Dedicated MCP agent tokens (not regular login sessions)
Tools 22 core tools + module tools (CRM, DocForge, CustomForm, etc.) — typically 40+ when common modules are enabled
Clients Cursor Desktop, Cursor CLI, Claude Desktop, Claude Code

MCP is disabled by default. The /mcp endpoint returns 404 until you enable it in Settings.

Enable MCP

  1. Sign in to the admin panel as a user with Settings → Edit permission.
  2. Go to Settings → MCP (/admin/settings/mcp).
  3. Turn on Enable MCP server.
  4. Click Save Changes.

Generate an agent token

  1. On the MCP settings page, click Generate MCP token.
  2. Copy the token immediately — it is shown only once.
  3. Store it securely (password manager or local env file).

Regular Sanctum login tokens will not work with MCP. You must use an MCP agent token.

Connect Cursor

Cursor Desktop and Cursor CLI share the same config file.

  1. Open Cursor → Settings → MCP, or edit ~/.cursor/mcp.json directly.
  2. Merge this under mcpServers:
{
  "mcpServers": {
    "laradashboard": {
      "url": "https://your-domain.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_MCP_TOKEN"
      }
    }
  }
}
  1. Restart Cursor or reload MCP servers.

For local development over HTTP, your admin may need to allow insecure MCP connections in Settings → MCP.

Connect Claude Desktop

  1. Open Claude Desktop → Settings → Developer → Edit Config.
  2. Add the same JSON block to claude_desktop_config.json:
OS Config path
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json

Connect Claude Code

Add the LaraDashboard MCP server to your Claude Code MCP configuration using the same URL and Bearer token pattern as Cursor.

Token abilities

MCP tokens are scoped to your user's permissions. If you can publish posts in the admin, your token includes the matching MCP abilities. Common abilities include:

Ability What it allows
mcp:posts.read / mcp:posts.write List, create, and update posts
mcp:media.read / mcp:media.write Browse and upload media library files
mcp:briefing.read Daily briefing across modules
mcp:docs.read Search and read DocForge documentation
mcp:crm.* CRM tools when the CRM module is installed
mcp:ops.cache Clear application caches
mcp:ops.logs.read List and read log files
mcp:modules.read / mcp:modules.activate / mcp:modules.deactivate List and manage modules

Revoke tokens anytime from Settings → MCP.

Core tools (22)

Group Tools
Overview get-daily-briefing
Content list-posts, get-post, create-post, update-post, delete-post, list-terms, assign-post-terms, generate-seo-meta
Media list-media, upload-media, attach-featured-image
Email list-email-templates, get-email-template, send-email
Operations clear-cache, list-logs, get-log-tail, get-site-health
Discovery list-mcp-tools, list-modules, activate-module, deactivate-module

Module tools (when installed): CRM (16), DocForge (4), CustomForm (2). Use list-mcp-tools to see exactly what your token can access.

Recommended agent workflows

Morning standup

What's waiting for me today?

Uses get-daily-briefing to summarize pending content, tickets, and form leads.

Content

  • list-posts / get-post — inspect content
  • create-post / update-post — draft and publish
  • upload-media / attach-featured-image — upload a hero PNG and set it as the featured image
  • generate-seo-meta — SEO metadata

Documentation lookup

When DocForge is installed, ask your agent to search official docs before guessing:

Search the LaraDashboard docs for MCP token setup.

Uses search-docs and get-doc. See DocForge MCP tools.

Security notes

  • MCP agent tokens are separate from web session cookies.
  • Tokens inherit your role permissions — use dedicated admin accounts for agents when possible.
  • Disable MCP on production if you do not use it.
  • Rotate tokens after sharing a machine or offboarding a team member.

Troubleshooting

/mcp returns 404

MCP is disabled. Enable it in Settings → MCP and save.

Authentication / ability errors

Generate a fresh MCP token. Regular API or login tokens are rejected.

Tool not found

The module providing that tool may be disabled. Check Modules in admin.

Next steps

/