mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
feat: added HTTP-Based MCP Server on Netlify
This commit is contained in:
@@ -6,6 +6,7 @@ slug: "how-to-use-agentmail"
|
||||
published: true
|
||||
featured: true
|
||||
featuredOrder: 3
|
||||
blogFeatured: true
|
||||
image: /images/agentmail-blog.png
|
||||
tags: ["agentmail", "newsletter", "email", "setup"]
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "How to use Firecrawl"
|
||||
description: "Import external articles as markdown posts using Firecrawl. Get your API key and configure environment variables for local imports and AI chat."
|
||||
date: "2025-12-20"
|
||||
date: "2025-12-26"
|
||||
slug: "how-to-use-firecrawl"
|
||||
published: true
|
||||
image: /images/firecrwall-blog.png
|
||||
|
||||
244
content/blog/how-to-use-mcp-server.md
Normal file
244
content/blog/how-to-use-mcp-server.md
Normal file
@@ -0,0 +1,244 @@
|
||||
---
|
||||
title: "How to Use the MCP Server"
|
||||
description: "Guide to using the HTTP-based Model Context Protocol server at www.markdown.fast/mcp with Cursor and other AI tools"
|
||||
date: "2025-12-28"
|
||||
slug: "how-to-use-mcp-server"
|
||||
published: true
|
||||
tags: ["mcp", "cursor", "ai", "tutorial", "netlify"]
|
||||
---
|
||||
|
||||
This site includes an HTTP-based Model Context Protocol (MCP) server that allows AI tools like Cursor, Claude Desktop, and other MCP-compatible clients to access blog content programmatically.
|
||||
|
||||
## What is MCP?
|
||||
|
||||
The Model Context Protocol is an open standard for connecting AI applications to external data sources. It enables AI assistants to read content, search, and retrieve information from connected systems.
|
||||
|
||||
Our MCP server exposes read-only tools for accessing:
|
||||
|
||||
- Blog posts (list, get by slug, search)
|
||||
- Static pages (list, get by slug)
|
||||
- Homepage data (featured content, recent posts)
|
||||
- Full content export
|
||||
|
||||
## Endpoint URL
|
||||
|
||||
The MCP server is available 24/7 at:
|
||||
|
||||
```
|
||||
https://www.markdown.fast/mcp
|
||||
```
|
||||
|
||||
No authentication is required for public access.
|
||||
|
||||
## Available tools
|
||||
|
||||
The server exposes seven tools:
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `list_posts` | Get all published blog posts with metadata |
|
||||
| `get_post` | Get a single post by slug with full content |
|
||||
| `list_pages` | Get all published pages |
|
||||
| `get_page` | Get a single page by slug with full content |
|
||||
| `get_homepage` | Get homepage data with featured and recent posts |
|
||||
| `search_content` | Full text search across posts and pages |
|
||||
| `export_all` | Batch export all content |
|
||||
|
||||
## Client configuration
|
||||
|
||||
### Cursor
|
||||
|
||||
Add to your Cursor MCP configuration file (`~/.cursor/mcp.json`):
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"markdown-fast": {
|
||||
"url": "https://www.markdown.fast/mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Claude Desktop
|
||||
|
||||
Add to your Claude Desktop configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"markdown-fast": {
|
||||
"url": "https://www.markdown.fast/mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### With API key (optional)
|
||||
|
||||
If you have an API key for higher rate limits:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"markdown-fast": {
|
||||
"url": "https://www.markdown.fast/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer your-api-key-here"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Rate limiting
|
||||
|
||||
The server uses Netlify's built-in rate limiting:
|
||||
|
||||
- **Public access**: 50 requests per minute per IP address
|
||||
- **Authenticated access**: Higher limits with API key
|
||||
|
||||
When rate limited, the server returns HTTP 429. Wait a minute before retrying.
|
||||
|
||||
## Example requests
|
||||
|
||||
### Initialize connection
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1,
|
||||
"method": "initialize",
|
||||
"params": {
|
||||
"protocolVersion": "2024-11-05",
|
||||
"capabilities": {},
|
||||
"clientInfo": {
|
||||
"name": "my-client",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### List available tools
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 2,
|
||||
"method": "tools/list"
|
||||
}
|
||||
```
|
||||
|
||||
### Get all posts
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 3,
|
||||
"method": "tools/call",
|
||||
"params": {
|
||||
"name": "list_posts",
|
||||
"arguments": {}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Get a specific post
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 4,
|
||||
"method": "tools/call",
|
||||
"params": {
|
||||
"name": "get_post",
|
||||
"arguments": {
|
||||
"slug": "setup-guide"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Search content
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 5,
|
||||
"method": "tools/call",
|
||||
"params": {
|
||||
"name": "search_content",
|
||||
"arguments": {
|
||||
"query": "markdown"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Testing with curl
|
||||
|
||||
Test the server directly:
|
||||
|
||||
```bash
|
||||
# Initialize
|
||||
curl -X POST https://www.markdown.fast/mcp \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'
|
||||
|
||||
# List tools
|
||||
curl -X POST https://www.markdown.fast/mcp \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
|
||||
|
||||
# Get all posts
|
||||
curl -X POST https://www.markdown.fast/mcp \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_posts","arguments":{}}}'
|
||||
```
|
||||
|
||||
## Security
|
||||
|
||||
The MCP server is designed with security in mind:
|
||||
|
||||
- **Read-only access**: No mutations or writes are exposed
|
||||
- **Public content**: Uses the same queries as the public website
|
||||
- **Rate limiting**: Prevents abuse via Netlify's built-in rate limiting
|
||||
- **HTTPS encryption**: All traffic is encrypted
|
||||
- **Optional authentication**: API keys available for higher limits
|
||||
|
||||
## For your own fork
|
||||
|
||||
When you fork this site, the MCP server automatically connects to your Convex deployment. Just ensure:
|
||||
|
||||
1. `VITE_CONVEX_URL` is set in your Netlify environment variables
|
||||
2. (Optional) Set `MCP_API_KEY` for authenticated access
|
||||
|
||||
The server reads from your Convex database, so any content you sync will be available via MCP.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Server returns 500 error
|
||||
|
||||
Check that `VITE_CONVEX_URL` is set in your Netlify environment variables.
|
||||
|
||||
### Rate limit exceeded
|
||||
|
||||
Wait 60 seconds before retrying. Consider using an API key for higher limits.
|
||||
|
||||
### Tool not found
|
||||
|
||||
Verify the tool name matches one of the seven available tools exactly.
|
||||
|
||||
### Invalid JSON-RPC
|
||||
|
||||
Ensure your request includes:
|
||||
- `"jsonrpc": "2.0"`
|
||||
- A numeric or string `id`
|
||||
- A `method` string
|
||||
|
||||
## Resources
|
||||
|
||||
- [Model Context Protocol specification](https://modelcontextprotocol.io)
|
||||
- [Cursor MCP documentation](https://docs.cursor.com/context/model-context-protocol)
|
||||
- [Claude Desktop MCP setup](https://claude.ai/docs/mcp)
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Netlify edge functions blocking AI crawlers from static files"
|
||||
description: "Why excludedPath in netlify.toml isn't preventing edge functions from intercepting /raw/* requests, and how ChatGPT and Perplexity get blocked while Claude works."
|
||||
date: "2025-12-21"
|
||||
date: "2025-12-14"
|
||||
slug: "netlify-edge-excludedpath-ai-crawlers"
|
||||
published: true
|
||||
tags: ["netlify", "edge-functions", "ai", "troubleshooting", "help"]
|
||||
|
||||
@@ -1598,3 +1598,35 @@ After deploying:
|
||||
5. Share your first post
|
||||
|
||||
Your blog is now live with real-time updates, SEO optimization, and AI-friendly APIs. Every time you sync new posts, they appear immediately without redeploying.
|
||||
|
||||
## MCP Server
|
||||
|
||||
Your site includes an HTTP-based Model Context Protocol (MCP) server for AI tool integration.
|
||||
|
||||
**Endpoint:** `https://your-site.netlify.app/mcp`
|
||||
|
||||
The MCP server runs 24/7 on Netlify Edge Functions and allows AI assistants like Cursor and Claude Desktop to access your blog content programmatically. No local machine required.
|
||||
|
||||
**Features:**
|
||||
|
||||
- Public access with rate limiting (50 req/min per IP)
|
||||
- Optional API key for higher limits (1000 req/min)
|
||||
- Seven tools: list_posts, get_post, list_pages, get_page, get_homepage, search_content, export_all
|
||||
|
||||
**Configuration:**
|
||||
|
||||
Add to your Cursor config (`~/.cursor/mcp.json`):
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"my-blog": {
|
||||
"url": "https://your-site.netlify.app/mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**For higher rate limits:** Set `MCP_API_KEY` in your Netlify environment variables, then add the Authorization header to your client config.
|
||||
|
||||
See [How to Use the MCP Server](/how-to-use-mcp-server) for full documentation.
|
||||
|
||||
@@ -9,6 +9,52 @@ layout: "sidebar"
|
||||
All notable changes to this project.
|
||||

|
||||
|
||||
## v1.39.0
|
||||
|
||||
Released December 28, 2025
|
||||
|
||||
**HTTP-based MCP Server**
|
||||
|
||||
- Model Context Protocol (MCP) server deployed on Netlify Edge Functions
|
||||
- Accessible 24/7 at `https://www.markdown.fast/mcp`
|
||||
- No local machine required (unlike stdio-based MCP servers)
|
||||
- Works with Cursor, Claude Desktop, and other MCP-compatible clients
|
||||
- Public access with Netlify built-in rate limiting (50 req/min per IP)
|
||||
- Optional API key authentication for higher limits (1000 req/min)
|
||||
- Set `MCP_API_KEY` in Netlify environment variables
|
||||
- Add `Authorization: Bearer <key>` header to requests
|
||||
- Read-only access to blog content:
|
||||
- `list_posts`: Get all published posts with metadata
|
||||
- `get_post`: Get single post by slug with full content
|
||||
- `list_pages`: Get all published pages
|
||||
- `get_page`: Get single page by slug with full content
|
||||
- `get_homepage`: Get homepage data with featured and recent posts
|
||||
- `search_content`: Full text search across posts and pages
|
||||
- `export_all`: Batch export all content
|
||||
|
||||
**Documentation**
|
||||
|
||||
- Blog post: "How to Use the MCP Server" with client configuration examples
|
||||
- MCP Server section added to docs.md
|
||||
- MCP configuration added to siteConfig.ts
|
||||
- Setup guide updated with MCP server section
|
||||
|
||||
**Configuration**
|
||||
|
||||
Add to Cursor (`~/.cursor/mcp.json`):
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"markdown-fast": {
|
||||
"url": "https://www.markdown.fast/mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Updated files: `netlify/edge-functions/mcp.ts`, `netlify.toml`, `package.json`, `src/config/siteConfig.ts`, `content/blog/how-to-use-mcp-server.md`, `content/pages/docs.md`, `content/blog/setup-guide.md`, `files.md`, `changelog.md`, `content/pages/changelog-page.md`
|
||||
|
||||
## v1.38.0
|
||||
|
||||
Released December 27, 2025
|
||||
|
||||
@@ -983,6 +983,49 @@ The `newsletter:send` command calls the `scheduleSendPostNewsletter` mutation di
|
||||
| `/openapi.yaml` | OpenAPI 3.0 specification |
|
||||
| `/llms.txt` | AI agent discovery |
|
||||
|
||||
## MCP Server
|
||||
|
||||
The site includes an HTTP-based Model Context Protocol (MCP) server for AI tool integration. It allows AI assistants like Cursor and Claude Desktop to access blog content programmatically.
|
||||
|
||||
**Endpoint:** `https://www.markdown.fast/mcp`
|
||||
|
||||
**Features:**
|
||||
|
||||
- 24/7 availability via Netlify Edge Functions
|
||||
- Public access with rate limiting (50 req/min per IP)
|
||||
- Optional API key for higher limits (1000 req/min)
|
||||
- Read-only access to content
|
||||
|
||||
**Available tools:**
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `list_posts` | Get all published blog posts with metadata |
|
||||
| `get_post` | Get a single post by slug with full content |
|
||||
| `list_pages` | Get all published pages |
|
||||
| `get_page` | Get a single page by slug with full content |
|
||||
| `get_homepage` | Get homepage data with featured and recent posts |
|
||||
| `search_content` | Full text search across posts and pages |
|
||||
| `export_all` | Batch export all content |
|
||||
|
||||
**Cursor configuration:**
|
||||
|
||||
Add to `~/.cursor/mcp.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"markdown-fast": {
|
||||
"url": "https://www.markdown.fast/mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**For forks:** The MCP server automatically connects to your Convex deployment. Ensure `VITE_CONVEX_URL` is set in Netlify. Optionally set `MCP_API_KEY` for authenticated access with higher rate limits.
|
||||
|
||||
See [How to Use the MCP Server](/how-to-use-mcp-server) for full documentation.
|
||||
|
||||
## Raw markdown files
|
||||
|
||||
When you run `npm run sync` (development) or `npm run sync:prod` (production), static `.md` files are generated in `public/raw/` for each published post and page. Use `npm run sync:all` or `npm run sync:all:prod` to sync content and update discovery files together.
|
||||
|
||||
Reference in New Issue
Block a user