netlify-mcp-servers

netlify-mcp-servers is a cursor rule for coding agents from netlify/context-and-tools. It costs 132 tokens per session (3,932 once invoked), scanned A, original, MIT.

A guide for building a remote Model Context Protocol (MCP) server as a Netlify Function. MCP lets AI clients such as Claude Code or Cursor call tools and access data from your app.

In plain words
What is it for?
Use it to create an MCP server, add MCP tools to a Netlify site, or connect Claude, Cursor, or Claude Code to a custom remote server.
Why use it?
It explains how to expose your app or API to AI agents and keep the server secure. It also distinguishes your own MCP server from Netlify’s separate hosted server for managing Netlify sites.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/netlify/context-and-tools/netlify-mcp-servers
Clone the repo
git clone --depth 1 https://github.com/netlify/context-and-tools

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for netlify-mcp-servers

README.md
[![agentmods](https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-mcp-servers.svg)](https://agentmods.dev/rules/netlify/context-and-tools/netlify-mcp-servers)
Your own site
<a href="https://agentmods.dev/rules/netlify/context-and-tools/netlify-mcp-servers"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-mcp-servers.svg" alt="Measured on agentmods" height="20"></a>
Per session 132 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,932 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00132 $0.03932
Opus 5 $0.00066 $0.01966
Sonnet 5 $0.00026 $0.00786
Haiku 4.5 $0.00013 $0.00393

Measured 4d ago against content hash ee517011a8ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

netlify-mcp-servers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cursor/rules/netlify-mcp-servers.mdc · 210 lines

How it starts

The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Netlify MCP Servers

An MCP server exposes tools (and optionally resources/prompts) that an AI client — Claude Desktop, Claude Code, Cursor — can call. On Netlify, a remote MCP server is just one Netlify Function that speaks the MCP protocol over HTTP. This skill gets you a working, secure server and connects a client to it.

"Netlify MCP" means two different things — make sure you're building the right one. Netlify publishes its own hosted MCP server that lets an AI client operate the Netlify platform on your behalf — create projects, trigger deploys, manage env vars and infrastructure through your Netlify account. You don't write that one; you point your client at Netlify's hosted MCP server per Netlify's MCP-server docs (and see the netlify-agent-runner skill for running agents against your site). This skill is the other thing: building your own MCP server — an endpoint that exposes your app's tools and data to an agent — hosted on a Netlify Function. If the ask is "let my agent manage my Netlify sites/deploys/env vars," that's the hosted Netlify MCP server, not a function you write.

The same setup works two ways:

  • Standalone server — a repo whose only job is the MCP endpoint (e.g. wrapping a third-party API).
  • Added to an existing app — one more function alongside your site. Have its tools call the same service/data layer your UI and REST routes already use, so logic isn't duplicated.

Before you build

Decide one thing up front, because it shapes the auth code:

  • Who calls this server? Just you (a personal/single-user server) → use a single shared secret. Multiple people, each acting as themselves → use per-user API keys backed by Netlify Identity. See authentication.

If you're not sure, start with the single shared secret — it's a few lines and you can layer per-user keys on later. I'll default to that unless you say otherwise.

Stack

Use the official MCP SDK with its Web-standard Streamable HTTP transport, running statelessly inside a Netlify Function.

Read the full file on GitHub · 210 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 210 lines · 132 tokens per session scan A ee517011a8ad

Subscribe to this mod's changes

netlify-mcp-servers is a cursor rule published in the GitHub repository netlify/context-and-tools (36 stars, last pushed yesterday), licensed MIT. It adds 132 tokens to every session and 3,932 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.