# Docmost MCP

> Use when questions should be answered from Docmost content, including when the answer depends on screenshots, images, or attached files.

- Skill: `ltdigor-review/docmost-mcp` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ltdigor-review/docmost-mcp`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ltdigor-review/docmost-mcp/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: ltdigor-review (https://skillmd.com/u/ltdigor-review)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/ltdigor-review/docmost-mcp

---


# Docmost MCP

Use this skill when a user asks a question that should be answered from Docmost knowledge base content, or when the user explicitly mentions Docmost MCP.

## Preconditions

Docmost MCP must already be configured in the local MCP client.

If setup is the current task, configure the MCP server first, then verify it before answering that setup is complete.

Expected server:

```text
docmost
```

Expected endpoint for OfferCore:

```text
https://docmost.offercore.ru/mcp
```

For another Docmost instance, use that instance's `/mcp` endpoint.

Expected transport:

```text
Streamable HTTP
```

Expected token format:

```text
dcmcp_...
```

Do not ask the user for the token unless setup or authentication is the current task. Prefer client settings, secret storage, or local MCP config over pasting tokens into chat. Never print a full token in chat, logs, docs, diffs, or examples.

If the server is configured under a different name, either use that available server name if the client exposes it clearly, or tell the user to rename it to `docmost` for this skill.

## Tool scope

Docmost MCP is read-only.

Allowed tools:

- `get_relevant_context`
- `search_pages`
- `get_page`
- `list_spaces`
- `list_child_pages`
- `get_mcp_context`

Do not expect write, delete, admin, database, cookie, or browser-session access through MCP.

If the user asks to create, edit, delete, publish, invite users, change permissions, or perform admin work, explain that this MCP server cannot do that and ask for an appropriate write/admin workflow instead.

Do not fall back to browser sessions, cookies, direct database access, write APIs, admin panels, or local exports unless the user explicitly asks for that separate workflow.

## Default workflow

1. Search with `search_pages` using the user's question.
2. If the first search is weak, rewrite the query with domain terms and search again.
3. Select 2 to 5 relevant pages.
4. Read selected pages with `get_page`.
5. Answer only from retrieved content unless clearly labeled as general knowledge.
6. Cite sources with `sourceUrl` links at the end.

If the answer needs one exact article and search returns a clear match, reading one page is enough.

For setup verification, use `list_spaces` or a small `search_pages` query such as `трудоустройство`. Do not read unrelated pages just to prove the connection works.

## Screenshot/image/attachment workflow

When a query depends on media or file attachments, keep the answer flow MCP-first:

1. Call `get_page` on the candidate page(s) to get markdown content.
2. Extract all markdown link URLs (no file-extension filtering):
   - `![...](...)` image links are treated as image candidates
   - `[...](...)` regular links are treated as attachment candidates by context
3. Filter candidates by context and scheme:
   - allow only URLs that are either:
     - root-relative `/api/files...` paths, rewritten to `https://docmost.offercore.ru/api/files...`
     - absolute `https://...` URLs
   - reject anything else (relative paths, protocol-relative URLs, http, data:, blob:, mailto:, etc.).
4. Download each candidate with curl in a dedicated temp directory from `mktemp -d`:
   - create a per-page temp directory and temp files for metadata and stderr.
   - use only curl flags like:
     `--fail --location --silent --show-error --output <path> --max-filesize 52428800 --proto '=https' --proto-redir '=https'`
   - write HTTP/content-type/size metadata into a temp metadata file and curl stderr into a temp error file.
   - capture curl exit code immediately after the command.
   - example:
     `curl --fail --location --silent --show-error --output "$file_path" --max-filesize 52428800 --proto '=https' --proto-redir '=https' --write-out '%{http_code} %{content_type} %{size_download}\n' "$attachment_url" >"$meta_file" 2>"$err_file"`
   - do not attach `Authorization`, `Cookie`, dcmcp token headers, or any other credentials when fetching attachments.
5. Classify outcomes:
   - parse the HTTP status from metadata, then take exactly one terminal branch:
     - if the status is `401` or `403`, ask the user to attach/upload the file directly in chat and stop processing that attachment.
     - else if the status is any other non-success HTTP status, report the exact status without guessing and stop processing that attachment.
     - else if the status is successful but curl exit code is non-zero, report a transfer failure (for example, a truncated transfer), check `$err_file`, and stop processing that attachment.
     - else if there is no usable HTTP status and curl exit code is non-zero, report a transport/TLS error, check `$err_file`, and stop processing that attachment.
     - else proceed to MIME/size checks only when the HTTP status is successful and curl exit code is zero.
6. Reject the download if any condition holds:
   - HTTP status is not successful,
   - MIME type is not one of `image/*`, `application/pdf`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX), `audio/*`, `video/*`,
   - size exceeds 50 MiB by curl limit or post-download byte check.
7. Analyze attachment content:
   - for images, use visual analysis directly from fetched file.
   - for PDF/DOCX/audio/video, use matching available skill/tool in the environment.
8. Cite evidence from both the parent page `sourceUrl` and the attachment filename in the final response.

Do not use browser sessions for attachments. Do not print tokens, cookies, auth headers, or request credentials.

If an attachment URL request returns:
- `401`/`403`: report inability to fetch due to access and ask the user to upload/attach the file directly in chat.
- Any other error: report the exact status/code from the response without inferring root cause.

Always remove the exact temp directory created for the page after processing, including on failure paths.

## Source handling

Prefer direct page evidence over broad summaries.

When sources disagree, say so and cite both pages.

If Docmost does not contain enough information, say what is missing. Do not invent missing policy, process, pricing, student guidance, internal decisions, or operational details.

## Search tips

Use the user's words first.

If needed, add synonyms, product names, team names, or Russian and English variants.

For broad questions, call `list_spaces` before searching and restrict search to the most relevant space if the MCP tool supports it.

## Error handling

### 401 Unauthorized

Tell the user the MCP token is missing, invalid, expired, revoked, or copied incorrectly. Ask them to create a new `dcmcp_...` token if needed.

### 403 Forbidden

Tell the user MCP may be disabled, the user may not have access, or the token space scope may exclude the page.

### 429 Too Many Requests

Slow down. Retry only if the client workflow allows it. If rate limiting continues, tell the user the server limit needs adjustment.

### No relevant pages

Try one narrower search and one broader search. If both fail, answer that Docmost did not return a relevant source and state the searches you tried.

### MCP tools not visible

Tell the user the MCP client has not loaded the `docmost` server. Ask them to check the server name, endpoint, transport, authorization header, and then restart or refresh the MCP client.

## Output format

Keep answers concise.

End with sources when Docmost content was used:

```text
Sources:
- https://docmost.offercore.ru/s/.../p/...
- https://docmost.offercore.ru/s/.../p/...
```

Do not cite pages that were not read with `get_page`.

