jonigl/netlify-mcp-server
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.
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
- Clone this repository:
git clone <your-repo-url>
cd netlify-mcp-server
- Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh
- Install dependencies:
uv sync
- Create a
.envfile and add your Netlify API token:
NETLIFY_API_TOKEN=your_actual_token_here
Getting a Netlify API Token
- Log in to Netlify
- Go to User Settings → Applications → Personal Access Tokens
- Click New access token
- Give it a name and click Generate token
- Copy the token and add it to your
.envfile
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 sitepage(default: 1): Page number for paginationper_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 sitedeploy_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:
| Variable | Default | Description |
|---|---|---|
NETLIFY_API_TOKEN | (required) | Your Netlify API token |
NETLIFY_API_BASE_URL | https://api.netlify.com/api/v1 | Netlify API base URL |
NETLIFY_MAX_RESULTS | 100 | Maximum results per page for site searches |
MCP_PORT | 3000 | Port for the MCP server |
MCP_PATH | /mcp | Path for the MCP endpoint |
MCP_INSTRUCTIONS | (default message) | Custom instructions for the MCP server |
License
MIT