oauth-reference
Read-only OAuth MCP configuration reference shape for maintainers
MCP
FastMCP
1 deps
mcp/oauth-reference/server.py
Read-only OAuth MCP configuration reference shape for maintainers
| Field | Value |
|---|---|
| Name | mcp-oauth-reference |
| Version | 0.1.0 |
| Python | >=3.13 |
fastmcp>=2
{ "$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json", "source": { "path": "server.py", "entrypoint": "mcp" }, "environment": { "type": "uv" }}Server Source
Section titled “Server Source”"""MCP server: oauth-reference.
Read-only reference shape for OAuth-protected MCP servers. Documents expectedtool annotations and auth placeholders without performing OAuth flows or network I/O."""
from __future__ import annotations
from typing import Any
from fastmcp import FastMCP
mcp = FastMCP("OAuth Reference")
_READ_ONLY = { "readOnlyHint": True, "destructiveHint": False, "idempotentHint": True, "openWorldHint": False,}
@mcp.tool(annotations=_READ_ONLY)def oauth_reference_shape() -> dict[str, Any]: """Return the repo reference schema for OAuth MCP server configuration.
Use this when authoring OAuth-backed MCP entries in `config/mcp-registry.json`. Values are placeholders — live credentials belong in user-owned env files only. """ return { "auth": { "type": "oauth2", "authorizationUrl": "https://provider.example/oauth/authorize", "tokenUrl": "https://provider.example/oauth/token", "scopes": ["read"], }, "env_placeholders": ["MCP_OAUTH_CLIENT_ID", "MCP_OAUTH_CLIENT_SECRET"], "notes": [ "Never commit OAuth client secrets to tracked config.", "Prefer MCPHub bearer auth for local control-plane endpoints.", "Mark read-only tools with readOnlyHint annotations.", ], }
@mcp.tool(annotations=_READ_ONLY)def list_reference_tools() -> list[dict[str, str]]: """List the reference tool ids shipped by this scaffold server.""" return [ {"name": "oauth_reference_shape", "purpose": "Document OAuth MCP config shape"}, {"name": "list_reference_tools", "purpose": "Enumerate reference tool ids"}, ]
if __name__ == "__main__": mcp.run()Resources
Section titled “Resources”MCP OverviewBrowse all MCP documentation in this site.
CLI ReferenceScaffold new MCP servers with wagents.
