strovio-mcp 0.0.0-stage → 2.5.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 CHANGED
@@ -1,3 +1,46 @@
1
- # Temporary Holding Version
1
+ # strovio-mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [Model Context Protocol](https://modelcontextprotocol.io) server for [Strovio](https://strovio.xyz) file storage. It gives Claude Code, Claude Desktop, Cursor, Codex and other MCP clients five tools: `list_files`, `upload_file`, `get_file`, `file_exists` and `delete_file`. It runs locally over stdio and needs Node.js 18 or later.
4
+
5
+ Full guide with every client and platform: https://strovio.xyz/docs/mcp (Markdown: https://strovio.xyz/docs/mcp.md)
6
+
7
+ ## Configure
8
+
9
+ | Variable | Required | Notes |
10
+ |---|---|---|
11
+ | `STROVIO_API_KEY` | Yes | An `sk_live_` key from https://strovio.xyz/developer |
12
+ | `STROVIO_API_URL` | No | Origin only. Defaults to `https://strovio.xyz`. |
13
+
14
+ Claude Code (macOS and Linux):
15
+
16
+ ```bash
17
+ claude mcp add strovio -e STROVIO_API_KEY=sk_live_... -- npx -y strovio-mcp
18
+ ```
19
+
20
+ Any client with an `mcpServers` JSON file (Claude Desktop, Cursor):
21
+
22
+ ```json
23
+ {
24
+ "mcpServers": {
25
+ "strovio": {
26
+ "command": "npx",
27
+ "args": ["-y", "strovio-mcp"],
28
+ "env": { "STROVIO_API_KEY": "sk_live_..." }
29
+ }
30
+ }
31
+ }
32
+ ```
33
+
34
+ Never commit a config file that contains the key.
35
+
36
+ ## Develop
37
+
38
+ From the monorepo root:
39
+
40
+ ```bash
41
+ yarn workspace strovio-sdk build
42
+ yarn workspace strovio-mcp build
43
+ STROVIO_API_KEY=sk_live_... node products/strovio/mcp/dist/index.js
44
+ ```
45
+
46
+ For a local Strovio, set `STROVIO_API_URL=http://localhost:3000` and mint a key with `STROVIO_DEV_BOOTSTRAP=1 yarn strovio-bootstrap-key http://localhost:3000` (see `../web/README.md`).
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/index.js ADDED
@@ -0,0 +1,156 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
5
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
6
+ import {
7
+ CallToolRequestSchema,
8
+ ListToolsRequestSchema
9
+ } from "@modelcontextprotocol/sdk/types.js";
10
+ import { StrovioClient, StrovioError } from "strovio-sdk";
11
+ import { readFileSync } from "fs";
12
+ import { extname } from "path";
13
+ var MIME = {
14
+ ".jpg": "image/jpeg",
15
+ ".jpeg": "image/jpeg",
16
+ ".png": "image/png",
17
+ ".gif": "image/gif",
18
+ ".webp": "image/webp",
19
+ ".svg": "image/svg+xml",
20
+ ".pdf": "application/pdf",
21
+ ".mp4": "video/mp4",
22
+ ".mov": "video/quicktime",
23
+ ".mp3": "audio/mpeg",
24
+ ".wav": "audio/wav",
25
+ ".json": "application/json",
26
+ ".txt": "text/plain",
27
+ ".zip": "application/zip"
28
+ };
29
+ function createClient() {
30
+ try {
31
+ return new StrovioClient();
32
+ } catch (err) {
33
+ process.stderr.write(
34
+ `${err.message}
35
+ Set STROVIO_API_KEY in the MCP server's env block. STROVIO_API_URL is optional and defaults to https://strovio.xyz. Guide: https://strovio.xyz/docs/mcp
36
+ `
37
+ );
38
+ process.exit(1);
39
+ }
40
+ }
41
+ var strovio = createClient();
42
+ function errorText(err) {
43
+ if (err instanceof StrovioError && err.docUrl) {
44
+ return `Error: ${err.message} (${err.code}, see ${err.docUrl})`;
45
+ }
46
+ return `Error: ${err.message}`;
47
+ }
48
+ var server = new Server(
49
+ { name: "strovio", version: "2.5.0" },
50
+ { capabilities: { tools: {} } }
51
+ );
52
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
53
+ tools: [
54
+ {
55
+ name: "list_files",
56
+ description: "List files stored in Strovio, newest first. Use this to find the exact key of a file before get_file or delete_file.",
57
+ inputSchema: {
58
+ type: "object",
59
+ properties: {
60
+ prefix: { type: "string", description: "Only return files whose key contains this text, for example reports/" },
61
+ limit: { type: "number", description: "Maximum number of files to return, a whole number from 1 to 100" }
62
+ }
63
+ }
64
+ },
65
+ {
66
+ name: "upload_file",
67
+ description: "Upload a file from the machine running this MCP server into Strovio, up to 50 MiB. Uploading to an existing key replaces that file.",
68
+ inputSchema: {
69
+ type: "object",
70
+ required: ["filePath", "key"],
71
+ properties: {
72
+ filePath: { type: "string", description: "Absolute or relative path to the local file" },
73
+ key: { type: "string", description: "Path to store the file under, for example reports/q1.pdf. No leading slash, no .. segments." },
74
+ access: {
75
+ type: "string",
76
+ enum: ["public", "private"],
77
+ description: "public = anyone can access URL, private = presigned URL required (default: private)"
78
+ }
79
+ }
80
+ }
81
+ },
82
+ {
83
+ name: "get_file",
84
+ description: "Get metadata and a download URL for a file. Public files return a permanent URL; private files return a signed URL valid for one hour.",
85
+ inputSchema: {
86
+ type: "object",
87
+ required: ["key"],
88
+ properties: {
89
+ key: { type: "string", description: "The key returned by upload_file or list_files, or the path you uploaded to" }
90
+ }
91
+ }
92
+ },
93
+ {
94
+ name: "delete_file",
95
+ description: "Permanently delete a file from Strovio storage.",
96
+ inputSchema: {
97
+ type: "object",
98
+ required: ["key"],
99
+ properties: {
100
+ key: { type: "string", description: "The key returned by upload_file or list_files, or the path you uploaded to" }
101
+ }
102
+ }
103
+ },
104
+ {
105
+ name: "file_exists",
106
+ description: "Check whether a file exists in Strovio without downloading it.",
107
+ inputSchema: {
108
+ type: "object",
109
+ required: ["key"],
110
+ properties: {
111
+ key: { type: "string", description: "The key returned by upload_file or list_files, or the path you uploaded to" }
112
+ }
113
+ }
114
+ }
115
+ ]
116
+ }));
117
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
118
+ const { name, arguments: args = {} } = request.params;
119
+ try {
120
+ switch (name) {
121
+ case "list_files": {
122
+ const result = await strovio.list(args);
123
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
124
+ }
125
+ case "upload_file": {
126
+ const { filePath, key, access } = args;
127
+ const buffer = readFileSync(filePath);
128
+ const contentType = MIME[extname(filePath).toLowerCase()] ?? "application/octet-stream";
129
+ const result = await strovio.upload(key, buffer, { contentType, access });
130
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
131
+ }
132
+ case "get_file": {
133
+ const result = await strovio.get(args.key);
134
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
135
+ }
136
+ case "delete_file": {
137
+ const result = await strovio.delete(args.key);
138
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
139
+ }
140
+ case "file_exists": {
141
+ const result = await strovio.exists(args.key);
142
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
143
+ }
144
+ default:
145
+ throw new Error(`Unknown tool: ${name}`);
146
+ }
147
+ } catch (err) {
148
+ return {
149
+ content: [{ type: "text", text: errorText(err) }],
150
+ isError: true
151
+ };
152
+ }
153
+ });
154
+ var transport = new StdioServerTransport();
155
+ await server.connect(transport);
156
+ process.stderr.write("Strovio MCP server running\n");
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "strovio-mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.5.0",
4
+ "description": "MCP server for Strovio file storage: lets Claude, Cursor, Codex and other MCP clients list, upload, get and delete files",
5
+ "homepage": "https://strovio.xyz/docs/mcp",
6
+ "bugs": {
7
+ "email": "support@strovio.xyz"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/dormdeveloper/specvista-monorepo.git",
12
+ "directory": "products/strovio/mcp"
13
+ },
14
+ "license": "MIT",
15
+ "type": "module",
16
+ "bin": {
17
+ "strovio-mcp": "./dist/index.js"
18
+ },
19
+ "scripts": {
20
+ "build": "tsup src/index.ts --format esm --dts --clean",
21
+ "dev": "tsup src/index.ts --format esm --watch",
22
+ "start": "node dist/index.js",
23
+ "prepublishOnly": "npm run build"
24
+ },
25
+ "dependencies": {
26
+ "@modelcontextprotocol/sdk": "^1.12.0",
27
+ "strovio-sdk": "^2.5.0"
28
+ },
29
+ "devDependencies": {
30
+ "tsup": "^8.0.0",
31
+ "typescript": "^5.0.0"
32
+ },
33
+ "files": [
34
+ "dist",
35
+ "README.md"
36
+ ],
37
+ "keywords": [
38
+ "mcp",
39
+ "model-context-protocol",
40
+ "strovio",
41
+ "file-storage",
42
+ "ai-agents",
43
+ "claude",
44
+ "cursor",
45
+ "codex"
46
+ ],
47
+ "engines": {
48
+ "node": ">=18"
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
52
+ }
53
+ }