@civic/auth-mcp
🔐 Authentication for Model Context Protocol - Monorepo
This repository contains the Civic Auth MCP library and examples for adding secure authentication to MCP servers and clients.
接入你的智能体
發布者自己的指令。不是 PlugMCP 端點。
用我們的金鑰與日誌託管一份副本。
npx -y @civic/[email protected]Claude Code 沒有本機指令的安裝連結。複製下方指令並在終端機中執行。
claude mcp add civic-auth-mcp -- npx -y @civic/auth-mcp@1.0.0在終端機中執行。
{ "mcpServers": { "civic-auth-mcp": { "command": "npx", "args": [ "-y", "@civic/[email protected]" ] } }}claude_desktop_config.json
遠端 URL 還是本機指令? 兩種安裝方式的差異
# Install the library
pnpm add @civic/auth-mcp
# Run examples
pnpm install
pnpm build
pnpm --filter example-server start
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test
# Run linting
pnpm lint
This project uses audit-ci for dependency vulnerability scanning in CI/CD. To manage security vulnerabilities:
audit-ci.jsonc to add vulnerabilities to the allowlistpnpm run audit:ci (fails on moderate+ vulnerabilities not in allowlist)To allowlist a vulnerability, add its identifier to audit-ci.jsonc:
{
"allowlist": [
"GHSA-xxxx-xxxx-xxxx", // GitHub Security Advisory
"CVE-2024-xxxxx", // CVE identifier
"1234567" // NPM advisory ID
]
}
Full documentation and usage examples are available in the library/ package.
For backward compatibility, the auth() middleware automatically includes legacy OAuth endpoints that allow MCP servers to act as OAuth servers. This mode is enabled by default but is deprecated.
The following endpoints are automatically exposed:
/.well-known/oauth-authorization-server - OAuth server metadata/authorize - Authorization endpoint (proxies to Civic Auth)/token - Token endpoint (proxies to Civic Auth)/register - Registration endpoint (if supported)To disable legacy mode:
app.use(await auth({
enableLegacyOAuth: false // Disable legacy OAuth endpoints
}));
It is provided as-is, without warranty of any kind, express or implied. Civic makes no guarantees of fitness for a particular purpose or ongoing support. Use of this library is governed solely by the terms of the MIT License.
By using this software, you agree that Civic shall not be held liable for any damages arising from its use, performance, or integration.
Note: The @civic/auth-mcp library is released as an open-source project under the MIT License.
It is provided without warranty or support guarantees.
{ "mcpServers": { "civic-auth-mcp": { "command": "npx", "args": [ "-y", "@civic/[email protected]" ] } }}工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
@civic/auth 透過 stdio 在本機執行。
上次檢查時間:2026-11-17。 Civic Auth integration for MCP servers