Skip to main content
Glama

cockpit-mcp

A small, read-only MCP server for Cockpit CMS. It lets an AI agent understand the content behind a page — the models, fields, and types — by asking tools, instead of fetching the whole REST API or reading docs.

Generic and reusable: point it at any Cockpit v2 instance (Core or Pro) via env vars. Write it once, reuse in every project — the code is generic; only COCKPIT_URL + COCKPIT_TOKEN change per project.

Run with npx (no install)

It runs straight from GitHub — no clone, no registry:

npx -y github:Avanxo-Technology/cockpit-mcp          # latest main
npx -y github:Avanxo-Technology/cockpit-mcp#v0.1.0   # pinned to a tag

Related MCP server: MCP Server for Database

Tools

Tool

What it does

list_models

List all content models (collections & singletons) with a one-line summary. Start here.

describe_model

Field schema for one model — names, types, required, choices, linked models, nested fields. The "understand this quickly" tool.

list_items

List items for a model (Mongo-style filter, sort, fields, limit).

get_item

Fetch one item by _id.

search

Case-insensitive substring match on a text field.

All tools are GET-only; the server never mutates content.

Setup

cd cockpit-mcp
npm install
cp .env.example .env   # then fill in COCKPIT_URL and COCKPIT_TOKEN

Create the token in Cockpit admin: Settings → API → add token (a read scope is enough).

Register with opencode / Claude (stdio)

Example MCP client config:

{
  "mcpServers": {
    "cockpit": {
      "command": "npx",
      "args": ["-y", "github:Avanxo-Technology/cockpit-mcp"],
      "env": {
        "COCKPIT_URL": "http://localhost:8080",
        "COCKPIT_TOKEN": "your-token-here"
      }
    }
  }
}

Each project registers the same package and supplies its own COCKPIT_URL / COCKPIT_TOKEN — one package, reused everywhere. (For local dev against a checkout, swap command to node with the path to src/index.js.)

The server logs a connection/health line to stderr on startup (never to stdout, which carries the JSON-RPC stream).

Compatibility

Targets Cockpit v2 (Core & Pro) REST API: GET /api/content/models, /api/content/items/{model}, /api/content/item/{model}/{id}, auth via the api-key header. On startup it probes list_models; if the URL/token is wrong it warns (auth failures surface as a clear message) and tools return errors until fixed — the server itself still starts.

Available Tools

5 tools
describe_modelA

Describe one content model's field schema (names, types, required, choices, linked models, nested fields). Use this to understand the exact shape of the data behind a page or component — instead of fetching the whole API or docs.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYesModel name (from list_models)

TDQS

A4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It describes a read-only operation ('describe') but does not explicitly state idempotency, safety, error behavior, or auth requirements. The description adds minimal transparency beyond stating the function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: first states the function and outputs, second provides usage context. No redundant words, front-loaded with key information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers what the tool does and when to use it. It does not describe error handling (e.g., if model not found) or return format details, but given the simple input schema and no output schema, it is largely sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with one parameter described. The description adds value by specifying that the model name comes from 'list_models', aiding proper use. However, it does not elaborate on format or constraints, so it slightly exceeds the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs ('Describe one content model's field schema') and lists concrete attributes (names, types, required, etc.). It distinguishes itself from sibling tools like get_item (data) and list_models (model list) by focusing on the schema structure.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises when to use this tool ('Use this to understand the exact shape of the data... instead of fetching the whole API or docs.') and hints at a prerequisite via 'Model name (from list_models)' in the parameter, though it does not mention when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_itemA

Get a single content item by its id. Read-only.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesItem _id
modelYesModel name
fieldsNoOptional projection
populateNoDepth to resolve links (0/1)

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Labels the operation as 'Read-only', which is a key behavioral trait. With no annotations provided, this adds some transparency, but lacks details on auth, error handling, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with zero waste. Front-loaded with action and resource. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a simple retrieval tool. The description covers basic purpose and read-only nature, but lacks information about return format, pagination, or error cases. No output schema is present to compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage with descriptions for all 4 parameters. The description does not add any extra meaning beyond what is already in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (get), the resource (single content item), and the method (by id). It distinguishes itself from siblings like list_items (multiple items) and search (query-based).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies use when you have an item id, but no explicit when-to-use or when-not-to-use compared to alternatives like search or list_items. No exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_itemsA

List content items for a model. Supports an optional Mongo-style filter (JSON), sort, field projection, and limit. Read-only.

ParametersJSON Schema
NameRequiredDescriptionDefault
skipNo
sortNoe.g. {"_created": -1}
limitNoMax items (default 20)
modelYesModel name
fieldsNoProjection, e.g. {"title": 1, "slug": 1}
filterNoMongo-style filter, e.g. {"published": true}
populateNoDepth to resolve linked content (0/1)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Discloses read-only nature, which is crucial. Does not mention authentication, rate limits, error behavior, return format, or paging behavior beyond limit default. Adequate but with gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences succinctly convey purpose and capabilities. No filler or redundant information. Front-loaded with the primary action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a listing tool with 7 parameters (1 required) and no output schema, the description covers the main capabilities. Lacks pagination behavior (skip not mentioned) and return structure, but overall sufficient given the tool's simplicity and high schema coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is high (86%), baseline 3. Description adds modest value by labeling filter as 'Mongo-style', sort as 'JSON', and limit with default, but mostly duplicates schema descriptions. No new parameter semantics beyond what schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'List content items for a model' with a specific verb and resource. Distinguishes from sibling tools like describe_model (describe), get_item (single item), list_models (models list), and search (cross-model search).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implicitly clear when to use (listing items of a model with optional filters). Lacks explicit when-not or alternatives though. The sentence 'Read-only' provides context but no exclusionary guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_modelsA

List all Cockpit content models (collections & singletons) with a one-line summary each. Start here to see what content exists.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description explains that it returns a one-line summary for each model, but it does not elaborate on other behavioral aspects such as sorting, filtering, or authentication requirements. Since no annotations are provided, the description carries the full burden, and while sufficient, it lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two concise sentences. The first sentence states the action and result, and the second provides usage guidance. All words are meaningful and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters or output schema, the description adequately covers its purpose and usage. It could be slightly enhanced by describing the output structure, but it is sufficiently complete for the agent to understand its role.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. The description does not need to add parameter meaning beyond the schema, which is complete. No additional value is expected.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool's action ('List all Cockpit content models') and the resource ('collections & singletons'). It also distinguishes itself from siblings like describe_model (detailed view) and list_items (items within models) by providing an overview with one-line summaries.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'Start here to see what content exists' provides explicit guidance on when to use this tool: as an initial step for exploration. While it does not explicitly exclude other scenarios or mention alternatives, the context makes the usage clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observeddescribe_model
    • First observedget_item
    • First observedlist_items
    • First observedlist_models
    • First observedsearch

TDQS

A4.2/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct operation: schema description, item retrieval by ID, filtered listing, model listing, and text search. No overlap in functionality.

Naming Consistency4/5

Most tools use a clear verb_noun pattern (describe_model, get_item, list_items, list_models). 'search' deviates by omitting the noun but still follows the verb-first convention. Overall consistent.

Tool Count5/5

Five tools is appropriate for a read-only content management server. Each tool serves a clear purpose without excess or deficiency.

Completeness5/5

The toolset fully covers the read-only domain: discover models, inspect schemas, retrieve items, and search. No gaps for the intended functionality.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers