netlify-mcp-servers

Build and deploy authenticated MCP servers as Netlify Functions using the MCP SDK.

Updated May 19, 2026
One-click install
npx skills add https://github.com/costrict-plugins-repo/anthropic-netlify-skills --skill netlify-mcp-servers-costrict-plugins-repo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: netlify-mcp-servers
Source: https://github.com/costrict-plugins-repo/anthropic-netlify-skills/tree/main/codex/skills/netlify-mcp-servers
Command: npx skills add https://github.com/costrict-plugins-repo/anthropic-netlify-skills --skill netlify-mcp-servers-costrict-plugins-repo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @modelcontextprotocol/sdk, zod, and includes references (resource) components.

What problem does it solve? Exposing your app's tools and data to AI agents like Claude Code, Cursor, or Claude Desktop requires a remote MCP server, and building one correctly on serverless infrastructure involves tricky protocol, authentication, and statelessness concerns. This Skill provides a complete, verified pattern for running a Model Context Protocol server as a single Netlify Function. ## Core Features & Use Cases - Serverless MCP endpoint: Implements the MCP SDK's WebStandardStreamableHTTPServerTransport inside a Netlify Function with stateless request/response handling, correct Accept-header behavior, and CORS support for browser-based clients. - Authentication patterns: Covers single shared bearer secrets with constant-time comparison and per-user API keys backed by Netlify Identity, including key hashing, revocation, and user resolution. - Safety and operations: Includes declarative rate limiting, tool permission guidance, presigned-URL file uploads to Netlify Blobs, and client connection instructions for Claude Code, Cursor, and Claude Desktop. - Use Case: Wrap a third-party API as MCP tools so Claude Code can query it, or add an /mcp endpoint to an existing Netlify site so agents can act on your app's data with per-user API keys. ## Quick Start Ask the agent to create a Netlify Function at /mcp that exposes a read-only tool using the MCP SDK with bearer token authentication, then connect it to Claude Code.

Frequently Asked Questions about netlify-mcp-servers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an MCP server on Netlify?

Create a Netlify Function that uses the MCP SDK's WebStandardStreamableHTTPServerTransport to handle POST requests at a path like /mcp. Build a fresh McpServer per request with sessionIdGenerator undefined and enableJsonResponse true, then return the transport's Response.

How do I authenticate requests to a remote MCP server?

Require an Authorization: Bearer token on every request and return 401 otherwise. For single-user servers compare one env-var secret in constant time; for multi-user servers store SHA-256 hashes of per-user API keys and resolve each key to a user on every request.

Why does my MCP client get a 406 error from the server?

A 406 means the client's POST request is missing both application/json and text/event-stream in its Accept header, which the MCP spec requires. Fix the client's Accept header rather than changing the server.

Can a browser-based app call a Netlify-hosted MCP server?

Yes, but Netlify Functions do not add CORS headers automatically. Handle the OPTIONS preflight in the function before the 405 check and echo Access-Control-Allow-Origin, Methods, and Headers on the POST response.

How do I let an AI agent upload files through an MCP tool?

Do not pass bytes through the tool call as base64. Instead issue a short-lived HMAC-signed presigned URL from a prepare_upload tool, let the agent PUT raw bytes to it, store the file in Netlify Blobs, and confirm via a finalize_upload tool.

Why does in-memory state fail in a serverless MCP server?

Each request may run on a different or cold-started function instance, so module-level Maps or Sets are not shared or durable. Keep replay tracking, idempotency keys, and counters in a durable store like Netlify Blobs or a database.