BestReads
Remote MCP Server built using Cloudflare Workers.
claude mcp add --transport stdio dinasaur404-bestreads-mcp-server npx -y bestreads-mcp-server \ --env OAUTH_KV="KV namespace binding name (optional external KV)" \ --env MCP_OBJECT="Durable Object class binding name" \ --env GITHUB_CLIENT_ID="GitHub OAuth App Client ID" \ --env GITHUB_CLIENT_SECRET="GitHub OAuth App Client Secret" \ --env COOKIE_ENCRYPTION_KEY="32-byte hex key" \ --env USER_BOOK_PREFERENCES="Durable Object class binding name"
How to use
BestReads is a remote MCP server built on Cloudflare Workers that provides personalized book recommendations. It uses the Agents SDK to implement the MCP surface, Durable Objects to persist user reading preferences, and Workers AI to generate tailored suggestions. Authentication is integrated via GitHub using Cloudflare's OAuth provider, enabling users to sign in and have their reading history, preferences, and preferences stored securely. The server supports two transport methods for MCP clients: Server-Sent Events (SSE) for real-time updates and the Streamable HTTP (mcp) transport for chunked responses. To try it quickly, you can access the SSE endpoint at https://bestreads.dinas.workers.dev/sse or the Streamable HTTP endpoint at https://bestreads.dinas.workers.dev/mcp if your client supports it.
How to install
Prerequisites:
- Node.js and npm installed on your machine
- Wrangler CLI installed and configured for Cloudflare Workers
- A GitHub OAuth App created to enable GitHub login
-
Clone the repository git clone <your-repo-url> cd bestreads-mcp-server
-
Install dependencies npm install
-
Configure OAuth and encryption keys
- Create a GitHub OAuth App and set the Authorization callback URL to https://your-worker-domain.workers.dev/callback
- In Wrangler configuration (wrangler.toml), set: GITHUB_CLIENT_ID = your_github_client_id GITHUB_CLIENT_SECRET = your_github_client_secret COOKIE_ENCRYPTION_KEY = a_32_byte_hex_key
- (Optional) Create a KV namespace and Durable Object bindings as described in the README: [[kv_namespaces]] binding = "OAUTH_KV" id = "your_kv_namespace_id" [[durable_objects.bindings]] name = "MCP_OBJECT" class_name = "MyMCP" [[durable_objects.bindings]] name = "USER_BOOK_PREFERENCES" class_name = "UserBookPreferences"
-
Deploy to Cloudflare Workers wrangler deploy
-
Access the server endpoints
Additional notes
Tips:
- Ensure your Wrangler configuration matches your Cloudflare account and the OAuth app settings.
- If you encounter issues with authentication, verify the OAuth redirect URL and ensure the GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET are correctly set.
- The Durable Objects names (e.g., MCP_OBJECT and USER_BOOK_PREFERENCES) must be bound in wrangler.toml as shown in the README to persist user preferences.
- The COOKIE_ENCRYPTION_KEY must be exactly 32 bytes (256 bits) in hex.
- The MCP server supports both SSE and mcp transports. Choose the transport that matches your MCP client capabilities.
- If you are not deploying, you can still test by using the provided example endpoints if the worker is already deployed.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud