CC Safety Net
코딩 에이전트 CLI 안전층으로 실행 전 파괴적 git·파일시스템 명령과 비밀 파일 접근을 차단
Cred는 AI 에이전트 접근을 위한 감사 준비 증거를 구축합니다: 행동별 권한 설정, 호출 시 검증, 감사인이 확인 가능한 기록
Cred is building audit-ready evidence for AI agent access: authority set per action, checked at the call, and a record an auditor can verify.
보안TypeScript · PythonGitHub @cred-ninja온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기OAuth2 credential delegation for AI agents. Standalone OAuth toolkit, encrypted local vault, 7 provider adapters (Google, GitHub, Slack, Notion, Salesforce, Linear, HubSpot).
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗OAuth2 credential delegation for AI agents. Refresh tokens stay vaulted; agents get key-bound Delegation Tokens, and each call is checked against what they were granted.
Delegation, not exposure.
Cred is credential delegation middleware for AI agents. When your agent needs to access a user's Google Calendar, Slack workspace, or GitHub repos, Cred validates the agent's identity, checks that the user consented, and returns either a short-lived access token or an opaque brokered handle. Refresh tokens never leave the vault. Three lines of code to integrate. Works with your existing auth provider.
AI agents need to access user accounts (Google Calendar, Slack, GitHub, Notion), but there's no standard way to do it securely:
Existing solutions don't fit:
| Alternative | Problem |
|---|---|
| Tokens in config files | Insecure by default. One leaked config = full account access. No scoping, no expiry. |
| HashiCorp Vault | Built for infrastructure secrets (DB passwords), not user-delegated OAuth tokens. |
| Auth0 Token Vault | Auth0-only, $1,500+/mo, enterprise sales cycle. |
| Roll your own OAuth | 2+ months of plumbing per app. Token rotation, PKCE, refresh handling, per-provider quirks. |
Cred is the missing layer: a credential delegation broker that handles OAuth token lifecycle so agents get short-lived access and users stay in control.
npx @credninja/create-app my-cred-server
cd my-cred-server
npm start
Open http://localhost:3456/admin/login and sign in with ADMIN_TOKEN from .env to connect OAuth providers. Grant your agent what it may do, then give it agent.env, which holds the server URL, the agent token and a new agent identity:
npm run grant -- github github.read
An agent with no Permission is issued nothing. Under github.read a read reaches GitHub and a write is refused at the broker.
npm install @credninja/server
npx cred-server
Configure providers via environment variables. See the server docs for Docker, HTTPS, and two-machine production setups.
No server needed. Run OAuth + encrypted vault in your own process:
import { OAuthClient, GoogleAdapter } from '@credninja/oauth';
import { createVault } from '@credninja/vault';
// 1. OAuth flow
const google = new OAuthClient({
adapter: new GoogleAdapter(),
clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
redirectUri: 'http://localhost:3000/callback',
});
const { url, state, codeVerifier } = await google.getAuthorizationUrl({
scopes: ['calendar.readonly'],
});
// redirect user to `url`, handle callback to get `code`
const tokens = await google.exchangeCode({ code, codeVerifier });
// 2. Encrypted vault
const vault = await createVault({
passphrase: process.env.VAULT_PASSPHRASE!,
storage: 'sqlite',
path: './cred-vault.db',
});
await vault.store({
provider: 'google', userId: 'user-123',
accessToken: tokens.access_token,
refreshToken: tokens.refresh_token,
expiresAt: new Date(Date.now() + tokens.expires_in * 1000),
scopes: ['calendar.readonly'],
});
// 3. Retrieve (auto-decrypts)
const creds = await vault.get({ provider: 'google', userId: 'user-123' });
Your MCP config should be shareable. Credentials shouldn't be in it.
{
"mcpServers": {
"cred": {
"command": "npx",
"args": ["-y", "@credninja/mcp"],
"env": {
"CRED_BASE_URL": "https://cred.example.com",
"CRED_AGENT_TOKEN": "your-agent-token",
"CRED_AGENT_DID": "did:key:z6Mk...",
"CRED_AGENT_PRIVATE_KEY_HEX": "your-agent-private-key",
"CRED_APP_CLIENT_ID": "your-app-client-id"
}
}
}
}
When your MCP client needs your calendar, it requests a Delegation Token from your Cred server, bound to the agent's key and limited to what its Permission grants. Provider tokens stay on the server and are never stored in your MCP config file.
| Package | Description | Install |
|---|---|---|
@credninja/oauth | Zero-dep OAuth2 client. 7 provider adapters, PKCE, Express middleware | npm i @credninja/oauth |
@credninja/vault | Encrypted local token vault. AES-256-GCM, SQLite or file storage | npm i @credninja/vault |
@credninja/sdk | Credential delegation SDK for self-hosted servers or standalone use | npm i @credninja/sdk |
@credninja/server | Self-hosted credential server. Express, Docker, admin UI | npm i @credninja/server |
@credninja/guard | Policy engine for delegation guardrails. Rate limits, scope filtering, time windows, URL allowlists | npm i @credninja/guard |
@credninja/mcp | MCP server for MCP-compatible runtimes | npx @credninja/mcp |
@credninja/create-app | Scaffold a self-hosted Cred server in seconds | npx @credninja/create-app |
cred-auth | Python SDK | pip install cred-auth |
| Package | Framework | Install |
|---|---|---|
@credninja/ai | Vercel AI SDK | npm i @credninja/ai |
cred-langchain | LangChain | pip install cred-langchain |
cred-crewai | CrewAI | pip install cred-crewai |
cred-openai-agents | OpenAI Agents SDK | pip install cred-openai-agents |
cred-autogen | Microsoft AutoGen | pip install cred-autogen |
cred-semantic-kernel | Microsoft Semantic Kernel | pip install cred-semantic-kernel |
| Service | Scopes | PKCE |
|---|---|---|
| Gmail, Calendar, Drive, Sheets, Docs, People, Directory | S256 | |
| GitHub | repo, read:user; github.read at the broker | |
| Slack | channels:read, chat:write and others | |
| Notion | Capabilities are set on the integration; content, and notion.read at the broker | |
| Salesforce | api, refresh_token; salesforce.read at the broker | S256 |
| Linear | read, write, issues:create, comments:create, admin | S256 |
| HubSpot | crm.objects.contacts.read/write and other CRM objects |
These seven are the services the server brokers, SERVICE_ALLOWLIST in packages/server. A brokered call must also be one the operation tables map; the server docs list what is. MCP local mode calls Google, GitHub, Slack, Notion and Salesforce directly.
Need a provider that's not listed? Adding an adapter is the most common contribution.
@credninja/guard adds runtime guardrails to credential delegation. Composable policies that run before any token is issued.
import { CredGuard, rateLimitPolicy, scopeFilterPolicy, timeWindowPolicy } from '@credninja/guard';
const guard = new CredGuard({
policies: [
rateLimitPolicy({ maxRequests: 10, windowMs: 60_000 }),
scopeFilterPolicy({
allowedScopes: {
google: ['calendar.readonly', 'gmail.readonly'],
github: ['repo', 'read:user'],
},
}),
timeWindowPolicy({ allowedHours: { start: 9, end: 17 }, timezone: 'America/New_York' }),
],
});
// Wire into @credninja/server
const { app } = createServer({ ...config, guard });
// Or wrap MCP tool handlers
const guardedHandler = guard.wrapMcpTool(handleUse);
Built-in policies: rate limiting (per agent per provider), scope filtering (deny-by-default), time windows (IANA timezone), URL allowlists (prefix + regex), max TTL caps. Write custom policies with a single evaluate() method.
Policy chain: first DENY short-circuits, no policies = ALLOW (opt-in), errors = DENY (fail-closed). Every decision produces an Ed25519-compatible audit event.
Cred now supports Cloudflare-style Web Bot Auth as a transport identity layer on top of credential delegation:
@credninja/server can host a signed /.well-known/http-message-signatures-directory@credninja/server can verify inbound signed-agent requests@credninja/mcp can emit signed outbound requests@credninja/sdk can manage Web Bot Auth keys and create signed requestsUse Web Bot Auth for "who sent this request?" and Cred for "what user-delegated credential is this agent allowed to use?"
Docs:
Use @credninja/oauth + @credninja/vault for full local control. No account needed, no cloud dependency. Apache 2.0 licensed. Your credentials stay on your machine.
This repo (Apache 2.0) contains all SDKs, the OAuth toolkit, the local vault, and all framework integrations. The standalone packages (@credninja/oauth + @credninja/vault) give you everything you need to run credential delegation locally or on your own infrastructure.
For production deployments, @credninja/server includes Docker Compose, Caddy HTTPS, and two-machine isolation guides.
See CONTRIBUTING.md. SDK, integration, and documentation contributions welcome.
See SECURITY.md for vulnerability disclosure. Maintainer review notes are in SECURITY-AUDITS.md.
Apache License 2.0. See LICENSE. Trademarks are covered separately in TRADEMARKS.md.
⭐ Star this repo if credential delegation for AI agents matters to you.