This MCP server enables AI assistants to interact with Google Spreadsheets and Google Drive files. It provides a set of commands for file operations and spreadsheet manipulation, serving as a bridge between AI systems and Google's productivity tools.
Install the MCP Google Spreadsheet server using Go:
go install github.com/kazz187/mcp-google-spreadsheet@latest
This will install the mcp-google-spreadsheet
binary in your $GOPATH/bin
directory.
You'll need to set the following environment variables:
MCPGS_CLIENT_SECRET_PATH
: Path to your Google API client secret fileMCPGS_TOKEN_PATH
: Path where the Google API token will be stored (created automatically if not present)MCPGS_FOLDER_ID
: The ID of the Google Drive folder you want to work withRun the server with your configuration:
export MCPGS_CLIENT_SECRET_PATH=/path/to/client_secret.json
export MCPGS_TOKEN_PATH=/path/to/token.json
export MCPGS_FOLDER_ID=your_folder_id
mcp-google-spreadsheet
Ensure that $GOPATH/bin
is in your PATH if you installed via go install
.
During the first run, authentication is required. A browser window will open automatically for Google account authentication. After authentication, you'll be returned to the application. If the browser doesn't open automatically, visit the URL shown in the console.
To use this server with AI assistants like Claude or ChatGPT, add the following to your MCP configuration file:
{
"mcpServers": {
"mcp_google_spreadsheet": {
"command": "mcp-google-spreadsheet",
"args": [],
"env": {
"MCPGS_CLIENT_SECRET_PATH": "/path/to/client_secret.json",
"MCPGS_TOKEN_PATH": "/path/to/token.json",
"MCPGS_FOLDER_ID": "your_folder_id"
}
}
}
}
If you installed using go install
, you can specify just the executable name in the command
field as shown above, but make sure $GOPATH/bin
is in the PATH of the user running the MCP server.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.