|
| 1 | +# NetApp DataOps Toolkit MCP Server for Google Cloud NetApp Volumes (GCNV) |
| 2 | + |
| 3 | +The NetApp DataOps Toolkit MCP Server for Google Cloud NetApp Volumes (GCNV) is an open-source server component written in Python that provides access to Traditional DataOps Toolkit capabilities through the Model Context Protocol (MCP). The server provides a set of tools for managing NetApp volumes in Google Cloud, including volume creation, cloning, snapshot management, and replication relationships. |
| 4 | + |
| 5 | +> [!NOTE] |
| 6 | +> This MCP server uses the stdio transport, as shown in the [MCP Server Quickstart](https://modelcontextprotocol.io/quickstart/server), making it a "local MCP server". |
| 7 | +
|
| 8 | +## Tools |
| 9 | + |
| 10 | +- **Create Volume**: Rapidly provision new NetApp volumes in Google Cloud with customizable configurations including protocols, security settings, and backup policies. |
| 11 | +- **Clone Volume**: Create near-instantaneous, space-efficient clones of existing volumes from snapshots using NetApp technology. |
| 12 | +- **List Volumes**: Retrieve a list of all existing data volumes in a specified project and location. |
| 13 | +- **Create Snapshot**: Create space-efficient, read-only copies of data volumes for versioning and traceability. |
| 14 | +- **List Snapshots**: Retrieve a list of all snapshots for a specific volume. |
| 15 | +- **Create Replication**: Set up replication relationships for efficient data replication and disaster recovery between volumes. |
| 16 | + |
| 17 | +## Prerequisites |
| 18 | + |
| 19 | +- Python >= 3.9 |
| 20 | +- [`uv`](https://docs.astral.sh/uv/) or [`pip`](https://pypi.org/project/pip/) |
| 21 | +- [Google Cloud SDK](https://cloud.google.com/sdk/docs/install) installed and authenticated |
| 22 | +- NetApp API enabled on GCP project |
| 23 | + |
| 24 | +## Usage Instructions |
| 25 | + |
| 26 | +### Run with `uv` (recommended) |
| 27 | + |
| 28 | +To run the MCP server using `uv`, run the following command. You do not need to install the NetApp DataOps Toolkit package before running this command. |
| 29 | + |
| 30 | +```bash |
| 31 | +uvx --from 'netapp-dataops-traditional[gcp]' netapp_dataops_gcnv_mcp.py |
| 32 | +``` |
| 33 | + |
| 34 | +### Install with `pip` and run from PATH |
| 35 | + |
| 36 | +To install the NetApp DataOps Toolkit for Traditional Environments, run the following command. |
| 37 | + |
| 38 | +```bash |
| 39 | +python3 -m pip install 'netapp-dataops-traditional[gcp]' |
| 40 | +``` |
| 41 | + |
| 42 | +After installation, the `netapp_dataops_gcnv_mcp.py` command will be available in your PATH for direct usage. |
| 43 | + |
| 44 | +## Usage |
| 45 | + |
| 46 | +### Google Cloud Authentication |
| 47 | + |
| 48 | +Before the MCP server can be used to perform GCNV operations, you must authenticate with Google Cloud and ensure proper setup: |
| 49 | + |
| 50 | +1. **Install Google Cloud SDK**: Follow the [installation guide](https://cloud.google.com/sdk/docs/install) |
| 51 | + |
| 52 | +2. **Authenticate with Google Cloud**: |
| 53 | + ```bash |
| 54 | + gcloud auth login |
| 55 | + ``` |
| 56 | + |
| 57 | +3. **Set your default project**: |
| 58 | + ```bash |
| 59 | + gcloud config set project YOUR_PROJECT_ID |
| 60 | + ``` |
| 61 | + |
| 62 | +4. **Authenticate application default credentials**: |
| 63 | + ```bash |
| 64 | + gcloud auth application-default login |
| 65 | + ``` |
| 66 | + |
| 67 | +4. **Enable the NetApp API**: |
| 68 | + ```bash |
| 69 | + gcloud services enable netapp.googleapis.com |
| 70 | + ``` |
| 71 | + |
| 72 | +5. **Verify API is enabled**: |
| 73 | + ```bash |
| 74 | + gcloud services list --enabled --filter="name:netapp.googleapis.com" |
| 75 | + ``` |
| 76 | + |
| 77 | +### Example JSON Config |
| 78 | + |
| 79 | +To use the MCP server with an MCP client, you need to configure the client to use the server. For many clients (such as [VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers), [Claude Desktop](https://modelcontextprotocol.io/quickstart/user), and [AnythingLLM](https://docs.anythingllm.com/mcp-compatibility/overview)), this requires editing a config file that is in JSON format. Below is an example. Refer to the documentation for your MCP client for specific formatting details. |
| 80 | + |
| 81 | +```json |
| 82 | +{ |
| 83 | + "mcpServers": { |
| 84 | + "netapp_dataops_gcnv_mcp": { |
| 85 | + "type": "stdio", |
| 86 | + "command": "uvx", |
| 87 | + "args": [ |
| 88 | + "--from", |
| 89 | + "'netapp-dataops-traditional[gcp]'", |
| 90 | + "netapp_dataops_gcnv_mcp.py" |
| 91 | + ] |
| 92 | + } |
| 93 | + } |
| 94 | +} |
| 95 | +``` |
| 96 | + |
| 97 | +### Alternative: Using `pip` installation |
| 98 | + |
| 99 | +If you've installed the package with `pip`, you can use: |
| 100 | + |
| 101 | +```json |
| 102 | +{ |
| 103 | + "mcpServers": { |
| 104 | + "netapp_dataops_gcnv_mcp": { |
| 105 | + "type": "stdio", |
| 106 | + "command": "netapp_dataops_gcnv_mcp.py" |
| 107 | + } |
| 108 | + } |
| 109 | +} |
| 110 | +``` |
| 111 | + |
| 112 | +### Alternative: Direct Python execution |
| 113 | + |
| 114 | +For development or testing purposes: |
| 115 | + |
| 116 | +```json |
| 117 | +{ |
| 118 | + "mcpServers": { |
| 119 | + "netapp_dataops_gcnv_mcp": { |
| 120 | + "type": "stdio", |
| 121 | + "command": "python", |
| 122 | + "args": [ |
| 123 | + "/path/to/netapp_dataops_gcnv_mcp.py" |
| 124 | + ] |
| 125 | + } |
| 126 | + } |
| 127 | +} |
| 128 | +``` |
| 129 | + |
| 130 | +## Environment Variables |
| 131 | + |
| 132 | +You can optionally set these environment variables: |
| 133 | + |
| 134 | +- `GOOGLE_APPLICATION_CREDENTIALS`: Path to service account key file (if not using default credentials) |
| 135 | +- `GOOGLE_CLOUD_PROJECT`: Default project ID to use |
| 136 | + |
| 137 | +## Troubleshooting |
| 138 | + |
| 139 | +### Common Issues |
| 140 | + |
| 141 | +1. **Authentication Failed**: |
| 142 | + ```bash |
| 143 | + gcloud auth login |
| 144 | + ``` |
| 145 | + |
| 146 | +2. **API Not Enabled**: |
| 147 | + ```bash |
| 148 | + gcloud services enable netapp.googleapis.com --project=YOUR_PROJECT_ID |
| 149 | + ``` |
| 150 | + |
| 151 | +3. **Module Not Found**: Ensure the package is properly installed or use the full path |
| 152 | + |
| 153 | +## Support |
| 154 | + |
| 155 | +Report any issues via GitHub: https://github.com/NetApp/netapp-dataops-toolkit/issues. |
0 commit comments