Claude Code is Anthropic's coding agent for the terminal and code editors. Connected to your Omeka site, it can search and read the collection, create and edit items, pages and exhibits, and upload files from your computer, all as your Omeka user.
Before you start
- Install Claude Code and sign in to it.
- Find your site's MCP address. It is shown on MCP Connections in the admin, and is your site's address followed by
/mcp, for examplehttps://archive.example.org/mcp. - Decide how Claude Code will sign in. Your Omeka account (OAuth) is the simplest. Use an API key on machines without a browser, or if an administrator has turned off signing in.
Connect with your Omeka account
-
In a terminal, add the server:
claude mcp add --transport http omeka https://archive.example.org/mcp -
Start Claude Code, type
/mcp, choose omeka, then Authenticate. -
Your browser opens your Omeka site. Sign in if asked, review the permissions, and choose Allow. Untick Create and edit to give Claude Code read-only access.
-
Back in Claude Code, ask: "Using the omeka tools, what is in this collection?" Claude calls
omeka_infoand describes the site.
Claude Code stores the sign-in and renews it by itself.
Connect with an API key
-
In the Omeka admin, open your user page (Users > your name) and go to the API Keys tab. (It appears while the REST API is on under Settings > API.)
-
Create a key and copy it.
-
Add the server with the key:
claude mcp add --transport http omeka https://archive.example.org/mcp --header "Authorization: Bearer YOUR_API_KEY"
API keys do not expire. To cut off access, delete the key on your user page.
Share the setup with a team
A project-scoped server lives in .mcp.json at the root of the project, which you can commit. With sign-in the file holds no secrets; each person authenticates with their own Omeka account the first time:
{
"mcpServers": {
"omeka": {
"type": "http",
"url": "https://archive.example.org/mcp"
}
}
}
Approve tool calls
Claude Code asks before it runs a tool for the first time. Tools that only read are marked read-only and tools that change the site are marked as writes, so you can decide what to pre-approve. For example, to let Claude Code search and read without asking, add the read tools to permissions.allow in .claude/settings.json:
{
"permissions": {
"allow": [
"mcp__omeka__omeka_info",
"mcp__omeka__search_elements",
"mcp__omeka__get_item_type",
"mcp__omeka__search_resources",
"mcp__omeka__get_resource"
]
}
}
Keep the editing tools on ask until you trust the workflow. Uploading files also runs curl, which Claude Code asks about separately.
Disconnect
- Signed in with your account: choose Disconnect next to Claude Code on MCP Connections.
- Using an API key: delete the key on your user page.
- To remove the server from Claude Code:
claude mcp remove omeka.