Nathanf22/gcs_mcp_server
If you are the rightful owner of gcs_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The GCS MCP Server is a Multi-Capability Protocol server designed for AI agents to manage Google Cloud Storage resources.
GCS MCP Server
This project provides a Multi-Capability Protocol (MCP) server for interacting with Google Cloud Storage (GCS). It is designed to be used by AI agents, providing a tool-based interface for managing GCS resources like buckets and objects.
The server is built using Python with the FastMCP framework.
Features
- Bucket Management: Create and delete GCS buckets.
- Object Operations: Upload, read, delete, and move files (including binary files).
- Directory Listing: List the contents of buckets or specific directories.
- Self-Documentation: An agent can retrieve the server's full API documentation by calling the
get_mcp_documentation
tool.
Getting Started
Prerequisites
- Python 3.10+
uv
package manager (pip install uv
)- Google Cloud SDK (
gcloud
) installed and authenticated.
Setup and Installation
-
Clone the repository:
git clone <your-repo-url> cd gcs_mcp_server
-
Set up the Python environment: This project uses the
.python-version
file to specify the Python version. If you have a tool likepyenv
orrtx
, it will be used automatically. -
Create the virtual environment and install dependencies:
uv venv uv sync
-
Set up Google Cloud Authentication:
- Authenticate the gcloud CLI:
gcloud auth login gcloud auth application-default login
- Create a
service_account_key.json
file in the root of the project with your Google Cloud service account credentials. This file is already listed in.gitignore
and will not be committed to your repository.
- Authenticate the gcloud CLI:
Running the Server Locally
To start the server, run the following command:
uv run gcs-mcp-server
The server will be available at http://localhost:8080
.
Running Tests
The integration test suite validates all server functionality against a live GCS environment.
- Start the server in one terminal:
uv run gcs-mcp-server
- Run the tests in a second terminal:
uv run pytest --run-integration -m integration --verbose tests/integration_test.py
Deployment
This project includes a Dockerfile
and a deploy.bat
script for easy deployment to Google Cloud Run.
- Configure your project in
deploy.bat
:- Ensure your
PROJECT_ID
andREGION
are set correctly.
- Ensure your
- Run the deployment script:
The script will build the container image, push it to the Artifact Registry, and deploy it as a Cloud Run service.
deploy.bat
Available Tools
This server exposes a suite of tools for interacting with GCS. For detailed information on each tool, its parameters, and return values, an agent can call the get_mcp_documentation
tool.
A summary of tools can also be found in .
This README was generated by an AI agent.