This MCP server provides integration between Language Learning Models (LLMs) and Google Sheets, allowing models to interact with spreadsheets directly. With this integration, models can list, create, copy spreadsheets, as well as write, edit and fill cells.
Before installing the Google Sheets MCP server, you need to set up Google Cloud credentials:
Once you have your Google Cloud credentials:
credentials.json
mv ~/Downloads/your-credentials-file.json ./credentials.json
When you first run the server, it will prompt you to authenticate with your Google account. Follow the authentication flow to grant the necessary permissions to the application.
The MCP server provides the following capabilities for LLMs to interact with Google Sheets:
To use the Google Sheets MCP server with an LLM, the model can make requests through the MCP protocol. Here are some typical operations:
To list all spreadsheets:
List all my Google Sheets spreadsheets
To create a new spreadsheet:
Create a new spreadsheet called "Budget 2023"
To modify cell content:
Write "Monthly Expenses" in cell A1 of the "Budget 2023" spreadsheet
To copy a spreadsheet:
Copy my "Budget 2023" spreadsheet to "Budget 2024"
credentials.json
file secure and never share it publiclyThere 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.