@jullury/shoanta-mcp 0.1.0 → 0.2.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 +11 -11
- package/dist/index.mjs +44 -44
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Shoanta MCP Server
|
|
2
2
|
|
|
3
3
|
A **stdio-based MCP (Model Context Protocol) server** that lets any AI agent
|
|
4
|
-
(Claude, opencode, Cursor, Windsurf, etc.) read and update Shoanta
|
|
4
|
+
(Claude, opencode, Cursor, Windsurf, etc.) read and update Shoanta documents
|
|
5
5
|
through the Shoanta REST API (`/api/v1`).
|
|
6
6
|
|
|
7
7
|
The MCP server is a thin proxy: it calls the Shoanta HTTP API using a
|
|
@@ -44,16 +44,16 @@ node dist/index.mjs
|
|
|
44
44
|
|
|
45
45
|
## Tools
|
|
46
46
|
|
|
47
|
-
| Tool
|
|
48
|
-
|
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `list_comments`
|
|
56
|
-
| `add_comment`
|
|
47
|
+
| Tool | Description |
|
|
48
|
+
| ---------------------- | ------------------------------------------------- |
|
|
49
|
+
| `list_collections` | List all collections (databases) in the workspace |
|
|
50
|
+
| `list_documents` | List all documents in a collection |
|
|
51
|
+
| `get_document` | Get one document by ID (with property values) |
|
|
52
|
+
| `create_document` | Create a document in a collection |
|
|
53
|
+
| `update_document` | Update title, content, and/or property values |
|
|
54
|
+
| `delete_document` | Delete a document (or archive with `archive: true`) |
|
|
55
|
+
| `list_comments` | List comments on a document |
|
|
56
|
+
| `add_comment` | Add a comment to a document |
|
|
57
57
|
|
|
58
58
|
## Connecting an agent
|
|
59
59
|
|
package/dist/index.mjs
CHANGED
|
@@ -35525,7 +35525,7 @@ async function api(path, init = {}) {
|
|
|
35525
35525
|
}
|
|
35526
35526
|
var server = new McpServer({
|
|
35527
35527
|
name: "shoanta",
|
|
35528
|
-
version: "0.
|
|
35528
|
+
version: "0.2.0"
|
|
35529
35529
|
});
|
|
35530
35530
|
var propertiesSchema = external_exports.record(
|
|
35531
35531
|
external_exports.union([
|
|
@@ -35539,10 +35539,10 @@ var propertiesSchema = external_exports.record(
|
|
|
35539
35539
|
'Property values keyed by property name, e.g. {"Status":"Done","Priority":"High"}'
|
|
35540
35540
|
);
|
|
35541
35541
|
server.registerTool(
|
|
35542
|
-
"
|
|
35542
|
+
"list_collections",
|
|
35543
35543
|
{
|
|
35544
|
-
title: "List
|
|
35545
|
-
description: "List all
|
|
35544
|
+
title: "List collections",
|
|
35545
|
+
description: "List all collections (databases) in the Shoanta workspace."
|
|
35546
35546
|
},
|
|
35547
35547
|
async () => {
|
|
35548
35548
|
const data = await api("/databases");
|
|
@@ -35552,17 +35552,17 @@ server.registerTool(
|
|
|
35552
35552
|
}
|
|
35553
35553
|
);
|
|
35554
35554
|
server.registerTool(
|
|
35555
|
-
"
|
|
35555
|
+
"list_documents",
|
|
35556
35556
|
{
|
|
35557
|
-
title: "List
|
|
35558
|
-
description: "List all
|
|
35557
|
+
title: "List documents",
|
|
35558
|
+
description: "List all documents in a collection.",
|
|
35559
35559
|
inputSchema: {
|
|
35560
|
-
|
|
35560
|
+
collectionId: external_exports.string().describe("ID of the collection (database)")
|
|
35561
35561
|
}
|
|
35562
35562
|
},
|
|
35563
|
-
async ({
|
|
35563
|
+
async ({ collectionId }) => {
|
|
35564
35564
|
const data = await api(
|
|
35565
|
-
`/databases/${
|
|
35565
|
+
`/databases/${collectionId}/tickets`
|
|
35566
35566
|
);
|
|
35567
35567
|
return {
|
|
35568
35568
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
@@ -35570,36 +35570,36 @@ server.registerTool(
|
|
|
35570
35570
|
}
|
|
35571
35571
|
);
|
|
35572
35572
|
server.registerTool(
|
|
35573
|
-
"
|
|
35573
|
+
"get_document",
|
|
35574
35574
|
{
|
|
35575
|
-
title: "Get
|
|
35576
|
-
description: "Get a single
|
|
35575
|
+
title: "Get document",
|
|
35576
|
+
description: "Get a single document by ID, including its property values.",
|
|
35577
35577
|
inputSchema: {
|
|
35578
|
-
|
|
35578
|
+
documentId: external_exports.string().describe("Document ID")
|
|
35579
35579
|
}
|
|
35580
35580
|
},
|
|
35581
|
-
async ({
|
|
35582
|
-
const data = await api(`/tickets/${
|
|
35581
|
+
async ({ documentId }) => {
|
|
35582
|
+
const data = await api(`/tickets/${documentId}`);
|
|
35583
35583
|
return {
|
|
35584
35584
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
35585
35585
|
};
|
|
35586
35586
|
}
|
|
35587
35587
|
);
|
|
35588
35588
|
server.registerTool(
|
|
35589
|
-
"
|
|
35589
|
+
"create_document",
|
|
35590
35590
|
{
|
|
35591
|
-
title: "Create
|
|
35592
|
-
description: "Create a new
|
|
35591
|
+
title: "Create document",
|
|
35592
|
+
description: "Create a new document in a collection.",
|
|
35593
35593
|
inputSchema: {
|
|
35594
|
-
|
|
35595
|
-
title: external_exports.string().describe("
|
|
35596
|
-
content: external_exports.string().optional().describe("
|
|
35594
|
+
collectionId: external_exports.string().describe("ID of the collection (database)"),
|
|
35595
|
+
title: external_exports.string().describe("Document title"),
|
|
35596
|
+
content: external_exports.string().optional().describe("Document content (markdown)"),
|
|
35597
35597
|
properties: propertiesSchema.optional()
|
|
35598
35598
|
}
|
|
35599
35599
|
},
|
|
35600
|
-
async ({
|
|
35600
|
+
async ({ collectionId, title, content, properties }) => {
|
|
35601
35601
|
const data = await api(
|
|
35602
|
-
`/databases/${
|
|
35602
|
+
`/databases/${collectionId}/tickets`,
|
|
35603
35603
|
{
|
|
35604
35604
|
method: "POST",
|
|
35605
35605
|
body: JSON.stringify({ title, content, properties })
|
|
@@ -35611,23 +35611,23 @@ server.registerTool(
|
|
|
35611
35611
|
}
|
|
35612
35612
|
);
|
|
35613
35613
|
server.registerTool(
|
|
35614
|
-
"
|
|
35614
|
+
"update_document",
|
|
35615
35615
|
{
|
|
35616
|
-
title: "Update
|
|
35617
|
-
description: "Update
|
|
35616
|
+
title: "Update document",
|
|
35617
|
+
description: "Update document title, content, and/or property values. Only provided fields are changed.",
|
|
35618
35618
|
inputSchema: {
|
|
35619
|
-
|
|
35619
|
+
documentId: external_exports.string().describe("Document ID"),
|
|
35620
35620
|
title: external_exports.string().optional().describe("New title"),
|
|
35621
35621
|
content: external_exports.string().optional().describe("New content (markdown)"),
|
|
35622
35622
|
properties: propertiesSchema.optional()
|
|
35623
35623
|
}
|
|
35624
35624
|
},
|
|
35625
|
-
async ({
|
|
35625
|
+
async ({ documentId, title, content, properties }) => {
|
|
35626
35626
|
const body = {};
|
|
35627
35627
|
if (title !== void 0) body.title = title;
|
|
35628
35628
|
if (content !== void 0) body.content = content;
|
|
35629
35629
|
if (properties !== void 0) body.properties = properties;
|
|
35630
|
-
const data = await api(`/tickets/${
|
|
35630
|
+
const data = await api(`/tickets/${documentId}`, {
|
|
35631
35631
|
method: "PATCH",
|
|
35632
35632
|
body: JSON.stringify(body)
|
|
35633
35633
|
});
|
|
@@ -35637,18 +35637,18 @@ server.registerTool(
|
|
|
35637
35637
|
}
|
|
35638
35638
|
);
|
|
35639
35639
|
server.registerTool(
|
|
35640
|
-
"
|
|
35640
|
+
"delete_document",
|
|
35641
35641
|
{
|
|
35642
|
-
title: "Delete
|
|
35643
|
-
description: "Delete a
|
|
35642
|
+
title: "Delete document",
|
|
35643
|
+
description: "Delete a document. If archive is true, it is moved to trash instead of being permanently deleted.",
|
|
35644
35644
|
inputSchema: {
|
|
35645
|
-
|
|
35645
|
+
documentId: external_exports.string().describe("Document ID"),
|
|
35646
35646
|
archive: external_exports.boolean().optional().describe("Archive instead of hard-delete")
|
|
35647
35647
|
}
|
|
35648
35648
|
},
|
|
35649
|
-
async ({
|
|
35649
|
+
async ({ documentId, archive }) => {
|
|
35650
35650
|
const qs = archive ? "?archive=true" : "";
|
|
35651
|
-
const data = await api(`/tickets/${
|
|
35651
|
+
const data = await api(`/tickets/${documentId}${qs}`, {
|
|
35652
35652
|
method: "DELETE"
|
|
35653
35653
|
});
|
|
35654
35654
|
return {
|
|
@@ -35660,14 +35660,14 @@ server.registerTool(
|
|
|
35660
35660
|
"list_comments",
|
|
35661
35661
|
{
|
|
35662
35662
|
title: "List comments",
|
|
35663
|
-
description: "List comments on a
|
|
35663
|
+
description: "List comments on a document.",
|
|
35664
35664
|
inputSchema: {
|
|
35665
|
-
|
|
35665
|
+
documentId: external_exports.string().describe("Document ID")
|
|
35666
35666
|
}
|
|
35667
35667
|
},
|
|
35668
|
-
async ({
|
|
35668
|
+
async ({ documentId }) => {
|
|
35669
35669
|
const data = await api(
|
|
35670
|
-
`/tickets/${
|
|
35670
|
+
`/tickets/${documentId}/comments`
|
|
35671
35671
|
);
|
|
35672
35672
|
return {
|
|
35673
35673
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
@@ -35678,15 +35678,15 @@ server.registerTool(
|
|
|
35678
35678
|
"add_comment",
|
|
35679
35679
|
{
|
|
35680
35680
|
title: "Add comment",
|
|
35681
|
-
description: "Add a comment to a
|
|
35681
|
+
description: "Add a comment to a document.",
|
|
35682
35682
|
inputSchema: {
|
|
35683
|
-
|
|
35683
|
+
documentId: external_exports.string().describe("Document ID"),
|
|
35684
35684
|
body: external_exports.string().describe("Comment body")
|
|
35685
35685
|
}
|
|
35686
35686
|
},
|
|
35687
|
-
async ({
|
|
35687
|
+
async ({ documentId, body }) => {
|
|
35688
35688
|
const data = await api(
|
|
35689
|
-
`/tickets/${
|
|
35689
|
+
`/tickets/${documentId}/comments`,
|
|
35690
35690
|
{
|
|
35691
35691
|
method: "POST",
|
|
35692
35692
|
body: JSON.stringify({ body })
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jullury/shoanta-mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server that lets AI agents read/update Shoanta
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "MCP server that lets AI agents read/update Shoanta documents and collections via the Shoanta REST API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
7
7
|
"exports": {
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"mcp",
|
|
24
24
|
"model-context-protocol",
|
|
25
25
|
"shoanta",
|
|
26
|
-
"
|
|
26
|
+
"documents",
|
|
27
|
+
"collections",
|
|
27
28
|
"ai",
|
|
28
29
|
"agent"
|
|
29
30
|
],
|