Skip to main content
Glama
pickstar-2002

MinIO Storage MCP

set_bucket_policy

Configure access permissions for MinIO storage buckets by applying JSON policies to control user and application access rights.

Instructions

设置存储桶策略

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameYes存储桶名称
policyYesJSON格式的策略

Implementation Reference

  • MCP tool handler for 'set_bucket_policy': validates input parameters using Zod, calls MinIOStorageClient.setBucketPolicy, and returns a success text response.
    case 'set_bucket_policy': {
      const { bucketName, policy } = z.object({
        bucketName: z.string(),
        policy: z.string()
      }).parse(args);
      
      await this.minioClient.setBucketPolicy(bucketName, policy);
      return {
        content: [
          {
            type: 'text',
            text: `成功设置存储桶 ${bucketName} 的策略`
          }
        ]
      };
    }
  • src/index.ts:278-289 (registration)
    Tool registration in list_tools response, including name, description, and input schema definition.
    {
      name: 'set_bucket_policy',
      description: '设置存储桶策略',
      inputSchema: {
        type: 'object',
        properties: {
          bucketName: { type: 'string', description: '存储桶名称' },
          policy: { type: 'string', description: 'JSON格式的策略' }
        },
        required: ['bucketName', 'policy']
      }
    },
  • Zod schema validation for input arguments in the handler.
    const { bucketName, policy } = z.object({
      bucketName: z.string(),
      policy: z.string()
    }).parse(args);
  • MinIOStorageClient helper method that implements setBucketPolicy by delegating to the underlying Minio Client SDK.
    async setBucketPolicy(bucketName: string, policy: string): Promise<void> {
      this.ensureConnected();
      await this.client!.setBucketPolicy(bucketName, policy);
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pickstar-2002/minio-storage-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server