概要
What is MCP example Netlify Express?
MCP example Netlify Express is a basic example site that demonstrates how to develop and run a serverless Model Context Protocol (MCP) server using Netlify Functions. It provides a deployed serverless function and a customized URL for accessing the MCP endpoint.
How to use MCP example Netlify Express?
Deploy your own version by clicking the “Deploy to Netlify” button, which clones the repo, creates a Netlify project, and sets up automated deployment. Alternatively, clone the examples repository locally, install the Netlify CLI, run netlify dev to serve the site, then use the MCP inspector (e.g., npx @modelcontextprotocol/inspector npx mcp-remote@next http://localhost:8888/mcp) to test the server.
Key features of MCP example Netlify Express
- Serverless MCP deployment using Netlify Functions
- Express-based routing with custom URL mapping
- One-click deploy via Netlify Deploy button
- Local development with Netlify Dev
- Configured redirects for Express route handling
Use cases of MCP example Netlify Express
- Deploying an MCP server on Netlify’s serverless platform
- Learning how to integrate Express with Netlify Functions for MCP
- Testing MCP functionality locally before production deployment
- Creating a reusable template for MCP serverless projects
FAQ from MCP example Netlify Express
How do I deploy this MCP server?
Click the “Deploy to Netlify” button in the README to automatically clone the repo, create a Netlify account project, and set up deployment. You can also clone the repo locally and run netlify dev for a local development environment.
What dependencies are required?
You need Node.js, the Netlify CLI (npm i -g netlify-cli), and optionally the MCP inspector (@modelcontextprotocol/inspector) for testing.
How do I configure routing for Express?
In netlify.toml, add a redirect rule to map the /mcp path to the Express function at /.netlify/functions/express-mcp-server. The example uses force = true, status = 200, and to = "/.netlify/functions/express-mcp-server".
Can I run the server locally?
Yes, after cloning the repo and installing dependencies, run netlify dev to start the site with local serverless functions. Then open a separate terminal to test with the MCP inspector.
Is authentication handled in this example?
No, the README does not mention any authentication mechanism. The example focuses on demonstrating basic MCP server deployment and routing.