OptimoCMSDocs
MCP

Setup in Cursor

Configure OptimoCMS MCP in Cursor IDE — from API key to first tool call in 2 minutes.

Setup in Cursor

Connect OptimoCMS to Cursor so you can manage sites, create pages, and generate content directly from the AI chat.

Prerequisites

  • Cursor v1.0+ installed
  • An OptimoCMS API key with at least read permission (create one here)

Step 1 — Add MCP configuration

Open (or create) the file .cursor/mcp.json in your project root and add the optimocms block:

{
  "mcpServers": {
    "optimocms": {
      "type": "streamable-http",
      "url": "https://europe-west4-cms-sg.cloudfunctions.net/mcpServer",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Replace YOUR_API_KEY with your actual API key.

Don't want to store the key in the file? Use an environment variable:

{
  "mcpServers": {
    "optimocms": {
      "type": "streamable-http",
      "url": "https://europe-west4-cms-sg.cloudfunctions.net/mcpServer",
      "headers": {
        "Authorization": "Bearer ${OPTIMOCMS_API_KEY}"
      }
    }
  }
}

Set OPTIMOCMS_API_KEY as a system variable or in a .env file.

Step 2 — Restart Cursor

After saving mcp.json, restart Cursor (or open the Command Palette → Developer: Reload Window). You'll see optimocms in the MCP servers list.

Step 3 — Test the connection

Open the Cursor AI chat and type:

Use the list_sites tool to show all my sites.

You'll get a JSON response with all your sites:

{
  "sites": [
    {
      "id": "site_abc123",
      "name": "My Restaurant",
      "domain": "myrestaurant.com",
      "status": "active",
      "language": "en"
    }
  ],
  "total": 1
}

Step 4 — Your first action

Try creating a page:

Create a new "About Us" page on site site_abc123 with a hero section and a team section.

Cursor automatically uses create_page with the right parameters.

Common issues

ProblemSolution
"MCP server not found"Ensure .cursor/mcp.json is in the project root and restart Cursor
"401 Unauthorized"Check your API key — is it active and not expired?
"403 Forbidden"Your API key is missing the required permission (e.g. write for creating pages)
Tool responds slowlyFirst call may take 2-3s (cold start). Subsequent calls are sub-second.

Next steps

On this page