Skip to content

Conversation

eleiton
Copy link

@eleiton eleiton commented Aug 13, 2025

Summary

This PR introduces a comprehensive demo implementation of a remote Model Context Protocol (MCP) server with integrated Atlassian OAuth authentication, deployed on Cloudflare Workers.

What's Added

New Demo Directory: demos/remote-mcp-atlassian-oauth/

A complete working example that demonstrates:

  • Remote MCP Server: A production-ready MCP server that can be deployed to Cloudflare Workers
  • OAuth Integration: Full OAuth 2.0 flow implementation using Atlassian as the identity provider
  • Authentication: Secure user authentication with token management via Cloudflare KV storage
  • Tool Implementation: Sample MCP tools including user information retrieval from Confluence

Key Components

  1. Main Server (src/index.ts): MCP server implementation with tool definitions
  2. OAuth Handler (src/atlassian-handler.ts): Atlassian-specific OAuth client implementation
  3. OAuth Utils (src/workers-oauth-utils.ts): OAuth provider utilities for Cloudflare Workers
  4. Configuration: Complete deployment configuration for Cloudflare Workers

Features

  • Dual OAuth Role: Acts as both OAuth server (for MCP clients) and OAuth client (for Atlassian)
  • Secure Token Storage: Uses Cloudflare KV for persistent authentication state
  • Production Ready: Includes both development and production deployment configurations
  • Client Integration: Compatible with Claude Desktop, Cursor, and other MCP clients
  • Comprehensive Documentation: Detailed setup and deployment instructions

Tools Provided

  • add: Demo tool for adding two numbers
  • getUserInfo: Retrieves current user information from Confluence

Technical Implementation

  • Built on Cloudflare Workers for serverless deployment
  • Uses @cloudflare/workers-oauth-provider for OAuth 2.1 server implementation
  • Integrates with MCP SDK for protocol compliance
  • Server-Sent Events (SSE) for real-time client communication
  • TypeScript with comprehensive type definitions

Use Cases

This demo serves as a reference implementation for:

  • Building remote MCP servers with OAuth authentication
  • Integrating third-party OAuth providers with MCP
  • Deploying MCP servers on Cloudflare Workers
  • Creating secure, multi-tenant MCP services

Files Changed

  • 11 new files added
  • 13,542 total lines added
  • Complete new demo directory structure

This implementation provides a solid foundation for developers looking to create secure, remotely accessible MCP servers with enterprise authentication.

Copy link

changeset-bot bot commented Aug 13, 2025

⚠️ No Changeset found

Latest commit: 261aafd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant