Uses .ENV for configuration management, allowing the server to load environment variables from a .env file for Ory Network and server configuration settings.
Built for Node.js runtime environment (v18 or later), providing the foundation for running the MCP server with SSE transport capabilities.
Implemented in TypeScript, allowing for type-safe development and compilation to JavaScript for production deployment.
MCP SSE Ory Server
This project implements a Model Context Protocol (MCP) server that uses Server-Sent Events (SSE) for communication and integrates with Ory Network for OAuth 2.1 functionality.
Overview
The server provides:
MCP server implementation with SSE transport
OAuth 2.1 integration via Ory Network
Secure token verification and client management
Project management tools for Ory Network
Prerequisites
Node.js (v18 or later)
Ory Network account and API keys
Environment Variables
Create a .env
file with the following variables (see .example.env
for reference):
Installation
Clone the repository
Install dependencies:
npm install
Development
Run the development server:
Building
Build the TypeScript project:
Running
Start the production server:
API Endpoints
GET /mcp
- Establishes SSE connection for MCP communicationPOST /messages
- Handles MCP messages from clientsOAuth endpoints (via Ory Network):
/oauth2/auth
- Authorization endpoint/oauth2/token
- Token endpoint/oauth2/revoke
- Token revocation endpoint/oauth2/register
- Client registration endpoint
Features
MCP Server: Implements the Model Context Protocol for AI model communication
SSE Transport: Uses Server-Sent Events for real-time communication
OAuth Integration: Secure authentication via Ory Network
Client Management: Dynamic OAuth client verification and management
Project Tools: Tools for managing Ory Network projects including:
List projects in a workspace
Create new projects
Get project details
Update project configurations
Security
Bearer token authentication
PKCE support
Secure token verification
Client validation
Proper error handling and logging
Error Handling
The server implements graceful shutdown and proper error handling for:
Uncaught exceptions
Unhandled promise rejections
Process termination signals (SIGINT, SIGTERM)
License
Copyright 2025 Ory Corp
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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.
Implements a Model Context Protocol server using Server-Sent Events for real-time communication with OAuth 2.1 integration via Ory Network, enabling secure AI model communication with authentication and client management.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI models to interact with SourceSync.ai's knowledge management platform for managing documents, ingesting content from various sources, and performing semantic searches.Last updated -256
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI assistants to interact with the Omi API for retrieving and creating conversations and memories for users.Last updated -43
- -securityFlicense-qualityA Model Context Protocol server that enables real-time communication using Server-Sent Events (SSE), providing standardized model management and resource templating capabilities.Last updated -