moechehabb/arthur-mcp-server
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.
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
- Sign up for a Clerk account at https://clerk.com
- Create a new application
- Get your
CLERK_PUBLISHABLE_KEYandCLERK_SECRET_KEYfrom 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 connectiontools/list- List available toolstools/call- Call a toolresources/list- List available resourcesresources/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 messageget_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
-
Authenticate with Cloudflare:
npx wrangler login -
Set your Clerk secrets:
npx wrangler secret put CLERK_PUBLISHABLE_KEY npx wrangler secret put CLERK_SECRET_KEY(Paste your keys from
.dev.varswhen prompted) -
Deploy:
npm run deploy
Your worker will be available at https://arthur-mcp-server.<your-subdomain>.workers.dev
License
MIT