Remote MCP Server using Descope's MCP Auth SDK (Express) and Fly.io
Introduction
This example shows how to add auth to a Remote MCP Server using Descope's MCP Auth SDK (Express) and deploy it to Fly.io. It handles fetching weather-related data.
Preview
This MCP Server is deployed to Fly.io here: https://mcp-server-weather-ez9f9a.fly.dev
You can connect to the server using the Cloudflare Playground, MCP Inspector or any other MCP client. Be sure to include the /sse
path in the connection URL.
Features
- Real-time weather data streaming
- Secure authentication using Descope
- MCP Authorization Compliant
Requirements
Before proceeding, make sure you have the following:
- Node.js (version 18 or later)
- A valid Descope Project ID and Management Key
- The Descope Inbound Apps feature enabled
- Git installed
Running the Server
First, add the environment variables in a .env
file at the root:
Then, install dependencies:
Finally, run the server:
The server will start on port 3000 (or the port specified in your environment variables).
API Endpoints
GET /sse
: Establishes an SSE connection for real-time weather dataPOST /message
: Handles incoming messages for the MCP protocol
Authentication
The server uses Descope for authentication. All MCP endpoints except the authentication router require a valid bearer token.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables real-time weather data streaming through a secure MCP server. Features authentication using Descope and can be deployed to Fly.io for remote access.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.Last updated -12MIT License
- AsecurityFlicenseAqualityA simple MCP server that provides a tool to fetch current weather information for cities using the Open-Meteo API, communicating through stdin/stdout.Last updated -12
- -securityAlicense-qualityA Python-based MCP server that provides real-time weather information using the National Weather Service API, supporting both synchronous and asynchronous HTTP requests.Last updated -MIT License