PHPackages                             bnomei/kirby-mcp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. bnomei/kirby-mcp

ActiveLibrary[CLI &amp; Console](/categories/cli)

bnomei/kirby-mcp
================

A CLI-first MCP server for Kirby CMS

1.4.0(2mo ago)411.8k↓15.8%1[1 issues](https://github.com/bnomei/kirby-mcp/issues)[1 PRs](https://github.com/bnomei/kirby-mcp/pulls)MITPHPPHP ^8.2CI passing

Since Dec 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/bnomei/kirby-mcp)[ Packagist](https://packagist.org/packages/bnomei/kirby-mcp)[ RSS](/packages/bnomei-kirby-mcp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (14)Used By (0)

Kirby MCP
=========

[](#kirby-mcp)

[![Kirby 5](https://camo.githubusercontent.com/b1a1b2ccd58e96259a9722c2489d91f40378c01b6c4c3e9fd27ed1d12c269d7c/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f4b697262792f353f636f6c6f723d454343373438)](https://getkirby.com)[![PHP 8.2](https://camo.githubusercontent.com/fd050028b4459f3f6e4db5703412957375ceb180d27951213d421eb2a23c8c8e/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f5048502f382e323f636f6c6f723d3445354239332669636f6e3d706870266c6162656c)](https://camo.githubusercontent.com/fd050028b4459f3f6e4db5703412957375ceb180d27951213d421eb2a23c8c8e/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f5048502f382e323f636f6c6f723d3445354239332669636f6e3d706870266c6162656c)[![Release](https://camo.githubusercontent.com/d0e3c7719274604322ae5ad0f676fee6153dbee1a197a26debcce6cd7f6b7b07/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f762f626e6f6d65692f6b697262792d6d63703f636f6c6f723d6165383166662669636f6e3d676974687562266c6162656c)](https://camo.githubusercontent.com/d0e3c7719274604322ae5ad0f676fee6153dbee1a197a26debcce6cd7f6b7b07/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f762f626e6f6d65692f6b697262792d6d63703f636f6c6f723d6165383166662669636f6e3d676974687562266c6162656c)[![Downloads](https://camo.githubusercontent.com/dea792321517732212c654fd152f33305278bff5a0201b7e176644049710e263/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f64742f626e6f6d65692f6b697262792d6d63703f636f6c6f723d3237323832322669636f6e3d676974687562266c6162656c)](https://camo.githubusercontent.com/dea792321517732212c654fd152f33305278bff5a0201b7e176644049710e263/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f64742f626e6f6d65692f6b697262792d6d63703f636f6c6f723d3237323832322669636f6e3d676974687562266c6162656c)[![Unittests](https://github.com/bnomei/kirby-mcp/actions/workflows/pest-tests.yml/badge.svg)](https://github.com/bnomei/kirby-mcp/actions/workflows/pest-tests.yml/badge.svg)[![PHPStan](https://github.com/bnomei/kirby-mcp/actions/workflows/phpstan.yml/badge.svg)](https://github.com/bnomei/kirby-mcp/actions/workflows/phpstan.yml/badge.svg)[![Discord](https://camo.githubusercontent.com/36eaef1b06f4996feb7587aa3281dcbd658e57535bc6b5e10110ed108e7a7a03/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f646973636f72642f626e6f6d65693f636f6c6f723d3732383964612669636f6e3d646973636f7264266c6162656c)](https://discordapp.com/users/bnomei)[![Buymecoffee](https://camo.githubusercontent.com/62e55d1129b82bf9c2fd4656451e81ab87a9787e7c9676ca58276532ed9666ee/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f69636f6e2f646f6e6174653f69636f6e3d6275796d6561636f6666656526636f6c6f723d464638313346266c6162656c)](https://www.buymeacoffee.com/bnomei)

CLI-first MCP server for Composer-based Kirby CMS projects. It lets an IDE or agent inspect your Kirby project (blueprints, templates, plugins, docs) and interact with a real Kirby runtime. It ships with a local knowledge base of Kirby concepts and tasks. For agent-specific install steps (Claude Code, Codex CLI) and Skill sync, see **Client setup**.

Warning

Prompt injection is a serious security threat, especially when used with documents retrieved from the internet. You might not see it happen when observing the conversation with the agent!

Quickstart
----------

[](#quickstart)

From your Kirby project root:

```
composer require bnomei/kirby-mcp --dev
vendor/bin/kirby-mcp install
vendor/bin/kirby-mcp
```

Then configure your MCP client (Cursor/Claude Code/Codex CLI) using the examples in **Client setup** and copy the bundled Skills as described below.

See **Client setup → Claude Code** and **Client setup → Codex CLI** for per-agent install and Skill sync steps.

Copy-paste request examples
---------------------------

[](#copy-paste-request-examples)

Use these once your MCP client is connected to the server.

### Planning &amp; content

[](#planning--content)

Tip

"Use the Kirby MCP to make a plan to..." is a reliable way to get your agent to use the tools and resources this MCP server provides. If you ask it to take action, it tends to edit files directly based on its training and skills.

```
Use the Kirby MCP to make a plan to... build a contact form page.

```

`kirby_roots`, `kirby_blueprint_read`, `kirby_templates_index`, `kirby_snippets_index`, `kirby_controllers_index`, `kirby_render_page`, `kirby_dump_log_tail`, `kirby://config/{option}`

Agent response example:```
Here’s a Kirby MCP–driven plan for a new contact form page in this project:

- Confirm requirements: fields (name/email/message), spam protection (honeypot + csrf()), success UX (inline vs redirect), and whether to store submissions.
- Panel setup: reuse existing blueprint site/blueprints/pages/contact.yml; update site/blueprints/site.yml so the site “pages” section allows creating template contact.
- Create the page: add content/4_contact/contact.txt (or create via Panel once allowed) and fill recipient, subject, success, text.
- Frontend: add site/templates/contact.php + a snippet like site/snippets/contact-form.php (escape all echoed user input; include hidden CSRF field + honeypot).
- Controller: add site/controllers/contact.php to handle POST: check csrf(get('csrf')), validate with invalid(), then send mail via $kirby->email() using replyTo (never use user input as from) and an email template like site/templates/emails/contact.text.php (optional contact.html.php).
- Email config: add site/config/config.php email.transport/email.presets (current kirby://config/email is null).
- Verify with MCP: render the page via kirby_render_page(id='contact', noCache=true); debug with mcp_dump() + kirby_dump_log_tail(traceId=...); inspect blueprint/roots via kirby_blueprint_read(id='pages/contact') and kirby://roots.

```

---

```
Show me the fields available on the home page blueprint and what they do using the MCP.

```

`kirby_blueprint_read`, `kirby_blueprints_index`

---

```
Show me the current content of the about page.

```

`kirby_read_page_content`

---

```
Append " with AI" to the title of the home page with Kirby MCP.

```

`kirby_read_page_content`, `kirby_update_page_content`, `kirby://field/text/update-schema`

### Resource shortcuts

[](#resource-shortcuts)

Tip

Either on its own or with a request, the resources can be used to quickly bring knowledge and runtime information into the current context of your agent.

```
kirby://glossary/collection

```

`kirby://glossary/{term}`

---

```
What is the kirby://config/debug for production?

```

`kirby://config/{option}`

### Search &amp; docs

[](#search--docs)

Tip

The MCP server ships with a local knowledge base about Kirby. It consists of a glossary, common tasks, and update guides for content fields. This reduces the need to rely on external resources and is very fast.

```
kirby search for collection filtering

```

`kirby_search`

---

Tip

But sometimes you or your agent needs to dig deeper. That is why the MCP server also provides a fallback to the official Kirby search and docs (not including the forum). You can trigger it by mentioning `search online` in your request.

```
kirby search online for panel permissions

```

`kirby_online`

---

Tip

When you need to discover third-party plugins, you can also search the official Kirby plugin directory and fetch details from each plugin page.

```
kirby search plugins online for e-commerce cart

```

`kirby_online_plugins`

---

Tip

Your agent will use the next tool under the hood itself, but you can use it as well to quickly check what the MCP server knows about a given topic.

```
What mcp tool should I use to... list plugins?

```

`kirby_tool_suggest`

### Inventory (runtime + filesystem)

[](#inventory-runtime--filesystem)

```
list blueprints, templates, snippets, collections, controllers, models, plugins, routes, roots

```

`kirby_blueprints_loaded`, `kirby_blueprints_index`, `kirby_templates_index`, `kirby_snippets_index`, `kirby_collections_index`, `kirby_controllers_index`, `kirby_models_index`, `kirby_plugins_index`, `kirby_routes_index`, `kirby_roots`

### Debug, tinker/eval and running commands

[](#debug-tinkereval-and-running-commands)

Important

The `kirby_eval` tool is disabled by default and CLI commands are protected by an allowlist/denylist, see config and security below.

```
kirby MCP tinker $site->index()->count()

```

`kirby_eval`

---

```
kirby MCP check query site.find('notes').unlisted.count
kirby MCP check query page.siblings.count (model: notes)

```

`kirby_query_dot`

---

```
run kirby cli command uuid:populate

```

`kirby_run_cli_command`

---

```
My home page renders incorrectly. Help me debug it with mcp_dump() to return the current $page object.

```

`kirby_render_page`, `kirby_dump_log_tail`, `kirby_templates_index`, `kirby_snippets_index`, `kirby_controllers_index`, `kirby_models_index`

Capabilities
------------

[](#capabilities)

> \[!INFO\] `kirby_init` is required once per session before calling any other tool or resource but the agent should figure this out automatically. Some capabilities require the runtime wrappers because they query Kirby at runtime. Installing/updating them should happen automatically as well.

At initialization, the server tells the agent which tools/resources to use. The knowledge base cross-references them so the agent can find the next step.

Current inventory: 37 tools, 15 resources, 15 resource templates, 216 KB articles.

🛠️ Tools- `kirby_blueprint_read` — read a single blueprint by id
- `kirby_blueprints_index` — index blueprints, includes plugin-registered ones when runtime is installed
- `kirby_blueprints_loaded` — list blueprint ids loaded at runtime
- `kirby_cache_clear` — clear in-memory caches for this MCP session (StaticCache, config, composer, roots, tool index)
- `kirby_cli_version` — run `kirby version` and return stdout, stderr and exit code
- `kirby_composer_audit` — parse composer.json for scripts and quality tools
- `kirby_collections_index` — index named collections, includes plugin-registered ones when runtime is installed
- `kirby_controllers_index` — index controllers, includes plugin-registered ones when runtime is installed
- `kirby_online` — search official Kirby docs (online fallback) and optionally fetch markdown pages
- `kirby_online_plugins` — search the official Kirby plugins directory (online fallback) and optionally fetch plugin details
- `kirby_dump_log_tail` — tail `.kirby-mcp/dumps.jsonl` written by `mcp_dump()`
- `kirby_eval` — execute PHP in Kirby runtime for quick inspection, requires enable plus confirm
- `kirby_query_dot` — evaluate Kirby query language (dot-notation) strings, requires confirm and can be disabled via config
- `kirby_generate_ide_helpers` — generate regeneratable IDE helper files into `.kirby-mcp/`
- `kirby_ide_helpers_status` — report missing template/snippet PHPDoc `@var` hints + helper file freshness (mtime-based)
- `kirby_info` — project runtime info, composer audit and local environment detection
- `kirby_init` — session guidance plus project-specific audit, call once per session
- `kirby_search` — search the bundled local Kirby knowledge base markdown files (preferred)
- `kirby_models_index` — index registered page models with class and file path info
- `kirby_plugins_index` — index loaded plugins, prefers runtime truth when installed
- `kirby_read_file_content` — read file content/metadata by id or uuid
- `kirby_read_page_content` — read page content by id or uuid
- `kirby_read_site_content` — read site content
- `kirby_read_user_content` — read user content by id or email
- `kirby_render_page` — render a page by id or uuid and return HTML plus errors
- `kirby_roots` — resolved Kirby roots via `kirby roots`
- `kirby_routes_index` — list registered routes with best-effort source location (config/plugin)
- `kirby_run_cli_command` — run a Kirby CLI command, guarded by an allowlist
- `kirby_runtime_install` — install project-local Kirby MCP runtime CLI commands into the project
- `kirby_runtime_status` — check whether runtime command wrappers are installed
- `kirby_snippets_index` — index snippets, includes plugin-registered ones when runtime is installed
- `kirby_templates_index` — index templates, includes plugin-registered ones when runtime is installed
- `kirby_tool_suggest` — suggest the best next Kirby MCP tool/resource for a task
- `kirby_update_file_content` — update file metadata/content, plus confirm (see `kirby://blueprint/file/update-schema` + `kirby://field/{type}/update-schema` for payload shapes)
- `kirby_update_page_content` — update page content, plus confirm (see `kirby://blueprint/page/update-schema` + `kirby://field/{type}/update-schema` for payload shapes)
- `kirby_update_site_content` — update site content, plus confirm (see `kirby://blueprint/site/update-schema` + `kirby://field/{type}/update-schema` for payload shapes)
- `kirby_update_user_content` — update user content, plus confirm (see `kirby://blueprint/user/update-schema` + `kirby://field/{type}/update-schema` for payload shapes)

Update tool `data` input accepts either a JSON object or a JSON-encoded object string for backward compatibility. If your client supports MCP resource subscriptions, successful `kirby_update_*_content` writes emit `notifications/resources/updated` for subscribed content resources (`kirby://site/content`, `kirby://page/content/{...}`, `kirby://file/content/{...}`, `kirby://user/content/{...}`). Confirm-gated tools (`kirby_update_*_content`, `kirby_eval`, `kirby_query_dot`) keep explicit `confirm=true`; clients with MCP elicitation support may present an inline confirmation prompt and continue on accept.

📚 Resources> \[!TIP\] Call a resource to bring condensed knowledge into the current context of your agent.

Resources (read-only):

- `kirby://commands` — Kirby CLI command list, parsed from `kirby help`
- `kirby://composer` — composer audit, scripts and quality tooling
- `kirby://extensions` — Kirby plugin extensions list (links to `kirby://extension/{name}`)
- `kirby://fields` — Kirby Panel field types list (links to `kirby://field/{type}`)
- `kirby://fields/update-schema` — Kirby content field guides list (links to `kirby://field/{type}/update-schema`)
- `kirby://blueprints/update-schema` — Kirby blueprint update guides list (links to `kirby://blueprint/{type}/update-schema`)
- `kirby://glossary` — Kirby glossary terms list (links to `kirby://glossary/{term}`)
- `kirby://kb` — bundled KB index (links to `kirby://kb/{path}`)
- `kirby://hooks` — Kirby hook names list (links to `kirby://hook/{name}`)
- `kirby://info` — project runtime info, composer audit and local environment detection
- `kirby://roots` — Kirby roots discovered via CLI, respects configured host
- `kirby://sections` — Kirby Panel section types list (links to `kirby://section/{type}`)
- `kirby://tools` — weighted keyword index for Kirby MCP tools/resources/templates
- `kirby://uuid/new` — generate a new Kirby UUID string (respects `content.uuid` format)

Resource templates (dynamic):

- `kirby://blueprint/{encodedId}` — read a blueprint by URL-encoded id, e.g. `pages%2Fhome`
- `kirby://cli/command/{command}` — parsed `kirby  --help` output, e.g. `backup` or `uuid:generate`
- `kirby://config/{option}` — read a Kirby config option by dot path
- `kirby://extension/{name}` — Kirby extension reference markdown from getkirby.com, e.g. `commands` or `darkroom-drivers`
- `kirby://field/{type}` — Kirby Panel field reference markdown from getkirby.com, e.g. `blocks` or `email`
- `kirby://field/{type}/update-schema` — bundled content field guide from `kb/update-schema/{type}.md`
- `kirby://blueprint/{type}/update-schema` — bundled blueprint update guide from `kb/update-schema/blueprint-{type}.md`
- `kirby://glossary/{term}` — read a bundled Kirby glossary entry by term, e.g. `api` or `kql`
- `kirby://kb/{path}` — read a bundled KB document by path (relative to `kb/`, no `.md`)
- `kirby://hook/{name}` — Kirby hook reference markdown from getkirby.com, e.g. `file.changeName:after` or `file-changename-after`
- `kirby://file/content/{encodedIdOrUuid}` — read file content/metadata by URL-encoded id or uuid
- `kirby://page/content/{encodedIdOrUuid}` — read page content by URL-encoded id or uuid
- `kirby://section/{type}` — Kirby Panel section reference markdown from getkirby.com, e.g. `fields` or `files`
- `kirby://site/content` — read site content
- `kirby://susie/{phase}/{step}` — easter egg resource template
- `kirby://user/content/{encodedIdOrEmail}` — read user content by URL-encoded id or email

Skills
------

[](#skills)

Bundled Skills live in `vendor/bnomei/kirby-mcp/skills` after installation. Copy them into your agent’s local skills folder using the **Client setup** instructions below.

- `kirby-project-tour` — Project inventory and orientation (roots, blueprints, plugins) with next-step recommendations.
- `kirby-content-migration` — Safe content migrations with runtime read/update tools and update schemas.
- `kirby-scaffold-page-type` — Scaffold a page type (blueprint + template + optional controller/model) using project conventions.
- `kirby-routing-and-representations` — Custom routes, redirects, and content representations (.json/.xml/.rss).
- `kirby-collections-and-navigation` — Listings, pagination, search, filtering/sorting/grouping, and navigation menus.
- `kirby-panel-and-blueprints` — Blueprint design, Panel UX, `extends`, and custom areas/fields/sections.
- `kirby-plugin-development` — Reusable plugins with hooks/extensions, KirbyTags, blocks, and shared controllers/templates.
- `kirby-headless-api` — Headless API setup with Kirby API, KQL, and JSON representations.
- `kirby-i18n-workflows` — Language config, translation keys, localized labels, and import/export workflows.
- `kirby-security-and-auth` — Login/roles/permissions, access restriction, and protected downloads.
- `kirby-performance-and-media` — Cache tuning, CDN/media routing, responsive images, and lazy loading.
- `kirby-debugging-and-tracing` — Render reproduction, runtime tracing with `mcp_dump`, and code-path discovery.
- `kirby-ide-support` — IDE helper status plus minimal PHPDoc/type-hint improvements.
- `kirby-upgrade-and-maintenance` — Safe Kirby upgrades with composer audit, plugin checks, and verification.
- `kirby-forms-and-frontend-actions` — Contact forms, uploads, emails, and frontend page creation with validation/CSRF.

Client setup
------------

[](#client-setup)

Note

The `--project` flag is optional when you run the server from the Kirby project root. Use it (or `KIRBY_MCP_PROJECT_ROOT`) when running from elsewhere or from a global MCP config.

### Cursor

[](#cursor)

Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):

```
{
  "mcpServers": {
    "kirby": {
      "command": "vendor/bin/kirby-mcp",
      "args": ["--project=/absolute/path/to/kirby-project"]
    }
  }
}
```

If you use the global config, set `"command"` to an absolute path to the project’s `vendor/bin/kirby-mcp` (or create a wrapper script).

### Claude Code

[](#claude-code)

From the Kirby project directory:

```
claude mcp add kirby -- vendor/bin/kirby-mcp
```

Or explicitly:

```
claude mcp add kirby -- vendor/bin/kirby-mcp --project=/absolute/path/to/kirby-project
```

Copy bundled Skills (personal scope):

```
mkdir -p ~/.claude/skills
rsync -a vendor/bnomei/kirby-mcp/skills/ ~/.claude/skills/
```

Restart Claude Code after copying (use `.claude/skills/` instead for repo-scoped skills).

### Codex CLI

[](#codex-cli)

From the Kirby project directory:

```
codex mcp add kirby -- vendor/bin/kirby-mcp
```

Or explicitly:

```
codex mcp add kirby -- vendor/bin/kirby-mcp --project=/absolute/path/to/kirby-project
```

Copy bundled Skills (user scope):

```
mkdir -p ~/.codex/skills
rsync -a vendor/bnomei/kirby-mcp/skills/ ~/.codex/skills/
```

Restart Codex CLI after copying.

### Manual

[](#manual)

Start the server (point it at a composer-based Kirby project):

- From the Kirby project root: `vendor/bin/kirby-mcp`
- Or explicitly: `vendor/bin/kirby-mcp --project=/absolute/path/to/kirby-project`

IDE helpers (optional, for humans)
----------------------------------

[](#ide-helpers-optional-for-humans)

The agent can both check and generate IDE helpers for your project: `kirby_ide_helpers_status` and `kirby_generate_ide_helpers`. You can also use the CLI commands yourself.

- Check baseline + freshness: `vendor/bin/kirby-mcp ide:status` (use `--details` and `--limit=N` for more output)
- Generate regeneratable helper files: `vendor/bin/kirby-mcp ide:generate` (default is `--dry-run`; add `--write` to create files)
- JSON output: `--json` (MCP markers) or `--raw-json` (plain JSON)

What the MCP server does (and doesn’t)
--------------------------------------

[](#what-the-mcp-server-does-and-doesnt)

- Provides MCP tools/resources for project inspection (blueprints, templates/snippets/collections, controllers/models, plugins, routes, roots).
- Fetches official Kirby reference docs and ships a local Markdown knowledge base (`kb/`) for fast lookups.
- Doesn’t modify your content by default; write-capable actions run by the MCP are guarded and require explicit opt-in/confirmation. But your agent still can do whatever you allow it to!
- Only supports composer-based Kirby projects (Kirby CLI is used for many capabilities).

Security model
--------------

[](#security-model)

- `kirby_run_cli_command` is guarded by an allowlist; extend it via `.kirby-mcp/mcp.json` (`cli.allow`, `cli.allowWrite`) and block via `cli.deny`.
- Write-capable actions require explicit opt-in (e.g. `allowWrite=true` or `confirm=true`, depending on the tool).
- `kirby_eval` is disabled by default; enable via `KIRBY_MCP_ENABLE_EVAL=1` or `.kirby-mcp/mcp.json` (`{"eval":{"enabled":true}}`) and still requires per-call confirmation (`confirm=true` or client-side elicitation).
- `kirby_query_dot` is enabled by default; disable via `.kirby-mcp/mcp.json` (`{"query":{"enabled":false}}`) and still requires per-call confirmation (`confirm=true` or client-side elicitation).

What `install` / `update` change in your project
------------------------------------------------

[](#what-install--update-change-in-your-project)

`vendor/bin/kirby-mcp install`:

- Creates `.kirby-mcp/mcp.json` if neither `.kirby-mcp/mcp.json` nor `.kirby-mcp/config.json` exist.
- Copies runtime command wrappers into the project’s Kirby commands root (usually `site/commands/mcp/`).
- Use `--force` to overwrite existing wrapper files.

`vendor/bin/kirby-mcp update`:

- Overwrites the runtime wrappers (use after upgrading this package).
- Creates `.kirby-mcp/mcp.json` only if missing; it won’t overwrite an existing config.

To remove everything:

- Delete the runtime wrappers folder (`site/commands/mcp/` in most projects).
- Optionally delete `.kirby-mcp/` (config + caches + optional helper files).

Debug dumps (`mcp_dump`)
------------------------

[](#debug-dumps-mcp_dump)

This package provides a lightweight `mcp_dump()` helper that appends JSONL to `.kirby-mcp/dumps.jsonl` in the project root.

**Secret redaction:** By default, dump output is scanned for sensitive data (API keys, tokens, passwords, IPs) and redacted before writing. This protects against accidentally leaking secrets. Configure via `dumps.secretPatterns` in `.kirby-mcp/mcp.json`:

```
{
  "dumps": {
    "secretPatterns": []
  }
}
```

- Omit `secretPatterns` → use built-in patterns (OpenAI/Anthropic/GitHub/Stripe/AWS keys, JWTs, Bearer tokens, IPs, etc.)
- Set to `[]` → disable redaction entirely
- Set to `["/pattern1/", "/pattern2/"]` → use only your custom regex patterns

Typical workflow for your coding agent:

- Add `mcp_dump($anything)` (optionally chain `->green()`, `->label('...')`, `->caller()`, `->trace()`, `->pass($value)`) anywhere in templates/snippets/controllers.
- Call `kirby_render_page` (it returns a `traceId`).
- Call `kirby_dump_log_tail(traceId=...)` to retrieve the captured dump events for that render.

Configuration
-------------

[](#configuration)

Project config lives in `.kirby-mcp/mcp.json` (or `.kirby-mcp/config.json`) in the Kirby project root. It is created by `vendor/bin/kirby-mcp install` if missing.

Kirby host selection:

- By default, Kirby CLI runs with no `KIRBY_HOST` override.
- To use host-specific Kirby config, set `KIRBY_MCP_HOST` (or `KIRBY_HOST`) when starting the MCP server, or set `kirby.host` in `.kirby-mcp/mcp.json`:
    - `{"kirby":{"host":"localhost"}}`

OptionTypeDefaultDescription`cache.ttlSeconds``int``60`In-memory cache TTL (seconds) for read-only resources like `kirby://commands` and `kirby://cli/command/{command}` plus a few internal caches (roots inspection, completions); set to `0` to disable caching.`docs.ttlSeconds``int``86400`In-memory cache TTL (seconds) for fetched getkirby.com markdown docs (e.g. `kirby://field/{type}` and `kirby://section/{type}`); set to `0` to disable caching.`cli.allow``string[]``[]`Additional allowlist patterns for `kirby_run_cli_command` (supports `*` wildcard, e.g. `plugin:*`).`cli.allowWrite``string[]``[]`Additional allowlist patterns for write-capable commands; requires `allowWrite=true` when calling `kirby_run_cli_command` (supports `*`).`cli.deny``string[]``[]`Deny patterns that always block commands, even if allowlisted (supports `*`).`dumps.enabled``bool``true`Enable/disable `mcp_dump()` writes to `.kirby-mcp/dumps.jsonl`.`dumps.maxBytes``int``2097152`Max size for `.kirby-mcp/dumps.jsonl` written by `mcp_dump()`. When the next write would exceed it, the log is compacted by keeping the newest half of lines, then the new entry is appended.`dumps.secretPatterns``string[]`(defaults)Regex patterns for secret redaction in dump logs. Omit to use defaults (API keys, tokens, IPs, etc.), set to `[]` to disable masking, or provide custom patterns.`ide.typeHintScanBytes``int``16384`Max bytes to read from controller/model files when detecting Kirby IDE baseline type hints (see `kirby_ide_helpers_status`).`kirby.host``string``null`Default Kirby host to pass as `KIRBY_HOST` to the Kirby CLI (affects host-specific config like `config.{host}.php`).`eval.enabled``bool``false`Enable `kirby_eval` / `kirby mcp:eval` (still requires explicit confirmation per call).`query.enabled``bool``true`Enable `kirby_query_dot` / `kirby mcp:query:dot` (still requires explicit confirmation per call).Environment variables:

Env varDescription`KIRBY_MCP_PROJECT_ROOT`Project root (overrides auto-detection).`KIRBY_MCP_KIRBY_BIN`Path to `vendor/bin/kirby` (overrides binary resolution).`KIRBY_MCP_HOST` / `KIRBY_HOST`Kirby host override (takes precedence over config).`KIRBY_MCP_DUMPS_ENABLED`Override `dumps.enabled` (`1/0`, `true/false`, `on/off`).`KIRBY_MCP_ENABLE_EVAL`Enable eval override (takes precedence over config; still needs confirmation).`KIRBY_MCP_ENABLE_QUERY`Enable query eval override (takes precedence over config; still needs confirmation).Troubleshooting
---------------

[](#troubleshooting)

- “Unable to determine Kirby project root”: run from the Kirby project root or pass `--project=/absolute/path` (or set `KIRBY_MCP_PROJECT_ROOT`).
- Runtime-only tools fail: run `vendor/bin/kirby-mcp install` and check `kirby_runtime_status`.
- CLI command blocked: add patterns to `.kirby-mcp/mcp.json` (`cli.allow` / `cli.allowWrite`) or block with `cli.deny`.
- Host-specific config not applied: set `KIRBY_MCP_HOST`/`KIRBY_HOST` or configure `{"kirby":{"host":"..."}}`.
- Docs resources are slow/failing: confirm network access or adjust `docs.ttlSeconds` (set to `0` to disable caching).
- No dump output: ensure `dumps.enabled=true`, a `.kirby-mcp/dumps.jsonl` exists, and use the correct `traceId` with `kirby_dump_log_tail`.

Development
-----------

[](#development)

- Install deps: `composer install`
- Run tests: `composer test`
- Run static analysis: `composer analyse`

Disclaimer
----------

[](#disclaimer)

This MCP server is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please [create a new issue](https://github.com/bnomei/kirby-mcp/issues/new).

License
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)

It is discouraged to use this MCP server in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance84

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

10

Last Release

83d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3265642?v=4)[Bruno Meilick](/maintainers/bnomei)[@bnomei](https://github.com/bnomei)

---

Top Contributors

[![bnomei](https://avatars.githubusercontent.com/u/3265642?v=4)](https://github.com/bnomei "bnomei (32 commits)")[![cto-new[bot]](https://avatars.githubusercontent.com/in/364074?v=4)](https://github.com/cto-new[bot] "cto-new[bot] (8 commits)")

---

Tags

agent-toolsagentic-workflowclaude-codeclicodex-clicommandsdeveloper-toolsgoogle-geminikirbykirby-cmsknowledge-basemcp-servermodel-context-protocolphp8promptsresourcestools

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/bnomei-kirby-mcp/health.svg)

```
[![Health](https://phpackages.com/badges/bnomei-kirby-mcp/health.svg)](https://phpackages.com/packages/bnomei-kirby-mcp)
```

###  Alternatives

[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[n98/magerun2

Tools for managing Magento projects and installations

928244.3k6](/packages/n98-magerun2)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[madewithlove/license-checker

CLI tool to verify allowed licenses for composer dependencies

54449.8k21](/packages/madewithlove-license-checker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
