cf-worker-anime-mcp

nurbxfit/cf-worker-anime-mcp

3.1

If you are the rightful owner of cf-worker-anime-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This repository provides a simple implementation of a Server-Sent Events (SSE) and streamable HTTP MCP server using Hono as the framework for Cloudflare Workers.

SSE & Streamable HTTP MCP Server Example for Cloudflare Workers

This repository provides a simple implementation of a MCP server using Hono as the framework for Cloudflare Workers. You can deploy this server to Cloudflare Workers or run it locally for development and testing.

Features

  • SSE Endpoint: Real-time updates via Server-Sent Events.
  • Streamable HTTP (MCP): Supports streamable HTTP responses.
  • Easy Deployment: Ready for Cloudflare Workers.
  • Local Development: Run locally with Wrangler.

Screenshots

Input Question

Input Question

Output Result

Output Result

MCP Request / Response

MCP Request Response

MCP Inspector

MCP Inspector

Getting Started

1. Install Dependencies

npm install

2. Start Development Server

npm run dev

3. Deploy to Cloudflare Workers

npm run deploy

Testing

You can test the SSE endpoint using the Model Context Protocol Inspector:

npx @modelcontextprotocol/inspector

Then, open your browser and navigate to http://localhost:6277 to access the test dashboard.

  • Select Transport Type as Streamable HTTP.
  • Click Connect to establish a connection.
  • Click List Tools to view available tools.

Integration with Claude

To use this server with claude, you can add the following configuration to claude_desktop.json:

{
    "mcpServers": {
        "myanime-list": {
            "type": "http",
            "url": "https://jikan-mcp.dev.nurbxfit.com/mcp",
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://jikan-mcp.dev.nurbxfit.com/mcp"
            ]
        }
    }
}

Self Deployment Setup

For Auth

For authorization with Github Oauth in your own deployment, you need to do the followings:

  • Create a Github OAuth App
  • Set the callback URL to your server's URL
  • Add the client ID and client secret to your environment variables

Create Github OAuth App

  1. Click on your github profile avatar
  2. Go to Settings
  3. Scroll down to Developer settings
  4. Click on OAuth Apps
  5. Click on New OAuth App
  6. Fill in the required fields
  7. Set the callback URL to your server's URL
  8. Click on Register application

Add Environment Variables

For this you need to use cloudflare secret to securely store the information. use the followings wrangler commands:

wrangler secret put GITHUB_CLIENT_ID
wrangler secret put GITHUB_CLIENT_SECRET
wrangler secret put COOKIE_ENCRYPTION_KEY

Callback url

example: https://your-server-url.com/callback