aiquila-mcp 0.4.8 → 0.4.10
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 +85 -59
- package/dist/client/ocs.js +4 -6
- package/dist/tools/apps/talk.js +7 -2
- package/package.json +19 -10
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# AIquila MCP Server
|
|
2
2
|
|
|
3
|
-
MCP (Model Context Protocol) server that gives any MCP client full access to your Nextcloud instance — files, calendar, tasks, contacts, mail, talk, maps, bookmarks, notes, polls, forms, and more.
|
|
3
|
+
MCP (Model Context Protocol) server that gives any MCP client full access to your Nextcloud instance — files, calendar, tasks, contacts, mail, talk, maps, bookmarks, notes, polls, forms, and more. 311 tools across 43 categories.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
|
-
### Stdio (
|
|
7
|
+
### Stdio transport (local MCP clients)
|
|
8
8
|
|
|
9
|
-
Add to your MCP client configuration
|
|
9
|
+
Add to your MCP client configuration. Example for Claude Desktop (`~/.config/claude/claude_desktop_config.json`); Claude Code, Cursor and VS Code use the same server definition in their own config files:
|
|
10
10
|
|
|
11
11
|
```json
|
|
12
12
|
{
|
|
@@ -26,79 +26,105 @@ Add to your MCP client configuration (example for Claude Desktop `~/.config/clau
|
|
|
26
26
|
|
|
27
27
|
Generate an App Password in Nextcloud: **Settings → Security → Devices & sessions**.
|
|
28
28
|
|
|
29
|
-
### HTTP
|
|
29
|
+
### HTTP transport (Docker, remote MCP clients)
|
|
30
30
|
|
|
31
|
-
See the [Docker setup guide](https://github.com/elgorro/aiquila/blob/main/docs/mcp/setup.md#docker--claudeai-http-transport) for running AIquila as an HTTP server with OAuth for remote MCP clients.
|
|
31
|
+
See the [Docker setup guide](https://github.com/elgorro/aiquila/blob/main/docs/mcp/setup.md#docker--claudeai-http-transport) for running AIquila as an HTTP server with OAuth for remote MCP clients such as Claude.ai.
|
|
32
|
+
|
|
33
|
+
### Which AI model does this use?
|
|
34
|
+
|
|
35
|
+
None. This server has no model of its own and no provider setting — it exposes your
|
|
36
|
+
Nextcloud to whatever MCP client you point at it, and that client brings its own model.
|
|
37
|
+
Provider choice (Claude, Hetzner Inference, Mistral, a local model, DeepSeek) belongs to
|
|
38
|
+
the [AIquila Nextcloud app](https://github.com/elgorro/aiquila/blob/main/docs/installation/aiquila-setup.md), which is a separate component.
|
|
32
39
|
|
|
33
40
|
## What It Can Do
|
|
34
41
|
|
|
35
42
|
### Core (always available)
|
|
36
43
|
|
|
37
|
-
| Category
|
|
38
|
-
|
|
|
39
|
-
| Files
|
|
40
|
-
|
|
|
41
|
-
| Apps
|
|
42
|
-
| Tags
|
|
43
|
-
|
|
|
44
|
-
| Users
|
|
45
|
-
| Groups
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
44
|
+
| Category | Tools |
|
|
45
|
+
| ------------- | ----: |
|
|
46
|
+
| Files | 15 |
|
|
47
|
+
| Shares | 10 |
|
|
48
|
+
| Apps | 6 |
|
|
49
|
+
| Tags | 6 |
|
|
50
|
+
| User Status | 5 |
|
|
51
|
+
| Users | 4 |
|
|
52
|
+
| Groups | 4 |
|
|
53
|
+
| Notifications | 4 |
|
|
54
|
+
| Status | 3 |
|
|
55
|
+
| Absence | 3 |
|
|
56
|
+
| Trash | 3 |
|
|
57
|
+
| Search | 2 |
|
|
58
|
+
| Versions | 2 |
|
|
59
|
+
| Activity | 2 |
|
|
60
|
+
| **Subtotal** | **69** |
|
|
50
61
|
|
|
51
62
|
### AIquila app
|
|
52
63
|
|
|
53
|
-
| Category
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
64
|
+
| Category | Tools |
|
|
65
|
+
| ------------ | ----: |
|
|
66
|
+
| Projects | 7 |
|
|
67
|
+
| Cowork | 7 |
|
|
68
|
+
| AIquila | 3 |
|
|
69
|
+
| Security | 2 |
|
|
70
|
+
| OCC | 1 |
|
|
71
|
+
| **Subtotal** | **20** |
|
|
59
72
|
|
|
60
73
|
### Optional Nextcloud apps
|
|
61
74
|
|
|
62
|
-
| Category
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
| Deck
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
75
|
+
| Category | Tools |
|
|
76
|
+
| ---------------- | ----: |
|
|
77
|
+
| Maps | 40 |
|
|
78
|
+
| Forms | 25 |
|
|
79
|
+
| Polls | 21 |
|
|
80
|
+
| News | 17 |
|
|
81
|
+
| Bookmarks | 13 |
|
|
82
|
+
| Deck | 12 |
|
|
83
|
+
| Photos | 11 |
|
|
84
|
+
| Mail | 10 |
|
|
85
|
+
| Talk | 10 |
|
|
86
|
+
| Circles | 8 |
|
|
87
|
+
| Calendar | 6 |
|
|
88
|
+
| Tasks | 6 |
|
|
89
|
+
| Contacts | 6 |
|
|
90
|
+
| Cookbook | 6 |
|
|
91
|
+
| Notes | 5 |
|
|
92
|
+
| Text | 5 |
|
|
93
|
+
| Terms of Service | 5 |
|
|
94
|
+
| Assistant | 4 |
|
|
95
|
+
| Announcements | 3 |
|
|
96
|
+
| Passman | 3 |
|
|
97
|
+
| Registration | 3 |
|
|
98
|
+
| Translate | 1 |
|
|
99
|
+
| Social Sharing | 1 |
|
|
100
|
+
| Recommendations | 1 |
|
|
101
|
+
| **Subtotal** | **222** |
|
|
102
|
+
|
|
103
|
+
**Total: 311 tools.**
|
|
83
104
|
|
|
84
105
|
## Configuration
|
|
85
106
|
|
|
86
|
-
| Variable
|
|
87
|
-
|
|
|
88
|
-
| `NEXTCLOUD_URL`
|
|
89
|
-
| `NEXTCLOUD_USER`
|
|
90
|
-
| `NEXTCLOUD_PASSWORD`
|
|
91
|
-
| `MCP_TRANSPORT`
|
|
92
|
-
| `MCP_AUTH_ENABLED`
|
|
93
|
-
| `MCP_AUTH_SECRET`
|
|
94
|
-
| `MCP_AUTH_ISSUER`
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
107
|
+
| Variable | Required | Notes |
|
|
108
|
+
| ---------------------- | -------- | ------------------------------------------------------------------------------------- |
|
|
109
|
+
| `NEXTCLOUD_URL` | Yes | trailing slash stripped automatically |
|
|
110
|
+
| `NEXTCLOUD_USER` | Yes | |
|
|
111
|
+
| `NEXTCLOUD_PASSWORD` | Yes | use an App Password |
|
|
112
|
+
| `MCP_TRANSPORT` | No | `stdio` (default) or `http` |
|
|
113
|
+
| `MCP_AUTH_ENABLED` | No | `true` to enable OAuth for remote clients |
|
|
114
|
+
| `MCP_AUTH_SECRET` | If auth | `openssl rand -hex 32` |
|
|
115
|
+
| `MCP_AUTH_ISSUER` | If auth | public HTTPS URL of this server |
|
|
116
|
+
| `MCP_AUTH_STATE_DIR` | No | directory for persisted OAuth state (default `/app/state`) |
|
|
117
|
+
| `MCP_LAZY_AUTH` | No | `false` requires a bearer token on every JSON-RPC method (default `true`) |
|
|
118
|
+
| `MCP_LOCALE` | No | BCP 47 locale tag for `get_local_time` (e.g. `sv-SE`); defaults to the system locale |
|
|
119
|
+
| `MCP_MAX_FILE_SIZE` | No | max `write_file` content length in bytes (default `1073741824` = 1 GB) |
|
|
120
|
+
| `MCP_ALLOWED_HOSTS` | No | extra hostnames for DNS rebinding protection |
|
|
121
|
+
| `MCP_CORS_ORIGINS` | No | extra browser origins allowed via CORS |
|
|
122
|
+
| `MCP_OCC_ALLOWLIST` | No | allowed OCC commands for `run_occ`; overrides the default allowlist |
|
|
123
|
+
| `LOG_LEVEL` | No | `trace`/`debug`/`info`/`warn`/`error`/`fatal` |
|
|
98
124
|
|
|
99
125
|
## Requirements
|
|
100
126
|
|
|
101
|
-
- Node.js
|
|
127
|
+
- Node.js 26+
|
|
102
128
|
- A Nextcloud instance with an App Password
|
|
103
129
|
|
|
104
130
|
Optional Nextcloud apps unlock additional tool categories: Tasks, Calendar, Contacts, Notes, Cookbook, Deck, Bookmarks, Mail, Maps, Photos, Talk, Circles, and more.
|
|
@@ -106,7 +132,7 @@ Optional Nextcloud apps unlock additional tool categories: Tasks, Calendar, Cont
|
|
|
106
132
|
## Documentation
|
|
107
133
|
|
|
108
134
|
- [Setup Guide](https://github.com/elgorro/aiquila/blob/main/docs/mcp/setup.md) — detailed installation and configuration
|
|
109
|
-
- [Tools Reference](https://github.com/elgorro/aiquila/blob/main/docs/mcp/README.md) —
|
|
135
|
+
- [Tools Reference](https://github.com/elgorro/aiquila/blob/main/docs/mcp/README.md) — the full tool catalogue
|
|
110
136
|
- [Architecture](https://github.com/elgorro/aiquila/blob/main/docs/dev/mcp-server-architecture.md) — design and internals
|
|
111
137
|
- [Full Documentation](https://github.com/elgorro/aiquila/blob/main/docs/) — complete docs index
|
|
112
138
|
|
package/dist/client/ocs.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
import { getNextcloudConfig } from '../tools/types.js';
|
|
3
3
|
import { logger } from '../logger.js';
|
|
4
|
-
/**
|
|
5
|
-
* Make an authenticated request to the Nextcloud OCS API.
|
|
6
|
-
*
|
|
7
|
-
* Handles Basic Auth, required OCS headers, URL-encoded bodies,
|
|
8
|
-
* query parameters, and dual error checking (HTTP + OCS status).
|
|
9
|
-
*/
|
|
10
4
|
export async function fetchOCS(path, options = {}) {
|
|
11
5
|
const config = getNextcloudConfig();
|
|
12
6
|
const auth = Buffer.from(`${config.user}:${config.password}`).toString('base64');
|
|
@@ -46,6 +40,10 @@ export async function fetchOCS(path, options = {}) {
|
|
|
46
40
|
});
|
|
47
41
|
logger.trace({ method: options.method || 'GET', url, status: response.status, ms: Date.now() - t0 }, '[nc] HTTP');
|
|
48
42
|
if (!response.ok) {
|
|
43
|
+
if (response.status === 304 && options.allowNotModified) {
|
|
44
|
+
// 304 carries an empty body; the caller asked to read it as "no data".
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
49
47
|
if (response.status === 403) {
|
|
50
48
|
throw new Error('Permission denied. This operation requires admin or sub-admin privileges. ' +
|
|
51
49
|
'Ensure the configured Nextcloud user has sufficient permissions.');
|
package/dist/tools/apps/talk.js
CHANGED
|
@@ -136,8 +136,13 @@ export const listMessagesTool = {
|
|
|
136
136
|
if (args.lastKnownMessageId) {
|
|
137
137
|
queryParams.lastKnownMessageId = String(args.lastKnownMessageId);
|
|
138
138
|
}
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
// Talk answers 304 Not Modified when no further messages are available,
|
|
140
|
+
// which is a normal end-of-pagination result rather than a failure.
|
|
141
|
+
const data = await fetchOCS(`${API_V1}/chat/${args.token}`, {
|
|
142
|
+
queryParams,
|
|
143
|
+
allowNotModified: true,
|
|
144
|
+
});
|
|
145
|
+
let messages = data?.ocs.data ?? [];
|
|
141
146
|
if (!args.includeSystemMessages) {
|
|
142
147
|
messages = messages.filter((m) => !m.systemMessage);
|
|
143
148
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiquila-mcp",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "Nextcloud MCP server — files, calendar, contacts, mail, maps, notes, tasks
|
|
3
|
+
"version": "0.4.10",
|
|
4
|
+
"description": "Nextcloud MCP server — 311 tools for files, calendar, contacts, mail, maps, notes, tasks and more",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -21,9 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"mcp",
|
|
24
|
+
"mcp-server",
|
|
24
25
|
"model-context-protocol",
|
|
25
26
|
"nextcloud",
|
|
26
27
|
"claude",
|
|
28
|
+
"mistral",
|
|
29
|
+
"deepseek",
|
|
30
|
+
"ollama",
|
|
31
|
+
"llm",
|
|
27
32
|
"ai",
|
|
28
33
|
"aiquila",
|
|
29
34
|
"webdav",
|
|
@@ -31,6 +36,10 @@
|
|
|
31
36
|
"carddav",
|
|
32
37
|
"self-hosted"
|
|
33
38
|
],
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=26.0.0",
|
|
41
|
+
"npm": ">=11.0.0"
|
|
42
|
+
},
|
|
34
43
|
"author": "sirgorro",
|
|
35
44
|
"license": "MIT",
|
|
36
45
|
"repository": {
|
|
@@ -44,23 +53,23 @@
|
|
|
44
53
|
"overrides": {
|
|
45
54
|
"brace-expansion": "^2.0.3",
|
|
46
55
|
"esbuild": ">=0.28.1",
|
|
47
|
-
"hono": "^4.
|
|
56
|
+
"hono": "^4.13.7"
|
|
48
57
|
},
|
|
49
58
|
"dependencies": {
|
|
50
59
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
51
|
-
"jose": "^6.2.
|
|
60
|
+
"jose": "^6.2.12",
|
|
52
61
|
"pino": "^10.3.1",
|
|
53
62
|
"webdav": "^5.10.0",
|
|
54
|
-
"zod": "^4.
|
|
63
|
+
"zod": "^4.6.2"
|
|
55
64
|
},
|
|
56
65
|
"devDependencies": {
|
|
57
66
|
"@eslint/js": "^10.0.1",
|
|
58
|
-
"@types/node": "^26.
|
|
59
|
-
"eslint": "^10.
|
|
67
|
+
"@types/node": "^26.5.1",
|
|
68
|
+
"eslint": "^10.10.0",
|
|
60
69
|
"prettier": "^3.9.6",
|
|
61
|
-
"tsx": "^4.23.
|
|
70
|
+
"tsx": "^4.23.13",
|
|
62
71
|
"typescript": "^5.9.3",
|
|
63
|
-
"typescript-eslint": "^8.
|
|
64
|
-
"vitest": "^
|
|
72
|
+
"typescript-eslint": "^8.70.0",
|
|
73
|
+
"vitest": "^5.0.0"
|
|
65
74
|
}
|
|
66
75
|
}
|