Skip to main content
Glama

mcp-appstore

by appreply-co
provider.ts2.31 kB
import { Response } from "express"; import { OAuthRegisteredClientsStore } from "./clients.js"; import { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from "../../shared/auth.js"; import { AuthInfo } from "./types.js"; export type AuthorizationParams = { state?: string; scopes?: string[]; codeChallenge: string; redirectUri: string; }; /** * Implements an end-to-end OAuth server. */ export interface OAuthServerProvider { /** * A store used to read information about registered OAuth clients. */ get clientsStore(): OAuthRegisteredClientsStore; /** * Begins the authorization flow, which can either be implemented by this server itself or via redirection to a separate authorization server. * * This server must eventually issue a redirect with an authorization response or an error response to the given redirect URI. Per OAuth 2.1: * - In the successful case, the redirect MUST include the `code` and `state` (if present) query parameters. * - In the error case, the redirect MUST include the `error` query parameter, and MAY include an optional `error_description` query parameter. */ authorize(client: OAuthClientInformationFull, params: AuthorizationParams, res: Response): Promise<void>; /** * Returns the `codeChallenge` that was used when the indicated authorization began. */ challengeForAuthorizationCode(client: OAuthClientInformationFull, authorizationCode: string): Promise<string>; /** * Exchanges an authorization code for an access token. */ exchangeAuthorizationCode(client: OAuthClientInformationFull, authorizationCode: string): Promise<OAuthTokens>; /** * Exchanges a refresh token for an access token. */ exchangeRefreshToken(client: OAuthClientInformationFull, refreshToken: string, scopes?: string[]): Promise<OAuthTokens>; /** * Verifies an access token and returns information about it. */ verifyAccessToken(token: string): Promise<AuthInfo>; /** * Revokes an access or refresh token. If unimplemented, token revocation is not supported (not recommended). * * If the given token is invalid or already revoked, this method should do nothing. */ revokeToken?(client: OAuthClientInformationFull, request: OAuthTokenRevocationRequest): Promise<void>; }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/appreply-co/mcp-appstore'

If you have feedback or need assistance with the MCP directory API, please join our Discord server