Netlify MCP Server
This is an MCP server that can be used with Netlify
This is an MCP server that can be used with Netlify
A Model Context Protocol server that provides comprehensive tools for working with Netlify through their CLI. This server enables deploying sites, managing deployments, handling environment variables, DNS settings, serverless functions, forms, plugins, and webhooks.
To install Netlify MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @DynamicEndpoints/Netlify-MCP-Server --client claude
Install dependencies:
npm install
Build the server:
npm run build
Install Netlify CLI globally:
npm install -g netlify-cli
Authenticate with Netlify:
netlify login
This will open a browser window for authentication. After authenticating, the CLI will store your token locally.
Add to your MCP settings file (location varies by platform):
{
"mcpServers": {
"netlify": {
"command": "node",
"args": ["path/to/netlify-server/build/index.js"],
"disabled": false,
"autoApprove": []
}
}
}
Settings file locations:
- Windows: %APPDATA%/Windsurf/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Linux: ~/.config/claude/settings.json
Deploy a site to Netlify
{
"path": "path/to/site", // Required: Path to the site directory
"prod": false, // Optional: Deploy to production
"message": "New deployment" // Optional: Deploy message
}
List all Netlify sites
// No parameters required
Get deployment status for a site
{
"siteId": "your-site-id", // Required: Site ID or name
"deployId": "deploy-id" // Optional: Specific deployment ID
}
Add a DNS record to a site
{
"siteId": "your-site-id", // Required: Site ID or name
"domain": "example.com", // Required: Domain name
"type": "A", // Required: Record type (A, AAAA, CNAME, MX, TXT, NS)
"value": "192.0.2.1", // Required: Record value
"ttl": 3600 // Optional: Time to live in seconds
}
Deploy a serverless function
{
"path": "path/to/function", // Required: Path to the function file
"name": "my-function", // Required: Function name
"runtime": "nodejs" // Optional: Function runtime
}
Manage form submissions
{
"siteId": "your-site-id", // Required: Site ID or name
"formId": "form-id", // Required: Form ID
"action": "enable" // Required: Action (enable, disable, delete)
}
Manage site plugins
{
"siteId": "your-site-id", // Required: Site ID or name
"pluginId": "plugin-id", // Required: Plugin ID
"action": "install", // Required: Action (install, uninstall, update)
"config": { // Optional: Plugin configuration
"setting": "value"
}
}
Set environment variables for a site
{
"siteId": "your-site-id", // Required: Site ID or name
"envVars": { // Required: Environment variables
"API_KEY": "your-api-key",
"DEBUG": "false"
}
}
Manage webhook notifications
{
"siteId": "your-site-id", // Required: Site ID or name
"event": "deploy-succeeded", // Required: Event type
"url": "https://example.com", // Required: Webhook URL
"action": "create" // Required: Action (create, delete, update)
}
The server provides detailed error messages for: - Authentication failures - Invalid site IDs - Deployment failures - Network connectivity issues - Invalid parameter types - DNS configuration errors - Function deployment issues - Plugin installation problems - Webhook configuration errors
To modify the server:
src/index.ts
npm run build
The server uses Zod for runtime type validation of all parameters, ensuring: - Required parameters are provided - Parameters have correct types - Optional parameters are properly handled - Enum values are validated - Complex object structures are verified
[
{
"description": "Deploy a site to Netlify",
"inputSchema": {
"properties": {
"message": {
"description": "Deploy message",
"type": "string"
},
"path": {
"description": "Path to the site directory",
"type": "string"
},
"prod": {
"description": "Deploy to production",
"type": "boolean"
}
},
"required": [
"path"
],
"type": "object"
},
"name": "deploy-site"
},
{
"description": "List all Netlify sites",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "list-sites"
},
{
"description": "Set environment variables for a site",
"inputSchema": {
"properties": {
"envVars": {
"additionalProperties": {
"type": "string"
},
"description": "Environment variables to set",
"type": "object"
},
"siteId": {
"description": "Site ID or name",
"type": "string"
}
},
"required": [
"siteId",
"envVars"
],
"type": "object"
},
"name": "set-env-vars"
},
{
"description": "Get deployment status for a site",
"inputSchema": {
"properties": {
"deployId": {
"description": "Deployment ID",
"type": "string"
},
"siteId": {
"description": "Site ID or name",
"type": "string"
}
},
"required": [
"siteId"
],
"type": "object"
},
"name": "get-deploy-status"
},
{
"description": "Add a DNS record to a site",
"inputSchema": {
"properties": {
"domain": {
"description": "Domain name",
"type": "string"
},
"siteId": {
"description": "Site ID or name",
"type": "string"
},
"ttl": {
"description": "Time to live in seconds",
"type": "number"
},
"type": {
"description": "DNS record type",
"enum": [
"A",
"AAAA",
"CNAME",
"MX",
"TXT",
"NS"
],
"type": "string"
},
"value": {
"description": "DNS record value",
"type": "string"
}
},
"required": [
"siteId",
"domain",
"type",
"value"
],
"type": "object"
},
"name": "add-dns-record"
},
{
"description": "Deploy a serverless function",
"inputSchema": {
"properties": {
"name": {
"description": "Function name",
"type": "string"
},
"path": {
"description": "Path to the function file",
"type": "string"
},
"runtime": {
"description": "Function runtime (e.g., nodejs, go)",
"type": "string"
}
},
"required": [
"path",
"name"
],
"type": "object"
},
"name": "deploy-function"
},
{
"description": "Manage form submissions",
"inputSchema": {
"properties": {
"action": {
"description": "Action to perform",
"enum": [
"enable",
"disable",
"delete"
],
"type": "string"
},
"formId": {
"description": "Form ID",
"type": "string"
},
"siteId": {
"description": "Site ID or name",
"type": "string"
}
},
"required": [
"siteId",
"formId",
"action"
],
"type": "object"
},
"name": "manage-form"
},
{
"description": "Manage site plugins",
"inputSchema": {
"properties": {
"action": {
"description": "Action to perform",
"enum": [
"install",
"uninstall",
"update"
],
"type": "string"
},
"config": {
"description": "Plugin configuration",
"type": "object"
},
"pluginId": {
"description": "Plugin ID",
"type": "string"
},
"siteId": {
"description": "Site ID or name",
"type": "string"
}
},
"required": [
"siteId",
"pluginId",
"action"
],
"type": "object"
},
"name": "manage-plugin"
},
{
"description": "Manage webhook notifications",
"inputSchema": {
"properties": {
"action": {
"description": "Action to perform",
"enum": [
"create",
"delete",
"update"
],
"type": "string"
},
"event": {
"description": "Event type",
"type": "string"
},
"siteId": {
"description": "Site ID or name",
"type": "string"
},
"url": {
"description": "Webhook URL",
"type": "string"
}
},
"required": [
"siteId",
"event",
"url",
"action"
],
"type": "object"
},
"name": "manage-hook"
}
]