@punyamsingh/docmost-mcp 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -3
- package/build/index.js +1 -1
- package/package.json +27 -10
package/README.md
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Docmost MCP server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@punyamsingh/docmost-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/@punyamsingh/docmost-mcp)
|
|
5
|
+
[](https://github.com/punyamsingh/docmost-mcp/actions/workflows/test.yml)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
|
|
8
|
+
An MCP server for **self-hosted [Docmost](https://docmost.com)**. Read, search, create and edit wiki pages in Markdown from Claude Code, Claude Desktop, Cursor, VS Code or any other MCP client. Works with the free Community Edition: no Enterprise licence and no API key, just a normal Docmost login.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
claude mcp add docmost --scope user \
|
|
12
|
+
-e DOCMOST_URL=https://docs.example.com \
|
|
13
|
+
-e DOCMOST_EMAIL=you@example.com \
|
|
14
|
+
-e DOCMOST_PASSWORD='your-password' \
|
|
15
|
+
-- npx -y @punyamsingh/docmost-mcp
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
That is all Claude Code needs; config for Claude Desktop, Cursor and VS Code is under [Setup](#setup).
|
|
4
19
|
|
|
5
20
|
Docmost's official MCP server and API keys are part of its paid Enterprise edition. This server needs neither. It logs in with a normal Docmost account and calls the same API the Docmost web app uses. Since Docmost v0.70 that API accepts and returns Markdown, and the server converts it to and from its editor format.
|
|
6
21
|
|
|
22
|
+
- **Markdown in and out**: pages come back as Markdown and are written from Markdown.
|
|
23
|
+
- **Safe edits**: an optional stale-write check stops a replace from overwriting someone else's newer change, and rewrites that would delete comments, mentions or diagrams are refused.
|
|
24
|
+
- **Live collaboration**: changes go through Docmost's real-time layer, so people with the page open see them instead of overwriting them.
|
|
25
|
+
- **Any page reference**: a page id, slug id or the URL copied from the browser.
|
|
26
|
+
|
|
7
27
|
## Tools
|
|
8
28
|
|
|
9
29
|
| Tool | What it does |
|
|
@@ -26,7 +46,7 @@ Content updates go through Docmost's real-time collaboration layer, so if someon
|
|
|
26
46
|
|
|
27
47
|
## Requirements
|
|
28
48
|
|
|
29
|
-
- Node.js
|
|
49
|
+
- Node.js 22.18 or newer
|
|
30
50
|
- Docmost v0.70 or newer
|
|
31
51
|
- A Docmost account without MFA. Edits are attributed to this account in page history, so each person should use their own.
|
|
32
52
|
|
|
@@ -64,6 +84,27 @@ Add the following to the client's MCP config (`claude_desktop_config.json`, `~/.
|
|
|
64
84
|
}
|
|
65
85
|
```
|
|
66
86
|
|
|
87
|
+
### VS Code
|
|
88
|
+
|
|
89
|
+
Add the following to `.vscode/mcp.json` in a workspace, or to your user MCP config:
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"servers": {
|
|
94
|
+
"docmost": {
|
|
95
|
+
"type": "stdio",
|
|
96
|
+
"command": "npx",
|
|
97
|
+
"args": ["-y", "@punyamsingh/docmost-mcp"],
|
|
98
|
+
"env": {
|
|
99
|
+
"DOCMOST_URL": "https://docs.example.com",
|
|
100
|
+
"DOCMOST_EMAIL": "you@example.com",
|
|
101
|
+
"DOCMOST_PASSWORD": "your-password"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
67
108
|
To run the latest code on GitHub instead of the npm release, replace `@punyamsingh/docmost-mcp` with `github:punyamsingh/docmost-mcp`. The first start is slower because it builds from source.
|
|
68
109
|
|
|
69
110
|
The client stores these values in its own config file in plain text, the same as a `.env` file would, so use a config file only you can read.
|
|
@@ -82,6 +123,8 @@ claude mcp add docmost --scope user -- node "$PWD/build/index.js"
|
|
|
82
123
|
|
|
83
124
|
`.env` is git-ignored. Variables set in the client's config take precedence over it.
|
|
84
125
|
|
|
126
|
+
`npm test` builds the server and runs the test suite against a fake Docmost, so it needs no Docmost instance.
|
|
127
|
+
|
|
85
128
|
## Limitations
|
|
86
129
|
|
|
87
130
|
- Uploading local image files is not supported yet; reference images that are already hosted somewhere by URL.
|
package/build/index.js
CHANGED
|
@@ -58,7 +58,7 @@ const pageReferenceSchema = z
|
|
|
58
58
|
.min(1)
|
|
59
59
|
.describe('Page id, slug id, or the full page URL copied from the browser.');
|
|
60
60
|
const readOnlyAnnotations = { readOnlyHint: true, openWorldHint: true };
|
|
61
|
-
const server = new McpServer({ name: 'docmost', version: '0.2.
|
|
61
|
+
const server = new McpServer({ name: 'docmost', version: '0.2.1' }, {
|
|
62
62
|
instructions: 'Docmost wiki access. Every page argument accepts a page id, slug id or page URL. Read a page with get_page before changing it. For small changes use edit_page with text copied exactly from get_page output. For whole-body rewrites use update_page with operation replace and pass the updatedAt from your read as expectedUpdatedAt. Markdown bodies must not repeat the page title as a leading # heading.',
|
|
63
63
|
});
|
|
64
64
|
server.registerTool('list_spaces', {
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@punyamsingh/docmost-mcp",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"mcpName": "io.github.punyamsingh/docmost-mcp",
|
|
5
|
+
"description": "MCP server for self-hosted Docmost: let Claude, Cursor and other AI agents read, search, create and edit wiki pages in Markdown. No Enterprise API key needed.",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "./build/index.js",
|
|
7
8
|
"bin": {
|
|
@@ -12,12 +13,32 @@
|
|
|
12
13
|
"README.md",
|
|
13
14
|
"LICENSE"
|
|
14
15
|
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js', 0o755)\"",
|
|
18
|
+
"prepare": "npm run build",
|
|
19
|
+
"start": "node build/index.js",
|
|
20
|
+
"test": "npm run build && tsc -p test && node --test \"test/*.test.ts\""
|
|
21
|
+
},
|
|
15
22
|
"keywords": [
|
|
16
23
|
"mcp",
|
|
17
|
-
"
|
|
24
|
+
"mcp-server",
|
|
18
25
|
"model-context-protocol",
|
|
26
|
+
"docmost",
|
|
27
|
+
"docmost-mcp",
|
|
28
|
+
"self-hosted",
|
|
19
29
|
"wiki",
|
|
20
|
-
"
|
|
30
|
+
"knowledge-base",
|
|
31
|
+
"documentation",
|
|
32
|
+
"markdown",
|
|
33
|
+
"claude",
|
|
34
|
+
"claude-code",
|
|
35
|
+
"claude-desktop",
|
|
36
|
+
"cursor",
|
|
37
|
+
"ai",
|
|
38
|
+
"ai-agents",
|
|
39
|
+
"llm",
|
|
40
|
+
"confluence-alternative",
|
|
41
|
+
"notion-alternative"
|
|
21
42
|
],
|
|
22
43
|
"author": "Punyam Singh",
|
|
23
44
|
"license": "MIT",
|
|
@@ -33,7 +54,7 @@
|
|
|
33
54
|
"access": "public"
|
|
34
55
|
},
|
|
35
56
|
"engines": {
|
|
36
|
-
"node": ">=
|
|
57
|
+
"node": ">=22.18.0"
|
|
37
58
|
},
|
|
38
59
|
"dependencies": {
|
|
39
60
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
@@ -42,9 +63,5 @@
|
|
|
42
63
|
"devDependencies": {
|
|
43
64
|
"@types/node": "^24.19.2",
|
|
44
65
|
"typescript": "^5.9.3"
|
|
45
|
-
},
|
|
46
|
-
"scripts": {
|
|
47
|
-
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js', 0o755)\"",
|
|
48
|
-
"start": "node build/index.js"
|
|
49
66
|
}
|
|
50
|
-
}
|
|
67
|
+
}
|