local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Provides comprehensive tools for working with Netlify through their CLI, enabling deploying sites, managing deployments, handling environment variables, DNS settings, serverless functions, forms, plugins, and webhooks.
Netlify MCP Server
A Model Context Protocol (MCP) server that provides tools and resources for interacting with Netlify through their CLI. This server enables deploying sites, managing environment variables, builds, and more, compatible with Netlify CLI v19.1.5.
Recent Changes (April 8, 2025)
- Compatibility Update: Verified tool compatibility with Netlify CLI v19.1.5.
- Removed Unsupported Tools/Resources: Removed functionality related to unavailable CLI command groups:
dns
,forms
,plugins
,hooks
,deploys
. Specific commands likefunctions:delete
,functions:invoke
, andsites:get
were also removed as they were either unavailable or incompatible with non-interactive use via the MCP server. - Site Context Workaround: Updated tools requiring site context (like
env:*
,logs:function
,build
,trigger-build
) to pass thesiteId
via theNETLIFY_SITE_ID
environment variable, as the--site
flag is not supported for these commands in this CLI version.
Features (Compatible with Netlify CLI v19.1.5)
- Deploy and manage sites (
deploy-site
,build-site
,trigger-build
,link-site
,unlink-site
,get-status
,create-site
,delete-site
) - Manage environment variables (
set-env-vars
,get-env-var
,unset-env-var
,import-env
,clone-env-vars
) - Get function logs (
get-logs
) - Access site data via Resources (
list-sites
,list-functions
,list-env-vars
) - Comprehensive error handling
- Type-safe parameter validation using Zod
Installation
Installing via Smithery
To install Netlify MCP Server for Claude Desktop automatically via Smithery:
Manual Installation
- Clone the repository (if not already done).
- Install dependencies:Copy
- Build the server:Copy
- Ensure Netlify CLI is installed (v19.1.5 or compatible):Copy
Authentication
This MCP server interacts with the Netlify CLI, which requires authentication with your Netlify account. Since the server runs non-interactively, you must use a Personal Access Token (PAT).
- Generate a PAT:
- Go to your Netlify User Settings > Applications > Personal access tokens (Direct Link).
- Select New access token.
- Give it a description (e.g., "MCP Server Token").
- Set an expiration date.
- Select Generate token.
- Copy the token immediately and store it securely.
- Configure the Token: You need to make this token available to the MCP server as the
NETLIFY_AUTH_TOKEN
environment variable. Add it to theenv
section of the server's configuration in your MCP settings file (see below).
Note: Using netlify login
is not suitable for this server as it requires interactive browser authentication.
Configuration
Add the following configuration to your MCP settings file (location varies by platform), replacing "YOUR_NETLIFY_PAT_HERE"
with your actual Personal Access Token:
Replace /path/to/Netlify-MCP-Server
with the actual path where you cloned/installed the server.
Settings file locations:
- Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.json
- Cline Dev Extension (VS Code):
/home/user/.codeoss-cloudworkstations/data/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
(or similar based on OS/setup) - Consult your specific MCP client documentation for other potential locations.
Available Tools (Netlify CLI v19.1.5 Compatible)
(Parameters are based on the Zod schemas defined in src/index.ts
)
Site & Deployment Management
deploy-site
Deploy a site directory to Netlify.
Example:
list-sites
List all Netlify sites linked to your account.
Example:
trigger-build
Trigger a new build/deploy for a site. Site context is passed via NETLIFY_SITE_ID
env var.
Example:
build-site
Run a Netlify build locally (mimics Netlify build environment). Site context is passed via NETLIFY_SITE_ID
env var if siteId
is provided.
Example:
link-site
Link the current project directory to a Netlify site (requires Site ID for non-interactive use).
Example:
unlink-site
Unlink the current project directory from the associated Netlify site.
Example:
get-status
Show the Netlify status for the linked site/directory. (Will likely fail if run via MCP server unless the server directory itself is linked).
Example:
create-site
Create a new site on Netlify (non-interactively).
Example:
delete-site
Delete a site from Netlify.
Example:
Environment Variable Management
set-env-vars
Set one or more environment variables for a site. Site context is passed via NETLIFY_SITE_ID
env var.
Example:
get-env-var
Get the value of a specific environment variable. Site context is passed via NETLIFY_SITE_ID
env var if siteId
is provided.
Example:
unset-env-var
Unset (delete) an environment variable. Site context is passed via NETLIFY_SITE_ID
env var if siteId
is provided.
Example:
import-env
Import environment variables from a .env
file. Site context is passed via NETLIFY_SITE_ID
env var.
Example:
clone-env-vars
Clone environment variables from one site to another. Requires source site to be linked or specified via NETLIFY_SITE_ID
.
Example:
Serverless Functions
get-logs
View function logs. Site context is passed via NETLIFY_SITE_ID
env var.
Example:
Available Resources (Netlify CLI v19.1.5 Compatible)
Access Netlify data directly using these resource URIs:
netlify://sites
: List all sites (JSON output ofsites:list --json
)netlify://sites/{siteId}/functions
: List functions for a site (JSON output offunctions:list --json
, requiresNETLIFY_SITE_ID={siteId}
env var)netlify://sites/{siteId}/env
: List environment variables for a site (JSON output ofenv:list --json
, requiresNETLIFY_SITE_ID={siteId}
env var)
Limitations (Netlify CLI v19.1.5)
- Interactive Commands: Commands requiring interactive prompts (like
netlify login
,netlify init
,netlify dev
) are not supported by this server. Use a Personal Access Token for authentication. - Site Context: Many commands (
env:*
,logs:function
,build
,trigger-build
,functions:list
) require site context. This server passes the requiredsiteId
via theNETLIFY_SITE_ID
environment variable when executing these commands. Commands likestatus
andunlink
operate on the current working directory of the server, which is typically not linked, and thus may not function as expected when called via the MCP server. - Unsupported Commands: Functionality related to DNS, Forms, Plugins, Hooks, and Deploys (listing specific deploys, getting deploy status) has been removed due to incompatibility with CLI v19.1.5.
Development
To modify the server:
- Update source code in
src/index.ts
. - Build with
npm run build
. - Restart the MCP server in your client application to load changes.
- Test your changes.
Resources
You must be authenticated.
Tools
This is an MCP server that can be used with Netlify
- Recent Changes (April 8, 2025)
- Features (Compatible with Netlify CLI v19.1.5)
- Installation
- Authentication
- Configuration
- Available Tools (Netlify CLI v19.1.5 Compatible)
- Available Resources (Netlify CLI v19.1.5 Compatible)
- Limitations (Netlify CLI v19.1.5)
- Development
- Resources