Skip to main content
Glama
Netlify MCP Server
by MCERQUA

Netlify MCP Server

MCP Server License: MIT

A Model Context Protocol (MCP) server for managing Netlify sites. This server enables seamless integration with Netlify's API through MCP, allowing you to create, manage, and deploy sites directly from your MCP-enabled environment.

Features

  • πŸš€ Create new sites from GitHub repositories

  • πŸ“‹ List existing Netlify sites with pagination

  • πŸ” Get detailed site information

  • πŸ—‘οΈ Delete sites

  • πŸ” Secure authentication with Netlify API

  • ⚑ Built with TypeScript for type safety

  • 🐳 Docker support for easy deployment

Related MCP server: Netlify MCP Server

Requirements

  • Node.js 18 or higher

  • A Netlify account with API access

  • A GitHub repository for deploying sites

Installation

From Source

  1. Clone this repository:

git clone https://github.com/MCERQUA/netlify-mcp.git
cd netlify-mcp
  1. Install dependencies:

npm install
  1. Build the project:

npm run build

Using Docker

docker build -t netlify-mcp .
docker run -e NETLIFY_ACCESS_TOKEN=your_token_here netlify-mcp

Configuration

Getting Your Netlify Access Token

  1. Create a Netlify account at https://app.netlify.com/signup

  2. Go to User Settings > Applications > Personal access tokens

  3. Click "New access token"

  4. Give it a name (e.g., "MCP Integration")

  5. Copy the generated token

Setting Up MCP

  1. Create a .env file in the project root:

NETLIFY_ACCESS_TOKEN=your_token_here
  1. Add the server to your MCP settings configuration:

{
  "mcpServers": {
    "netlify": {
      "command": "node",
      "args": ["path/to/netlify-mcp/build/index.js"],
      "env": {
        "NETLIFY_ACCESS_TOKEN": "your_token_here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Available Tools

createSiteFromGitHub

Create a new Netlify site from a GitHub repository.

interface CreateSiteFromGitHubArgs {
  name: string;          // Name for the new site (subdomain)
  repo: string;          // GitHub repository (format: owner/repo)
  branch?: string;       // Branch to deploy from (default: main)
  buildCommand: string;  // Build command to run
  publishDir: string;    // Directory containing the built files
  envVars?: Record<string, string>; // Environment variables
}

listSites

List all Netlify sites you have access to.

interface ListSitesArgs {
  filter?: 'all' | 'owner' | 'guest';  // Filter for sites
  page?: number;         // Page number for pagination
  perPage?: number;      // Items per page (max 100)
}

getSite

Get detailed information about a specific site.

interface GetSiteArgs {
  siteId: string;  // ID or name of the site
}

deleteSite

Delete a Netlify site.

interface DeleteSiteArgs {
  siteId: string;  // ID or name of the site
}

Documentation

For more detailed information, see:

Development

# Run in development mode with auto-rebuild
npm run dev

# Clean build artifacts
npm run clean

# Build the project
npm run build

Troubleshooting

Common Issues

  1. "NETLIFY_ACCESS_TOKEN environment variable is required"

    • Make sure you've set the token in your environment or .env file

  2. "Failed to create site: 401 Unauthorized"

    • Your access token might be invalid or expired

    • Generate a new token from Netlify settings

  3. "Invalid repo format"

    • Ensure the repository is in format owner/repo

    • Example: facebook/react, not https://github.com/facebook/react

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add some amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Available Tools

4 tools
createSiteFromGitHubC

Create a new Netlify site from a GitHub repository

Inputs: name (required), repo (required), buildCommand (required), publishDir (required), +2 more.

deleteSiteC

Delete a site

Inputs: siteId (required).

getSiteC

Get details of a specific site

Inputs: siteId (required).

listSitesB

List Netlify sites

Inputs: filter, page, perPage.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: createSiteFromGitHub creates sites from GitHub, deleteSite removes sites, getSite retrieves details, and listSites lists all sites. There is no overlap in functionality, making tool selection unambiguous.

    Naming Consistency4/5

    Three tools follow a consistent verb_noun pattern (deleteSite, getSite, listSites), but createSiteFromGitHub deviates slightly by including 'FromGitHub' for specificity. This minor inconsistency does not hinder readability, as the naming remains intuitive and mostly uniform.

    Tool Count3/5

    With only 4 tools, the server feels thin for managing Netlify sites, as it lacks operations like updating sites, managing deployments, or handling environment variables. While the core CRUD operations are covered, the scope is limited and may require workarounds for common workflows.

    Completeness3/5

    The tools cover basic CRUD operations (create, read, delete, list) for sites, but there are notable gaps such as updating site settings, managing deployments, or handling other Netlify resources like functions or forms. This incomplete surface could lead to agent failures for advanced tasks.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers