Skip to content

AI programs

github-actions[bot] edited this page Dec 4, 2026 · 8 revisions

AI programs

OwnCMS has an endpoint for AI programs at /api/mcp (Model Context Protocol). A program acts with the rights of the person whose access token it uses: an administrator's token can do what the administrator can, an editor's what the editor can. A token with access "read" can only look. Every change is recorded as " via token ".

Make an access token

In the administration, open Access tokens and add one. Name it after the program that uses it, choose whether it may change things, and when it should stop working. The token is shown once; copy it into the program. Tokens can only be made and removed by a person signed in with their password, never by a program with a token.

Connect

Program How
Claude Code claude mcp add --transport http owncms https://cms.example.com/api/mcp --header "Authorization: Bearer ocm_…"
Others an MCP server over HTTP at https://cms.example.com/api/mcp with the header Authorization: Bearer ocm_…

Tools

Tool Does
whoami shows who the program acts as, their role and whether the token only reads
list_activity shows what was changed, by whom and when (administrators of all sites)
list_sites, describe_site the sites the person works on, with their languages
create_site, update_site, delete_site add, change and delete sites, as the person may (deleting repeats the site's name)

| list_content_types, describe_content_type | the content types of a site; describe_content_type also gives the JSON Schema of an entry's values | | create_content_type, update_content_type, delete_content_type | define content types and their fields (administrators; see Content types) |

| list_entries, get_entry | the entries of a content type, and one with its draft and published values | | create_entry, update_entry | write a draft (values as in describe_content_type's entry schema); a change names only the fields it changes | | publish_entry, unpublish_entry, archive_entry | what visitors read; only when the person asked | | delete_entry, restore_entry | the bin, for 30 days | | list_revisions, diff_revisions, revert_entry | an entry's history: every change with who, when and why; what changed between two revisions; going back to one (as a new revision) |

describe_site lists a site's content types too. Every change of an entry needs a reason in one sentence, which the activity log shows. Tools with typed values per content type follow (roadmap).

Clone this wiki locally