网页 综合 更新时间 2026-11-14 16:26:50

index - @punkpeye/fastmcp - JSR

自动蜘蛛 jsr.io 正文约 2834 字
index - @punkpeye/fastmcp - JSR
A TypeScript framework for building MCP (Model Context Protocol) servers.
Abstract base class for OAuth providers. Encapsulates OAuthProxy creation, authenticate function, and oauth config.
Authenticate function to be used by FastMCP. Extracts Bearer token, validates it, and returns session with upstream access token.
Create the underlying OAuthProxy with provider-specific configuration
Create a session object from upstream tokens. Override in subclasses to add provider-specific session data.
The forwarded proxy options that are set. Unset ones are left out so the proxy's own defaults apply.
Get the authorization endpoint for this provider
Default scopes for this provider
Get the OAuth configuration object for FastMCP ServerOptions.
Get the OAuthProxy instance (for advanced use cases).
Get the token endpoint for this provider
Get the proxy, creating it lazily if needed.
Microsoft Azure AD / Entra ID OAuth 2.0 Provider Callback URL: {baseUrl}/oauth/callback
fetches a discovery document from the given URL. uses cached value if available and not expired. coalesces concurrent requests for the same URL to prevent duplicate fetches.
Adds a prompt to the server.
Adds prompts to the server.
Adds a resource to the server.
Adds a resource template to the server.
Adds resource templates to the server.
Adds resources to the server.
Adds a tool to the server.
Adds tools to the server.
Connects the server to a transport you constructed yourself, instead of letting FastMCP.start create one.
Embeds a resource by URI, making it easy to include resources in tool responses.
Returns the underlying Hono app instance for direct access to Hono's native API. This allows you to add custom routes, middleware, and handlers using Hono's standard methods.
Removes a prompt from the server.
Removes prompts from the server.
Removes a resource from the server.
Removes a resource template from the server.
Removes resource templates from the server.
Removes resources from the server.
Removes a tool from the server.
Removes tools from the server.
Notifies subscribed clients that a resource's contents have changed.
Stops transports created by start(). Transports passed to connect() remain open and belong to the caller.
The scope challenge one message a client sent would get, or undefined to let it through. FastMCP's HTTP transports ask before mcp-proxy dispatches each message, the last point at which the answer can still be a 403; the tools/call handler applies the same check on every transport.
Notifies the connected client that the contents of a resource have changed.
The HTTP session ID, or undefined for transports that do not have one.
Update the session's authentication context. Called by mcp-proxy when a new token is validated on subsequent requests.
GitHub OAuth 2.0 Provider Callback URL: {baseUrl}/oauth/callback
访问原文 返回搜索 https://jsr.io/@punkpeye/fastmcp/doc
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。