netlify-mcp-server

jonigl/netlify-mcp-server

3.2

If you are the rightful owner of netlify-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

A Model Context Protocol (MCP) server for interacting with the Netlify API, enabling users to manage sites, deploys, and environment variables efficiently.

Tools
5
Resources
0
Prompts
0

Netlify MCP Server

A Model Context Protocol (MCP) server for interacting with the Netlify API. Search for sites, get site details, and list deploys using MCP tools.

Features

  • Search Sites: Search for Netlify sites by name
  • Get Site Details: Retrieve information about a specific site
  • List Deploys: View deployment history for any site
  • Deploy Details: Get information about specific deployments
  • Environment Variables: List environment variables for a site

Prerequisites

  • Python 3.10 or higher
  • uv - Fast Python package installer
  • A Netlify account with an API token

Installation

  1. Clone this repository:
git clone <your-repo-url>
cd netlify-mcp-server
  1. Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Install dependencies:
uv sync
  1. Create a .env file and add your Netlify API token:
NETLIFY_API_TOKEN=your_actual_token_here

Getting a Netlify API Token

  1. Log in to Netlify
  2. Go to User SettingsApplicationsPersonal Access Tokens
  3. Click New access token
  4. Give it a name and click Generate token
  5. Copy the token and add it to your .env file

Usage

Running the Server

Start the MCP server:

uv run main.py

Or use the installed script:

uv run netlify-mcp-server

The server will start on http://0.0.0.0:3000/mcp by default.

Available Tools

1. search_sites

Search for Netlify sites by name.

Parameters:

  • name (optional): Site name to search for (returns all sites if empty)
  • page (default: 1): Page number for pagination

Returns: List of sites with state, plan, URLs, repo info, and published deploy.

2. get_site_details

Get information about a specific site including build settings, SSL configuration, and deployment info.

Parameters:

  • site_id (required): The ID of the site

Returns: Site information organized by sections (URLs, SSL & Security, Build Settings, Published Deploy, etc.)

3. list_site_deploys

List deployment history for a site.

Parameters:

  • site_id (required): The ID of the site
  • page (default: 1): Page number for pagination
  • per_page (default: 10): Number of results per page (max: 100)

Returns: List of deploys with state, branch, commit info, framework, URLs, and timestamps.

4. get_deploy_details

Get information about a specific deployment.

Parameters:

  • site_id (required): The ID of the site
  • deploy_id (required): The ID of the deploy

Returns: Deploy information including state, URLs, git info, build details, timing, and function schedules.

5. list_site_env_vars

List environment variables configured for a site.

Parameters:

  • site_id (required): The ID of the site

Returns: List of environment variables with keys, scopes, contexts, and metadata (values hidden for secret vars).

Configuration

You can customize the server behavior using environment variables in your .env file:

VariableDefaultDescription
NETLIFY_API_TOKEN(required)Your Netlify API token
NETLIFY_API_BASE_URLhttps://api.netlify.com/api/v1Netlify API base URL
NETLIFY_MAX_RESULTS100Maximum results per page for site searches
MCP_PORT3000Port for the MCP server
MCP_PATH/mcpPath for the MCP endpoint
MCP_INSTRUCTIONS(default message)Custom instructions for the MCP server

License

MIT