This MCP (Model Context Protocol) server provides content querying tools for electricvehicle.life. It offers two deployment options: a local stdio-based server for direct Claude Desktop integration, and a Cloudflare Workers deployment for remote access.
The MCP server provides four content querying tools:
- search_content - Search for specific terms in electricvehicle.life content with context
- get_section - Retrieve specific sections by title/heading
- get_full_content - Get the complete content with optional truncation
- get_content_summary - Generate content statistics and table of contents
- Clone and install dependencies:
git clone <your-repo-url>
cd evlife-mcp-server
npm install- Configure Claude Desktop by adding to your MCP config:
{
"mcpServers": {
"evlife-content": {
"command": "node",
"args": ["/path/to/evlife-mcp-server/mcp-stdio.js"],
"env": {}
}
}
}- Restart Claude Desktop and the tools will be available.
-
Prerequisites:
- Sign up for a Cloudflare account
- Install Wrangler CLI
-
Authenticate with Cloudflare:
npx wrangler login- Deploy to Cloudflare Workers:
npm run deployThis will deploy your MCP server to a URL like: evlife-mcp-server.<your-account>.workers.dev/sse
This MCP server leverages several Cloudflare Workers features:
- Edge Computing: Runs close to users worldwide for low latency
- Durable Objects: Maintains stateful MCP agent instances
- Server-Sent Events: Real-time communication with MCP clients
- No Cold Starts: Fast response times with Cloudflare's V8 isolates
- Built-in Observability: Monitoring and analytics through Cloudflare dashboard
The server exposes two endpoints:
/sse- Server-Sent Events endpoint for MCP communication/mcp- Standard MCP endpoint
Configuration is managed in wrangler.jsonc:
# Start the Cloudflare Workers dev server
npm run dev
# Run TypeScript type checking
npm run type-check
# Format code
npm run format
# Fix linting issues
npm run lint:fix# Test the stdio server directly
node mcp-stdio.js
# The server will wait for MCP protocol messages on stdin├── src/
│ └── index.ts # Cloudflare Workers MCP server
├── mcp-stdio.js # Local stdio MCP server
├── package.json # Dependencies and scripts
├── wrangler.jsonc # Cloudflare Workers config
├── CLAUDE.md # Claude-specific documentation
└── README.md # This file
The server fetches content from https://electricvehicle.life/llms-full.txt and caches it for 5 minutes to improve performance. The content includes:
- Personal blog posts and essays
- Technical documentation
- Project descriptions
- Conference notes and insights
npx @modelcontextprotocol/inspectorAdd this to your Claude Desktop MCP configuration:
{
"mcpServers": {
"evlife-content": {
"command": "node",
"args": ["/absolute/path/to/mcp-stdio.js"],
"env": {}
}
}
}{
"mcpServers": {
"evlife-content": {
"command": "npx",
"args": [
"mcp-remote",
"https://your-worker-url.workers.dev/sse"
]
}
}
}For deployed Workers, you can test the MCP server using Cloudflare AI Playground:
- Go to https://playground.ai.cloudflare.com/
- Enter your deployed MCP server URL (
your-worker-url.workers.dev/sse) - Test the content querying tools directly
To use a custom domain with your Cloudflare Worker:
- Add a custom domain in your Cloudflare dashboard
- Update
wrangler.jsoncwith your domain:
{
"routes": [
{
"pattern": "mcp.yourdomain.com/*",
"custom_domain": true
}
]
}Add environment variables for configuration:
# Set environment variables
npx wrangler secret put API_KEY
npx wrangler secret put CONTENT_URLThen access them in your Worker:
// In src/index.ts
const contentUrl = env.CONTENT_URL || "https://electricvehicle.life/llms-full.txt";-
MCP Connection Failed
- Ensure the server URL is correct
- Check that the Worker is deployed and accessible
- Verify Claude Desktop configuration
-
Content Fetching Errors
- Check if
https://electricvehicle.life/llms-full.txtis accessible - Verify network connectivity from the Worker
- Monitor Cloudflare logs for fetch errors
- Check if
-
Development Server Issues
- Run
npm installto ensure dependencies are installed - Check Node.js version compatibility (v18+ recommended)
- Use
npm run type-checkto identify TypeScript errors
- Run
- View Worker logs in the Cloudflare dashboard
- Use
wrangler tailfor real-time log monitoring - Monitor MCP server logs in Claude Desktop
To add your own tools:
- Stdio server: Edit
mcp-stdio.jsand add new tool handlers - Workers server: Edit
src/index.tsand add tools in theinit()method
// In src/index.ts or mcp-stdio.js
this.server.tool(
"new_tool",
{
parameter: z.string().describe("Tool parameter")
},
async ({ parameter }) => {
// Tool implementation
return {
content: [{ type: "text", text: `Result: ${parameter}` }]
};
}
);
{ "name": "evlife-mcp-server", "main": "src/index.ts", "compatibility_date": "2025-03-10", "durable_objects": { "bindings": [ { "class_name": "MyMCP", "name": "MCP_OBJECT" } ] } }