Netlify MCP Server
Give code agents the ability to build, deploy, and more with Netlify MCP Server.
Netlify MCP Server follows the Model Context Protocol to enable code agents to use the Netlify API and CLI to create new projects and to build and manage your deployments.
Curious how it works? Check out the full source code on GitHub.
# Overview
The Model Context Protocol is a standardized protocol that enables code agents to connect to MCP servers to manage resources and complete tasks for you using natural language prompts.
An MCP Server provides the necessary context for code agents to use, such as APIs, CLI functionality, prompts, and other dev tools.
An MCP client is an application that connects to an MCP server, such as Windsurf, Cursor, Claude, or VSCode Copilot. For a more complete list, check out the Model Context Protocol documentation.
To learn more about how MCP servers work, check out the official Model Context Protocol architecture documentation.
# Use cases
Use the Netlify MCP Server to speed up your development workflow by letting your AI agents:
- Create, manage, and deploy projects
- Modify Netlify access controls to protect projects from unwanted access
- Install or uninstall Netlify extensions
- Fetch Netlify user and team information
- Enable and manage form submissions on projects
- Create environment variables and secrets for projects
# Prerequisites
To use the Netlify MCP Server, you need:
- Node.js 22 or higher
- A Netlify account
- An MCP client (e.g. Windsurf, Cursor, Claude, Copilot)
We recommend installing the Netlify CLI with npm install -g netlify-cli
so that the MCP server can use it directly where possible.
# Add Netlify MCP Server
When possible, we recommend adding Netlify MCP Server locally at the root of your project.
Use the docs for your MCP client on how to add a custom MCP server and complete the installation (typically with a refresh or restart of your MCP client):
One-click installs:
Noting there are many other MCP clients available, check out this official list.
# Netlify MCP configuration
This is an example of a mcp.json
file that adds the Netlify MCP server:
{
"mcpServers": {
"netlify": {
"command": "npx",
"args": ["-y", "@netlify/mcp"]
}
}
}
# Troubleshoot
Here are some common issues and solutions or workarounds. You may find it helpful to install the latest version of the Netlify CLI as you troubleshoot.
# Node issues
For the best experience, we recommend using Node 22 or higher.
In your terminal, run node --version
to check your current version.
If you have a node version manager like nvm, you can run nvm install 22
to install Node 22 and nvm use 22
to use it.
# Netlify authentication issues
If you’re experiencing issues staying logged in to your Netlify account while using the Netlify MCP Server, we recommend you start by confirming that you can log in to your Netlify account in other ways without any authentication issues.
You can use the Netlify CLI to check auth with netlify status
or netlify login
.
If you’re still having auth issues while trying to use the Netlify MCP Server, as a temporary workaround, you can add a Netlify PAT (Personal Access Token) to your MCP configuration file.
{
"mcpServers": {
"netlify": {
"command": "npx",
"args": ["-y", "@netlify/mcp"],
"env": {
"NETLIFY_PERSONAL_ACCESS_TOKEN": "YOUR-PAT-VALUE"
}
}
}
}
Don’t commit your PAT
Note that this is a temporary workaround and that you should not commit this update to your repository and publish the PAT value!
# Get a new PAT
To get a new PAT for use with the Netlify MCP Server, follow these steps:
In the Netlify dashboard, on the bottom left corner (on desktop), select your user icon and go to
and select New access token.Copy your new personal access token securely.
Add the PAT value to your MCP configuration file. Note this is a temporary workaround and this sensitive value should not be committed to your repository.
Restart or refresh your MCP client following your MCP client’s instructions.
Use the Netlify MCP Server. You should now be able to stay logged in to your Netlify account while using the Netlify MCP Server.
Be sure not to commit your PAT value to your Git remote repository. When you're ready, remove the PAT from your MCP configuration file.
Did you find this doc useful?
Your feedback helps us improve our docs.