
ory/mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
This repository contains TypeScript packages for integrating Ory authentication and access control with the Model Context Protocol (MCP).
概要
This repository contains TypeScript packages for integrating Ory authentication and access control with the Model Context Protocol (MCP).
README
以下は原文 README の抜粋です。原文を見る。
Ory MCP (Model Context Protocol)
This repository contains TypeScript packages for integrating Ory authentication and access control with the Model Context Protocol (MCP). The repository has been renamed from mcp-oauth-provider to mcp to be inclusive of all Ory MCP projects.
Packages
@ory/mcp-oauth-provider
A TypeScript implementation of an OAuth provider for Ory MCP that supports both Ory Network and Ory Hydra as backend providers. This package provides seamless integration between MCP servers and Ory’s OAuth2.1 authentication system.
Key Features:
- Supports both Ory Network and Ory Hydra as backend providers
- Handles OAuth2 authorization code flow with PKCE
- Manages client registration and token operations
- Provides token introspection and verification
- Integrates seamlessly with MCP server authentication
Installation:
npm install @ory/mcp-oauth-provider
For detailed documentation and usage examples, see the package README.
@ory/mcp-access-control
A TypeScript module that provides MCP tool definitions for Ory Network access control integration. This module helps validate JWT tokens, create/retrieve Ory identities, and manage authentication sessions.
Key Features:
- JWT token validation using JWKS
- Configurable JWT audience and claim extraction
- Automatic identity creation/retrieval in Ory Network
- Password-based authentication with session management
- Session token validation for MCP middleware
- MCP tool definition generation
Installation:
npm install @ory/mcp-access-control
For detailed documentation and usage examples, see the package README.
Examples
OAuth Provider Example
The examples/oauth-provider-example/ directory contains a complete MCP server implementation that demonstrates how to use the @ory/mcp-oauth-provider package with Ory Network authentication.
Features demonstrated:
- Complete MCP server setup with Ory OAuth2.1 authentication
- Bearer token authentication middleware
- Project management tools
- Both Streamable HTTP and SSE transport support
Getting Started:
-
Set up your environment variables:
ORY_PROJECT_URL=https://your-project.projects.oryapis.com ORY_PROJECT_API_KEY=your-api-key MCP_BASE_URL=http://localhost:3000 SERVICE_DOCUMENTATION_URL=https://your-docs-url.com -
Run the example server:
cd examples/oauth-provider-example npm install npm start
For the complete implementation, see examples/oauth-provider-example/mcp-server.ts.
Repository History
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →