Skip to main content
Glama
pickstar-2002

MinIO Storage MCP

get_bucket_policy

Retrieve access policies for MinIO storage buckets to manage permissions and security settings.

Instructions

获取存储桶策略

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameYes存储桶名称

Implementation Reference

  • The handler logic for the 'get_bucket_policy' tool. Validates bucketName input with Zod, calls MinIOStorageClient.getBucketPolicy, and formats the policy as a text response in the MCP content.
    case 'get_bucket_policy': {
      const { bucketName } = z.object({
        bucketName: z.string()
      }).parse(args);
      
      const policy = await this.minioClient.getBucketPolicy(bucketName);
      return {
        content: [
          {
            type: 'text',
            text: `存储桶 ${bucketName} 的策略:\n${policy}`
          }
        ]
      };
    }
  • src/index.ts:290-300 (registration)
    Registration of the 'get_bucket_policy' tool in the ListTools response, including name, description, and input schema definition.
    {
      name: 'get_bucket_policy',
      description: '获取存储桶策略',
      inputSchema: {
        type: 'object',
        properties: {
          bucketName: { type: 'string', description: '存储桶名称' }
        },
        required: ['bucketName']
      }
    },
  • Helper method in MinIOStorageClient class that ensures connection and delegates to the underlying MinIO client's getBucketPolicy method.
    async getBucketPolicy(bucketName: string): Promise<string> {
      this.ensureConnected();
      return await this.client!.getBucketPolicy(bucketName);
    }

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