New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

cordon-sdk

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordon-sdk

TypeScript config SDK for Cordon — the security gateway for AI agents

Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
6
500%
Maintainers
1
Weekly downloads
 
Created
Source

cordon-sdk

TypeScript SDK for configuring Cordon, the security gateway for MCP tool calls.

This package exports defineConfig and the config type surface. You only need it if you're writing a cordon.config.ts file.

Install

npm install cordon-sdk

cordon init (from the cordon-cli package) installs this automatically into your project.

Usage

import { defineConfig } from 'cordon-sdk';

export default defineConfig({
  servers: [
    {
      name: 'database',
      transport: 'stdio',
      command: 'npx',
      args: ['-y', '@modelcontextprotocol/server-postgres', process.env.POSTGRES_URL!],
      policy: 'read-only',
    },
    {
      name: 'github',
      transport: 'stdio',
      command: 'npx',
      args: ['-y', '@modelcontextprotocol/server-github'],
      policy: 'approve-writes',
      tools: {
        delete_repository: 'block',
        create_pull_request: 'approve',
      },
    },
  ],

  audit: {
    enabled: true,
    output: 'file',       // 'stdout' | 'file' | 'hosted'
  },

  approvals: {
    channel: 'terminal',  // 'terminal' | 'slack'
    timeoutMs: 60_000,
  },

  rateLimit: {
    perServerPerMinute: 60,
  },
});

Policy actions

PolicyBehavior
allowPass through immediately
blockReject with an error
approvePause the agent, prompt for human approval
approve-writesReads pass through, writes require approval
read-onlyWrites are blocked, reads pass through
log-onlyPass through, flagged in audit log

Policies can be set at the server level or per-tool. Per-tool overrides the server default.

Full documentation

Complete reference including all config fields, approval channels, and audit outputs: https://github.com/marras0914/cordon

License

MIT

Keywords

mcp

FAQs

Package last updated on 22 Apr 2026

Related posts