gcs-google-mcp-server 0.1.0 → 0.1.1
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 +10 -8
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/shared/tools.d.ts +3 -2
- package/shared/tools.js +5 -4
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ MCP server for Google Cloud Storage operations with fine-grained tool access con
|
|
|
8
8
|
## Highlights
|
|
9
9
|
|
|
10
10
|
- Full GCS bucket and object management (list, get, put, copy, delete)
|
|
11
|
-
- Fine-grained access control with tool groups (readonly, readwrite)
|
|
11
|
+
- Fine-grained access control with tool groups (readonly, readwrite, delete)
|
|
12
12
|
- Individual tool enable/disable via environment variables
|
|
13
13
|
- Multiple authentication methods (service account key file, inline JSON, ADC)
|
|
14
14
|
- GCS credential validation with health checks
|
|
@@ -27,10 +27,10 @@ MCP server for Google Cloud Storage operations with fine-grained tool access con
|
|
|
27
27
|
| `get_object` | readonly | Get object contents as text |
|
|
28
28
|
| `head_bucket` | readonly | Check if a bucket exists and is accessible |
|
|
29
29
|
| `put_object` | readwrite | Upload or update an object |
|
|
30
|
-
| `delete_object` | readwrite | Delete an object from a bucket |
|
|
31
30
|
| `copy_object` | readwrite | Copy an object within or across buckets |
|
|
32
31
|
| `create_bucket` | readwrite | Create a new GCS bucket |
|
|
33
|
-
| `
|
|
32
|
+
| `delete_object` | delete | Delete an object from a bucket |
|
|
33
|
+
| `delete_bucket` | delete | Delete an empty GCS bucket |
|
|
34
34
|
|
|
35
35
|
### Resources
|
|
36
36
|
|
|
@@ -42,15 +42,17 @@ MCP server for Google Cloud Storage operations with fine-grained tool access con
|
|
|
42
42
|
|
|
43
43
|
Control which tools are available via the `GCS_ENABLED_TOOLGROUPS` environment variable:
|
|
44
44
|
|
|
45
|
-
| Group | Description
|
|
46
|
-
| ----------- |
|
|
47
|
-
| `readonly` | Read-only operations (list, get, head)
|
|
48
|
-
| `readwrite` |
|
|
45
|
+
| Group | Description |
|
|
46
|
+
| ----------- | ---------------------------------------------------- |
|
|
47
|
+
| `readonly` | Read-only operations (list, get, head) |
|
|
48
|
+
| `readwrite` | Non-destructive write operations (put, copy, create) |
|
|
49
|
+
| `delete` | Delete operations (delete_object, delete_bucket) |
|
|
49
50
|
|
|
50
51
|
**Examples:**
|
|
51
52
|
|
|
52
53
|
- `GCS_ENABLED_TOOLGROUPS="readonly"` - Only read operations
|
|
53
|
-
- `GCS_ENABLED_TOOLGROUPS="readonly,readwrite"` -
|
|
54
|
+
- `GCS_ENABLED_TOOLGROUPS="readonly,readwrite"` - Read and write, no deletes
|
|
55
|
+
- `GCS_ENABLED_TOOLGROUPS="readonly,readwrite,delete"` - All operations
|
|
54
56
|
- Not set - All tools enabled (default)
|
|
55
57
|
|
|
56
58
|
### Individual Tool Control
|
package/build/index.js
CHANGED
|
@@ -32,7 +32,7 @@ function validateEnvironment() {
|
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
name: 'GCS_ENABLED_TOOLGROUPS',
|
|
35
|
-
description: 'Comma-separated list of tool groups to enable (readonly, readwrite)',
|
|
35
|
+
description: 'Comma-separated list of tool groups to enable (readonly, readwrite, delete)',
|
|
36
36
|
defaultValue: 'all groups enabled',
|
|
37
37
|
},
|
|
38
38
|
{
|
package/package.json
CHANGED
package/shared/tools.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import type { GCSClientFactory } from './server.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Available tool groups for GCS operations.
|
|
5
5
|
* - 'readonly': Read-only operations (list, get, head)
|
|
6
|
-
* - 'readwrite': Write operations (put, copy,
|
|
6
|
+
* - 'readwrite': Write operations (put, copy, create)
|
|
7
|
+
* - 'delete': Delete operations (delete_object, delete_bucket)
|
|
7
8
|
*/
|
|
8
|
-
export type ToolGroup = 'readonly' | 'readwrite';
|
|
9
|
+
export type ToolGroup = 'readonly' | 'readwrite' | 'delete';
|
|
9
10
|
/**
|
|
10
11
|
* Parse enabled tool groups from environment variable.
|
|
11
12
|
* @param enabledGroupsParam - Comma-separated list of groups (e.g., "readonly,readwrite")
|
package/shared/tools.js
CHANGED
|
@@ -9,7 +9,7 @@ import { deleteBucketTool } from './tools/delete-bucket.js';
|
|
|
9
9
|
import { copyObjectTool } from './tools/copy-object.js';
|
|
10
10
|
import { headBucketTool } from './tools/head-bucket.js';
|
|
11
11
|
import { logWarning, logInfo } from './logging.js';
|
|
12
|
-
const ALL_TOOL_GROUPS = ['readonly', 'readwrite'];
|
|
12
|
+
const ALL_TOOL_GROUPS = ['readonly', 'readwrite', 'delete'];
|
|
13
13
|
/**
|
|
14
14
|
* Parse enabled tool groups from environment variable.
|
|
15
15
|
* @param enabledGroupsParam - Comma-separated list of groups (e.g., "readonly,readwrite")
|
|
@@ -46,12 +46,13 @@ const ALL_TOOLS = [
|
|
|
46
46
|
{ factory: listObjectsTool, groups: ['readonly'], bucketParams: ['bucket'] },
|
|
47
47
|
{ factory: getObjectTool, groups: ['readonly'], bucketParams: ['bucket'] },
|
|
48
48
|
{ factory: headBucketTool, groups: ['readonly'], bucketLevelOnly: true },
|
|
49
|
-
// Write operations
|
|
49
|
+
// Write operations (non-destructive)
|
|
50
50
|
{ factory: putObjectTool, groups: ['readwrite'], bucketParams: ['bucket'] },
|
|
51
|
-
{ factory: deleteObjectTool, groups: ['readwrite'], bucketParams: ['bucket'] },
|
|
52
51
|
{ factory: copyObjectTool, groups: ['readwrite'], bucketParams: ['sourceBucket', 'destBucket'] },
|
|
53
52
|
{ factory: createBucketTool, groups: ['readwrite'], bucketLevelOnly: true },
|
|
54
|
-
|
|
53
|
+
// Delete operations
|
|
54
|
+
{ factory: deleteObjectTool, groups: ['delete'], bucketParams: ['bucket'] },
|
|
55
|
+
{ factory: deleteBucketTool, groups: ['delete'], bucketLevelOnly: true },
|
|
55
56
|
];
|
|
56
57
|
/**
|
|
57
58
|
* Get all tool names for documentation/help purposes.
|