bach-egnyte-mcp 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.
Files changed (3) hide show
  1. package/README.md +27 -0
  2. package/index.js +73 -0
  3. package/package.json +30 -0
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # bach-egnyte-mcp
2
+
3
+ Mock Egnyte document MCP server. Search and fetch document content.
4
+
5
+ > **Note:** This is a MOCK MCP server by **bachstudio**. It returns sample/fake data and does not connect to Egnyte. Intended for prototyping and demos.
6
+
7
+ ## Tools
8
+
9
+ - `search_documents` — Search documents by keyword
10
+ - `get_document` — Get extracted text of a document
11
+
12
+ ## Usage (stdio MCP)
13
+
14
+ ```json
15
+ {
16
+ "mcpServers": {
17
+ "egnyte": {
18
+ "command": "npx",
19
+ "args": ["-y", "bach-egnyte-mcp"]
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ ## License
26
+
27
+ MIT © bachstudio
package/index.js ADDED
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprotocol/sdk/types.js";
5
+
6
+ const TOOLS = [
7
+ {
8
+ "name": "search_documents",
9
+ "description": "Search documents by keyword",
10
+ "inputSchema": {
11
+ "type": "object",
12
+ "properties": {
13
+ "query": {
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "query"
19
+ ]
20
+ },
21
+ "result": {
22
+ "results": [
23
+ {
24
+ "id": "d1",
25
+ "name": "Vendor_SOW_2026.docx",
26
+ "path": "/Shared/Legal/Vendor_SOW_2026.docx"
27
+ }
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "name": "get_document",
33
+ "description": "Get extracted text of a document",
34
+ "inputSchema": {
35
+ "type": "object",
36
+ "properties": {
37
+ "doc_id": {
38
+ "type": "string"
39
+ }
40
+ },
41
+ "required": [
42
+ "doc_id"
43
+ ]
44
+ },
45
+ "result": {
46
+ "id": "d1",
47
+ "name": "Vendor_SOW_2026.docx",
48
+ "text": "STATEMENT OF WORK ... Deliverables ... Payment: net 30 ..."
49
+ }
50
+ }
51
+ ];
52
+
53
+ const server = new Server(
54
+ { name: "bach-egnyte-mcp", version: "0.1.0" },
55
+ { capabilities: { tools: {} } }
56
+ );
57
+
58
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
59
+ tools: TOOLS.map(({ name, description, inputSchema }) => ({ name, description, inputSchema })),
60
+ }));
61
+
62
+ server.setRequestHandler(CallToolRequestSchema, async (req) => {
63
+ const tool = TOOLS.find((t) => t.name === req.params.name);
64
+ if (!tool) {
65
+ return { isError: true, content: [{ type: "text", text: "Unknown tool: " + req.params.name }] };
66
+ }
67
+ const payload = { tool: tool.name, args: req.params.arguments || {}, data: tool.result, _note: "MOCK DATA from Egnyte (mock)" };
68
+ return { content: [{ type: "text", text: JSON.stringify(payload, null, 2) }] };
69
+ });
70
+
71
+ const transport = new StdioServerTransport();
72
+ await server.connect(transport);
73
+ console.error("Egnyte (mock)" + " MCP server (mock) running on stdio");
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "bach-egnyte-mcp",
3
+ "version": "0.1.0",
4
+ "description": "Mock Egnyte document MCP server. Search and fetch document content.",
5
+ "type": "module",
6
+ "bin": {
7
+ "bach-egnyte-mcp": "index.js"
8
+ },
9
+ "main": "index.js",
10
+ "files": [
11
+ "index.js",
12
+ "README.md"
13
+ ],
14
+ "engines": {
15
+ "node": ">=18"
16
+ },
17
+ "keywords": [
18
+ "mcp",
19
+ "modelcontextprotocol",
20
+ "bach",
21
+ "bachstudio",
22
+ "mock",
23
+ "egnyte"
24
+ ],
25
+ "author": "bachstudio",
26
+ "license": "MIT",
27
+ "dependencies": {
28
+ "@modelcontextprotocol/sdk": "^1.29.0"
29
+ }
30
+ }