# BCMS for AI Agents

Connect Cursor, Claude Code, or OpenClaw to BCMS with MCP. Install the bcms and bcms-content skills to create, update, and publish CMS entries without writing integration code.

Install the bcms skill, add BCMS as an MCP server, and manage entries and media in plain English. Works with Cursor, Claude Code, and OpenClaw.

## Skill, MCP, and CLI do different jobs

- **Agent Skill** (knowledge): Teaches your agent BCMS: concepts, content modeling, SDK usage with @thebcms/client, framework integrations, MCP tool usage, and security practices. Installed locally in Cursor, Claude Code, Codex, or OpenClaw. See /agent-skills.
- **MCP** (live tools): The live connection to your CMS. Templates, entries, groups, widgets, media, languages, statuses, entry history, and schema operations as MCP tools, scoped by key permissions. See /mcp.
- **Content CLI** (deterministic ops): Ships with the bcms-content skill. List, create, update, and delete entries and upload media from a terminal, with JSON output and stable exit codes for scripts and CI. See /agent-skills.

## Recommended path

1. Install the bcms skill
2. Create a scoped key in the BCMS dashboard
3. Connect the MCP server in your client
4. Ask the agent to inspect available templates

## Install

- bcms skill (v1.4.0): `npx skills add bcms/ai --skill bcms`
- bcms-content skill (v1.1.0): `npx skills add bcms/ai --skill bcms-content`
- OpenClaw: `openclaw skills install @bcms/bcms`

Supported clients: Cursor, Claude Code, Codex, OpenClaw.

## How it works

1. **Install the skills**: Add bcms for MCP and SDK guidance. Add bcms-content if you want a terminal CLI for scripts and CI.
2. **Connect your client**: Create a scoped key in the dashboard, then paste the MCP config in Cursor or Claude Code, or set BCMS_API_KEY for the content CLI.
3. **Manage content**: Ask your agent to inspect templates, draft posts, upload media, or publish entries. Or run CLI commands that return JSON.

## MCP config

```json
{
  "mcpServers": {
    "bcms": {
      "url": "https://app.thebcms.com/api/v3/mcp?mcpKey=YOUR_MCP_KEY_HERE"
    }
  }
}
```

## Example prompts

### Discovery

Show me all templates and entries I have access to in BCMS. Summarize by template name.

### Create content

Create a new blog post in my Blog template titled "Getting Started with BCMS Agents". Write an introduction paragraph and set it to draft status for English.

### Update content

List all blog posts, find the "Getting Started" post, and expand the introduction with two more paragraphs.

### Delete content

List blog entries, find the draft "Test post" by title, confirm the entry id with me, then delete it.

### Media

Show my media library folder structure, then create a folder called "Blog Images" if it doesn't exist.

### Upload workflow

I need to upload a hero image for a blog post. Get an upload URL, tell me how to upload it, then attach it to the post content.

### Internal links

Get the internal BCMS pointer link for my "About Us" page entry so I can link to it from another post's body.

### Audit

List blog entries that are still in draft status and don't have a featured image in meta.

### Publish

For the draft "Getting Started" post, update it to published status for English once the content looks complete.

## Content CLI examples

- **Create entry**: `node cli/bcms.mjs create-entry blog --data '{"meta":{"title":"Hello","slug":"hello-world"}}'`
- **Update entry**: `node cli/bcms.mjs update-entry ENTRY_ID --template blog --data '{"meta":{"title":"Updated title"}}'`
- **Delete entry**: `node cli/bcms.mjs delete-entry ENTRY_ID --template blog`
- **List entries**: `node cli/bcms.mjs list-entries blog`
- **Upload media**: `node cli/bcms.mjs upload-media ./hero.png --parent MEDIA_DIR_ID`

## Security

- Create separate credentials per person, per client, and per environment.
- Scope keys to the templates the agent needs (least privilege), including media-level permissions.
- Never put MCP keys or BCMS_API_KEY in frontend code, public repos, or shared screenshots.
- Rotate keys regularly and revoke any key immediately if it is exposed.
- Review entry history to audit what an agent changed.
- For destructive operations, list and confirm entry ids first and use scoped delete permissions.

## Machine-readable resources

- This page as Markdown: /agents.md
- MCP reference: /mcp.md
- Agent Skills reference: /agent-skills.md
- Agent onboarding manifest: /llms.txt
- Documentation index: /docs/llms.txt
- Full documentation: /docs/llms-full.txt

## FAQ

### How do I keep MCP keys safe?

Create a dedicated key per person, per client, and per environment with least-privilege template and media scopes. Never put MCP keys or BCMS_API_KEY in frontend code, public repos, or shared screenshots. Rotate keys immediately if they are exposed.

### Do I need a BCMS account?

Yes. You need an active BCMS instance and an MCP key (or API key with the same three-part format) created in the dashboard under Settings - MCP or API keys.

### Cursor vs Claude Code?

Same MCP URL and JSON config. Install bcms (and optionally bcms-content) in either client with npx skills add bcms/ai --skill bcms.

### Skill vs MCP - do I need both?

The bcms skill teaches your agent BCMS patterns, SDK usage, and MCP tool names. MCP provides the live tools. We recommend using both together for agent workflows.

### bcms vs bcms-content - which skill?

bcms covers SDK building, content modeling, framework integrations, and MCP reference. bcms-content is an executable CLI for create/update/delete/list entries and upload media - ideal for terminals, CI, and deterministic agent scripts. Use MCP for in-IDE agent tools; use bcms-content when you want a command that prints JSON.

### Can my agent delete posts?

Yes. MCP exposes delete-entries when your key has delete permission for that template. The bcms-content CLI also supports delete-entry for scripted workflows, and requires confirmation (or an explicit --yes flag).

### Can my agent change my content model?

Yes via MCP schema tools - templates, groups, widgets, statuses, and languages can be created and updated when your key has the right scopes. For day-to-day content work, agents usually operate on entries and media.

### Can I use environment variables in Cursor mcp.json?

Unreliable. Cursor does not consistently expand env vars in MCP server URLs. Paste your key in local, user-level config only.

### Custom BCMS host?

Replace app.thebcms.com in the MCP URL with your organization's dedicated BCMS app URL. For the content CLI, set BCMS_API_ORIGIN to the same host.

### Where is the open-source skill pack?

The canonical bcms and bcms-content skills live in the bcms/ai repository on GitHub, with bundled reference docs and the content CLI runtime.

### Where can I get support?

Email support [at] thebcms.com or join the BCMS Discord community for help with MCP setup.
