@doconda/mcp 0.0.0-stage → 0.1.0
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 +39 -2
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +8 -0
- package/dist/http.d.mts +5 -0
- package/dist/http.mjs +18 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.mjs +2 -0
- package/dist/src-BaSOMaOO.mjs +55 -0
- package/package.json +65 -3
package/README.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @doconda/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
MCP server for [Doconda](https://doconda.com): create, review and edit **Word, PowerPoint, Excel and PDF** documents from Claude Code, Claude Desktop, OpenAI Codex, Cursor or any MCP client.
|
|
4
|
+
|
|
5
|
+
## Claude Desktop, Cursor and other clients
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"mcpServers": {
|
|
10
|
+
"doconda": {
|
|
11
|
+
"command": "npx",
|
|
12
|
+
"args": ["-y", "@doconda/mcp"],
|
|
13
|
+
"env": { "DOCONDA_API_KEY": "ak_eu_…" }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Claude Code
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
claude mcp add --transport stdio --env DOCONDA_API_KEY=ak_eu_… doconda -- npx -y @doconda/mcp
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## OpenAI Codex (`~/.codex/config.toml`)
|
|
26
|
+
|
|
27
|
+
```toml
|
|
28
|
+
[mcp_servers.doconda]
|
|
29
|
+
command = "npx"
|
|
30
|
+
args = ["-y", "@doconda/mcp"]
|
|
31
|
+
env = { DOCONDA_API_KEY = "ak_eu_…" }
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Then ask: *"make an Excel with this project's costs"* or *"review this contract.docx before I send it"*.
|
|
35
|
+
|
|
36
|
+
There is also a remote server, with no install: `https://api.eu.doconda.com/mcp` (Streamable HTTP, header `Authorization: Bearer ak_eu_…`).
|
|
37
|
+
|
|
38
|
+
Tools: `create_document`, `upload_file`, `review_document`, `edit_document`, `list_documents`, `get_document`, `get_report`, `read_artifact_data`.
|
|
39
|
+
|
|
40
|
+
Docs: https://docs.doconda.com/en/agents/mcp · Get an API key: https://doconda.com
|
package/dist/cli.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/cli.mjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { t as createServer } from "./src-BaSOMaOO.mjs";
|
|
3
|
+
import { Doconda } from "@doconda/sdk";
|
|
4
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
|
+
//#region src/cli.ts
|
|
6
|
+
await createServer(new Doconda(), { localFiles: true }).connect(new StdioServerTransport());
|
|
7
|
+
//#endregion
|
|
8
|
+
export {};
|
package/dist/http.d.mts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Doconda } from "@doconda/sdk";
|
|
2
|
+
import { IncomingMessage, ServerResponse } from "node:http";
|
|
3
|
+
//#region src/http.d.ts
|
|
4
|
+
export declare function handleMcpRequest(doconda: Doconda, req: IncomingMessage, res: ServerResponse, body: unknown): Promise<void>;
|
|
5
|
+
//#endregion
|
package/dist/http.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { t as createServer } from "./src-BaSOMaOO.mjs";
|
|
2
|
+
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
3
|
+
//#region src/http.ts
|
|
4
|
+
async function handleMcpRequest(doconda, req, res, body) {
|
|
5
|
+
const server = createServer(doconda);
|
|
6
|
+
const transport = new StreamableHTTPServerTransport({
|
|
7
|
+
sessionIdGenerator: void 0,
|
|
8
|
+
enableJsonResponse: true
|
|
9
|
+
});
|
|
10
|
+
res.on("close", () => {
|
|
11
|
+
transport.close();
|
|
12
|
+
server.close();
|
|
13
|
+
});
|
|
14
|
+
await server.connect(transport);
|
|
15
|
+
await transport.handleRequest(req, res, body);
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { handleMcpRequest };
|
package/dist/index.d.mts
ADDED
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import { DocondaError } from "@doconda/sdk";
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
function createServer(doconda, options = {}) {
|
|
6
|
+
const tools = doconda.tools(options);
|
|
7
|
+
const server = new Server({
|
|
8
|
+
name: "doconda",
|
|
9
|
+
version: "0.1.0"
|
|
10
|
+
}, {
|
|
11
|
+
capabilities: { tools: {} },
|
|
12
|
+
instructions: "Doconda creates, reviews and edits documents (Word, PDF, PowerPoint, Excel) and artifacts (web pages with shared data). Share the links it returns with the user; they expire, so call get_document for fresh ones."
|
|
13
|
+
});
|
|
14
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: tools.map(({ name, description, inputSchema }) => ({
|
|
15
|
+
name,
|
|
16
|
+
description,
|
|
17
|
+
inputSchema
|
|
18
|
+
})) }));
|
|
19
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
20
|
+
const tool = tools.find((t) => t.name === request.params.name);
|
|
21
|
+
if (!tool) return {
|
|
22
|
+
isError: true,
|
|
23
|
+
content: [{
|
|
24
|
+
type: "text",
|
|
25
|
+
text: `Unknown tool ${request.params.name}.`
|
|
26
|
+
}]
|
|
27
|
+
};
|
|
28
|
+
try {
|
|
29
|
+
const result = await tool.run(request.params.arguments ?? {});
|
|
30
|
+
return { content: [{
|
|
31
|
+
type: "text",
|
|
32
|
+
text: JSON.stringify(result, null, 2)
|
|
33
|
+
}] };
|
|
34
|
+
} catch (err) {
|
|
35
|
+
const e = err instanceof DocondaError ? {
|
|
36
|
+
error: err.code,
|
|
37
|
+
message: err.message,
|
|
38
|
+
fields: err.errors
|
|
39
|
+
} : {
|
|
40
|
+
error: "failed",
|
|
41
|
+
message: String(err?.message ?? err)
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
isError: true,
|
|
45
|
+
content: [{
|
|
46
|
+
type: "text",
|
|
47
|
+
text: JSON.stringify(e)
|
|
48
|
+
}]
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return server;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { createServer as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doconda/mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Doconda MCP server: create, review and edit Word, PowerPoint, Excel and PDF documents from Claude Code, Codex, Cursor and any MCP client.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"docx",
|
|
7
|
+
"pptx",
|
|
8
|
+
"xlsx",
|
|
9
|
+
"pdf",
|
|
10
|
+
"word",
|
|
11
|
+
"powerpoint",
|
|
12
|
+
"excel",
|
|
13
|
+
"document-generation",
|
|
14
|
+
"ai-agents",
|
|
15
|
+
"llm",
|
|
16
|
+
"tools",
|
|
17
|
+
"ai-sdk",
|
|
18
|
+
"openai",
|
|
19
|
+
"anthropic",
|
|
20
|
+
"bedrock",
|
|
21
|
+
"vertex-ai",
|
|
22
|
+
"mcp",
|
|
23
|
+
"model-context-protocol",
|
|
24
|
+
"claude-code",
|
|
25
|
+
"cursor",
|
|
26
|
+
"codex"
|
|
27
|
+
],
|
|
28
|
+
"homepage": "https://doconda.com",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/B-C-Software/doconda.git",
|
|
32
|
+
"directory": "packages/mcp"
|
|
33
|
+
},
|
|
34
|
+
"type": "module",
|
|
35
|
+
"bin": {
|
|
36
|
+
"doconda-mcp": "./dist/cli.mjs"
|
|
37
|
+
},
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./dist/index.d.mts",
|
|
41
|
+
"default": "./dist/index.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./http": {
|
|
44
|
+
"types": "./dist/http.d.mts",
|
|
45
|
+
"default": "./dist/http.mjs"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
50
|
+
"zod": "^4.5.4",
|
|
51
|
+
"@doconda/sdk": "0.1.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^26.6.3",
|
|
55
|
+
"typescript": "~6.0.3"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"dist"
|
|
59
|
+
],
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"test": "node --test 'src/**/*.test.ts'",
|
|
65
|
+
"typecheck": "tsc --noEmit",
|
|
66
|
+
"build": "tsdown"
|
|
67
|
+
}
|
|
6
68
|
}
|