storage-mcp

v0.6.0
@google-cloud/storage-mcp Checked 7 hours ago Published 6 months ago

Model Context Protocol (MCP) Server for interacting with GCS APIs

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_buckets

Lists all GCS buckets in the project.

ParameterTypeDescription
project_idstringThe project ID to list buckets for.

get_bucket_location

Gets the location and storage class of a bucket.

ParameterTypeDescription
bucket_name *stringThe name of the bucket.

get_bucket_metadata

Gets detailed metadata for a specific bucket.

ParameterTypeDescription
bucket_name *stringThe name of the bucket.

view_iam_policy

Views the IAM policy for a bucket.

ParameterTypeDescription
bucket_name *stringThe name of the GCS bucket.

check_iam_permissions

Tests IAM permissions for a bucket.

ParameterTypeDescription
bucket_name *stringThe name of the GCS bucket.
permissions *arrayList of permissions to test.

create_bucket

Creates a new bucket with specified configuration.

ParameterTypeDescription
bucket_name *stringThe name of the bucket to create.
project_id *stringThe ID of the GCP project.
labelsobjectLabels to apply to the bucket.
locationstringThe location for the bucket.
requester_paysbooleanWhether to enable requester pays.
storage_classstringThe storage class for the bucket.
versioning_enabledbooleanWhether to enable versioning.

list_objects

Lists the names of objects in a Google Cloud Storage (GCS) bucket. Supports filtering by prefix, directory-like listing with a delimiter, pagination, and listing object versions.

ParameterTypeDescription
bucket_name *stringThe name of the GCS bucket.
delimiterstringCan be used to list objects in a directory-like structure. For example, using a delimiter of '/' will return objects at the root level and not in subdirectories. This helps in navigating virtual folde…
max_resultsnumberThe maximum number of object names to return in a single response. If not specified, the API defaults to 1,000. The maximum value allowed is also 1,000.
page_tokenstringA token used to retrieve the next page of results. This is obtained from the `next_page_token` field of a previous `list_objects` call.
prefixstringFilters results to objects whose names begin with this prefix.
versionsbooleanIf true, lists all versions of an object as distinct results.

read_object_content

Reads the content of a specific object.

ParameterTypeDescription
bucket_name *stringThe name of the GCS bucket.
object_name *stringThe name of the object.

read_object_metadata

Reads metadata for a specific object.

ParameterTypeDescription
bucket_name *stringThe name of the GCS bucket.
object_name *stringThe name of the object.

get_metadata_table_schema

Checks if GCS insights service is enabled and returns the BigQuery table schema for a given insights dataset configuration in JSON format. Also returns hints for each column in the table

ParameterTypeDescription
datasetConfigLocation *stringThe location of the dataset configuration.
datasetConfigName *stringThe name of the dataset configuration.
projectIdstringThe project ID to check Storage Insights availability for.

execute_insights_query

Executes a BigQuery SQL query against an insights dataset and returns the result.

ParameterTypeDescription
config *stringThe JSON object of the BigQuery table schema for a given insights dataset configuration.
query *stringThe BigQuery SQL query to execute.
jobTimeoutMsnumberThe maximum amount of time for the job to run on the server.

list_insights_configs

Lists the names of all Storage Insights dataset configurations for a given project.

ParameterTypeDescription
projectIdstringThe project ID to list Storage Insights dataset configurations for.

write_object_safe

Writes a new object to the bucket. Fails if the object already exists.

ParameterTypeDescription
bucket_name *stringThe name of the GCS bucket.
content *stringThe content to write to the object, encoded in base64.
object_name *stringThe name of the object to write.
content_typestringThe content type of the object.

upload_object_safe

Uploads a file to a GCS bucket. Fails if the object already exists.

ParameterTypeDescription
bucket_name *stringThe name of the GCS bucket.
file_path *stringThe local path of the file to upload.
content_typestringThe content type of the object.
object_namestringThe name of the object in GCS. If not provided, the filename from file_path will be used.

copy_object_safe

Copies an object to a new destination. Fails if an object already exists at the destination.

ParameterTypeDescription
destination_bucket_name *stringThe name of the destination GCS bucket.
destination_object_name *stringThe name for the copied object.
source_bucket_name *stringThe name of the source GCS bucket.
source_object_name *stringThe name of the source object.