arthur-mcp-server

moechehabb/arthur-mcp-server

3.2

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

The Arthur MCP Server is a Cloudflare Worker implementation designed to deploy real-time conversational agents, enhancing coding workflows and reducing technical debt.

Tools
2
Resources
0
Prompts
0

arthur-mcp-server

Deploy real-time conversational agents to support your coding flows and reduce technical debt in development.

A Cloudflare Worker implementation of a Model Context Protocol (MCP) server with Clerk authentication.

Features

  • ✅ MCP (Model Context Protocol) server implementation
  • ✅ Clerk authentication middleware
  • ✅ Cloudflare Workers deployment
  • ✅ TypeScript support
  • ✅ CORS enabled
  • ✅ Example tools and resources

Prerequisites

  • Node.js 18+ and npm
  • Cloudflare account
  • Clerk account (for authentication)

Setup

1. Install Dependencies

npm install

2. Configure Clerk

  1. Sign up for a Clerk account at https://clerk.com
  2. Create a new application
  3. Get your CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY from the dashboard

3. Set Environment Variables

For local development, create a .env file (or use wrangler secrets):

# Set secrets for Cloudflare Workers
wrangler secret put CLERK_PUBLISHABLE_KEY
wrangler secret put CLERK_SECRET_KEY

For local development, you can also use a .dev.vars file:

CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...

4. Configure Wrangler

Update wrangler.toml with your domain configuration if you want to use a custom domain.

5. Run Locally

npm run dev

The server will be available at http://localhost:8787

6. Deploy

npm run deploy

Usage

Authentication

All requests must include a Clerk session token in the Authorization header:

Authorization: Bearer <clerk_session_token>

MCP Protocol

The server implements the following MCP methods:

  • initialize - Initialize the MCP connection
  • tools/list - List available tools
  • tools/call - Call a tool
  • resources/list - List available resources
  • resources/read - Read a resource

Example Request

curl -X POST https://your-worker.workers.dev \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <clerk_token>" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

Example Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      {
        "name": "echo",
        "description": "Echo back the input message",
        "inputSchema": {
          "type": "object",
          "properties": {
            "message": {
              "type": "string",
              "description": "The message to echo"
            }
          },
          "required": ["message"]
        }
      }
    ]
  }
}

Available Tools

  • echo - Echo back a message
  • get_time - Get the current server time

Project Structure

.
├── src/
│   ├── index.ts              # Main Cloudflare Worker entry point
│   ├── middleware/
│   │   └── auth.ts           # Clerk authentication middleware
│   ├── mcp/
│   │   └── handlers.ts       # MCP protocol handlers
│   └── types/
│       └── mcp.ts            # MCP type definitions
├── package.json
├── tsconfig.json
├── wrangler.toml             # Cloudflare Workers configuration
└── README.md

Development

# Type checking
npm run type-check

# Local development
npm run dev

# Deploy to Cloudflare
npm run deploy

Deployment

See for detailed deployment instructions.

Quick Deploy

  1. Authenticate with Cloudflare:

    npx wrangler login
    
  2. Set your Clerk secrets:

    npx wrangler secret put CLERK_PUBLISHABLE_KEY
    npx wrangler secret put CLERK_SECRET_KEY
    

    (Paste your keys from .dev.vars when prompted)

  3. Deploy:

    npm run deploy
    

Your worker will be available at https://arthur-mcp-server.<your-subdomain>.workers.dev

License

MIT