@webapper/cloudsee-drive-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.
- package/CHANGELOG.md +34 -0
- package/LICENSE +21 -0
- package/README.md +146 -0
- package/contract/registry.snapshot.json +542 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +861 -0
- package/dist/index.js.map +1 -0
- package/package.json +79 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. This file is managed by
|
|
4
|
+
[semantic-release](https://semantic-release.gitbook.io/) from
|
|
5
|
+
[Conventional Commits](https://www.conventionalcommits.org/) once releasing begins.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Initial CloudSee Drive MCP server (CSD-586, Phase 2).
|
|
12
|
+
- Stdio MCP server exposing **16 tools** across read / download / write:
|
|
13
|
+
`list_buckets`, `browse_folder`, `search_files`, `recent_files`, `get_file_metadata`,
|
|
14
|
+
`get_file_tags`, `download_file`, `share_link`, `upload_file`, `create_folder`,
|
|
15
|
+
`rename_file`, `move_file`, `duplicate_file`, `delete_files`, `update_metadata`,
|
|
16
|
+
`restore_archived_file`.
|
|
17
|
+
- Typed `CloudSeeClient` over the `drive-bridge` `/v1/*` data plane: `X-Api-Key-Id` /
|
|
18
|
+
`X-Api-Key-Secret` auth, envelope unwrapping, retry with backoff + `Retry-After`, and
|
|
19
|
+
secret-safe error handling.
|
|
20
|
+
- Opaque, dialect-tagged pagination cursors normalizing the API's `nextPage` / `marker` /
|
|
21
|
+
`lastEvaluatedKey` / `pageToken` / `nextToken` families.
|
|
22
|
+
- Two-step confirmation guardrail (`confirm: true`) on destructive tools, with
|
|
23
|
+
`destructiveHint` annotations.
|
|
24
|
+
- Tool↔contract drift test gating the build against a committed snapshot of the API surface.
|
|
25
|
+
- OSS scaffolding: MIT license, README quickstart, contributing/security docs, GitHub Actions
|
|
26
|
+
CI (lint/typecheck/test/build/smoke on macOS/Linux/Windows × Node 18/20), and a
|
|
27
|
+
semantic-release publish workflow.
|
|
28
|
+
|
|
29
|
+
### Notes
|
|
30
|
+
|
|
31
|
+
- Write/delete/share tools are present but their end-to-end authorization is **sequenced
|
|
32
|
+
behind the gateway's RBAC wiring (CSD-572)**.
|
|
33
|
+
- `upload_file` supports single-file uploads up to 8 MiB (multipart planned);
|
|
34
|
+
`search_files` is single-folder (non-recursive).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Webapper
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# CloudSee Drive MCP server
|
|
2
|
+
|
|
3
|
+
[](https://github.com/webapper/cloudsee-drive-mcp/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@webapper/cloudsee-drive-mcp)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
An open-source [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for
|
|
8
|
+
**[CloudSee Drive](https://www.cloudsee.cloud)** — connect your CloudSee account (a browser
|
|
9
|
+
interface for Amazon S3) to Claude Desktop and any MCP-compatible client, and manage your
|
|
10
|
+
files in natural language.
|
|
11
|
+
|
|
12
|
+
> Browse, search, download, share, upload, organize, and tag your CloudSee Drive files from
|
|
13
|
+
> your AI assistant — with explicit confirmation before anything destructive happens.
|
|
14
|
+
|
|
15
|
+
📘 **New here?** The [Installation, Commands & Testing Guide](docs/GUIDE.md) walks through
|
|
16
|
+
install, configuration, every tool with examples, and how to test against a live API.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Quickstart (≈5 minutes)
|
|
21
|
+
|
|
22
|
+
### 1. Get an API key
|
|
23
|
+
|
|
24
|
+
In the CloudSee Drive dashboard, create a public-API key. You'll receive a **key id**
|
|
25
|
+
(looks like `AKIA…`) and a **secret**. Copy both — the secret is shown only once.
|
|
26
|
+
|
|
27
|
+
### 2. Add the server to Claude Desktop
|
|
28
|
+
|
|
29
|
+
Open Claude Desktop → **Settings → Developer → Edit Config**, and add a `cloudsee-drive`
|
|
30
|
+
entry under `mcpServers` (no install needed — `npx` fetches it on demand):
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"cloudsee-drive": {
|
|
36
|
+
"command": "npx",
|
|
37
|
+
"args": ["-y", "@webapper/cloudsee-drive-mcp"],
|
|
38
|
+
"env": {
|
|
39
|
+
"CLOUDSEE_API_KEY_ID": "<your key id>",
|
|
40
|
+
"CLOUDSEE_API_KEY_SECRET": "<your secret>",
|
|
41
|
+
"CLOUDSEE_API_BASE_URL": "https://drive-api.cloudsee.cloud"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 3. Restart Claude Desktop and try it
|
|
49
|
+
|
|
50
|
+
> "List my CloudSee buckets, then show the most recent files."
|
|
51
|
+
|
|
52
|
+
That's it. The server runs locally on your machine; your API key never leaves it.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
`npx` (above) always runs the latest version. To install the `cloudsee-drive-mcp` binary
|
|
59
|
+
globally instead:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm install -g @webapper/cloudsee-drive-mcp
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Requires **Node.js ≥ 18**. No native dependencies — works on macOS, Linux, and Windows.
|
|
66
|
+
|
|
67
|
+
## Configuration
|
|
68
|
+
|
|
69
|
+
All configuration is via environment variables (set them in the Claude Desktop `env` block,
|
|
70
|
+
or a local `.env` for development — see [`.env.example`](.env.example)).
|
|
71
|
+
|
|
72
|
+
| Variable | Required | Default | Description |
|
|
73
|
+
| --- | --- | --- | --- |
|
|
74
|
+
| `CLOUDSEE_API_KEY_ID` | ✅ | — | Your CloudSee Drive API key id. |
|
|
75
|
+
| `CLOUDSEE_API_KEY_SECRET` | ✅ | — | The matching API key secret. **Never commit this.** |
|
|
76
|
+
| `CLOUDSEE_API_BASE_URL` | — | `https://drive-api.cloudsee.cloud` | API base URL. UAT: `https://drive-api-uat.cloudsee.cloud`. |
|
|
77
|
+
| `CLOUDSEE_LOG_LEVEL` | — | `info` | `error` \| `warn` \| `info` \| `debug` (logs go to stderr only). |
|
|
78
|
+
| `CLOUDSEE_TIMEOUT_MS` | — | `30000` | Per-request timeout in milliseconds. |
|
|
79
|
+
|
|
80
|
+
## Tools
|
|
81
|
+
|
|
82
|
+
| Tool | Description | Access |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| `list_buckets` | List accessible buckets | read |
|
|
85
|
+
| `browse_folder` | List a folder's contents (one level) | read |
|
|
86
|
+
| `search_files` | Find files/folders by name keyword | read |
|
|
87
|
+
| `recent_files` | List recently used files | read |
|
|
88
|
+
| `get_file_metadata` | Get a file's metadata | read |
|
|
89
|
+
| `get_file_tags` | Get a file's S3 tags | read |
|
|
90
|
+
| `download_file` | Get a temporary pre-signed download URL | download |
|
|
91
|
+
| `share_link` | Create a shareable, time-limited link | download |
|
|
92
|
+
| `upload_file` | Upload a local file (≤ 8 MiB) | write |
|
|
93
|
+
| `create_folder` | Create a folder | write |
|
|
94
|
+
| `rename_file` | Rename a file/folder | write · **confirm** |
|
|
95
|
+
| `move_file` | Move (or copy) a file/folder | write · **confirm** (move) |
|
|
96
|
+
| `duplicate_file` | Duplicate a file | write |
|
|
97
|
+
| `delete_files` | Permanently delete objects | delete · **confirm** |
|
|
98
|
+
| `update_metadata` | Update a file's metadata | write · **confirm** |
|
|
99
|
+
| `restore_archived_file` | Un-archive a Glacier object | write · **confirm** |
|
|
100
|
+
|
|
101
|
+
### Destructive operations require confirmation
|
|
102
|
+
|
|
103
|
+
Tools marked **confirm** (delete, rename, move, update-metadata, restore) use **two-step
|
|
104
|
+
confirmation**: the first call returns a preview and makes **no changes**; you must call again
|
|
105
|
+
with `confirm: true` to proceed. This is a client-side safety prompt — the CloudSee API
|
|
106
|
+
authorizes every operation server-side; confirmation is not the security boundary.
|
|
107
|
+
|
|
108
|
+
## Security
|
|
109
|
+
|
|
110
|
+
- Your API key id + secret are read from the environment and **held only in this local
|
|
111
|
+
process**. The server **never logs the secret**, never returns it in tool output, and
|
|
112
|
+
never writes it to a file. All diagnostics go to **stderr** (stdout is the MCP transport).
|
|
113
|
+
- File downloads/shares return **short-lived pre-signed URLs**, never AWS credentials.
|
|
114
|
+
- Report vulnerabilities per [`SECURITY.md`](SECURITY.md). Never paste a real key/secret into
|
|
115
|
+
an issue.
|
|
116
|
+
|
|
117
|
+
## Status & known limitations
|
|
118
|
+
|
|
119
|
+
This wraps CloudSee Drive's public API (the `drive-bridge` `/v1/*` gateway).
|
|
120
|
+
|
|
121
|
+
- **Read & download tools are fully functional today.**
|
|
122
|
+
- **Write/delete/share tools are present but their end-to-end authorization is sequenced
|
|
123
|
+
behind the gateway's RBAC/scope wiring (CSD-572).** Until that lands, the gateway may deny
|
|
124
|
+
these operations — the tools surface that cleanly; it is expected, not a bug here.
|
|
125
|
+
- `upload_file` supports single-file uploads up to 8 MiB; multipart (larger files) is planned.
|
|
126
|
+
- `search_files` matches a single folder level (not a whole-tree recursive search).
|
|
127
|
+
|
|
128
|
+
## Development
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npm install
|
|
132
|
+
npm test # vitest: unit + tool↔contract drift tests
|
|
133
|
+
npm run typecheck # tsc --noEmit
|
|
134
|
+
npm run lint # eslint
|
|
135
|
+
npm run build # tsup → dist/ (ESM, with bin shebang)
|
|
136
|
+
npm run sync:contract # regenerate contract/registry.snapshot.json from the API seed
|
|
137
|
+
node scripts/smoke.mjs # build first; spawns the server and lists tools over MCP
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The **contract-drift test** (`test/contract/drift.test.ts`) fails the build if any tool drifts
|
|
141
|
+
from the committed API contract snapshot — so tool schemas can't silently diverge from the
|
|
142
|
+
real `/v1/*` surface.
|
|
143
|
+
|
|
144
|
+
## License
|
|
145
|
+
|
|
146
|
+
[MIT](LICENSE) © Webapper
|