diff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.yml new file mode 100644 index 0000000..8456dee --- /dev/null +++ b/.github/workflows/publish-mcp.yml @@ -0,0 +1,34 @@ +name: Publish to Official MCP Registry + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + publish-mcp: + name: Publish Server to modelcontextprotocol/registry + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install mcp-publisher + run: | + curl -sSL "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher + chmod +x mcp-publisher + + - name: Authenticate via GitHub OIDC + run: ./mcp-publisher login github-oidc + + - name: Publish server.json to MCP Registry + run: ./mcp-publisher publish diff --git a/package.json b/package.json index 73ec373..ad60dc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ritualdev-lab/dbshield", - "version": "0.2.0", + "version": "0.2.1", "description": "Safety-first Database Guardrail & Sandboxing MCP Server for AI Coding Agents (Cursor, Claude Desktop, Antigravity). Protects databases from unconstrained mutations, drops, locks, and PII leaks.", "type": "module", "main": "dist/index.js", diff --git a/server.json b/server.json new file mode 100644 index 0000000..1a36e75 --- /dev/null +++ b/server.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", + "name": "io.github.ritualdev-lab/dbshield", + "title": "DBShield Database Guardrail & Sandboxing MCP Server", + "description": "Safety-first Database Guardrail, AST SQL Validator, PII Masker, and Copy-on-Write Sandbox for AI Coding Agents (Cursor, Claude Desktop, Antigravity, Windsurf)", + "version": "0.2.1", + "status": "active", + "repository": { + "url": "https://github.com/RitualDev-Lab/DBShield", + "source": "github" + }, + "website": "https://ritualdev.in/dbshield", + "packages": [ + { + "registryType": "npm", + "identifier": "@ritualdev-lab/dbshield", + "version": "0.2.1", + "transport": { + "type": "stdio" + }, + "environmentVariables": [ + { + "name": "DBSHIELD_DIALECT", + "description": "Target database dialect (postgres, mysql, sqlite)", + "required": false, + "default": "sqlite" + }, + { + "name": "DBSHIELD_DB_URL", + "description": "Connection URL or file path for target database", + "required": false + } + ] + }, + { + "registryType": "oci", + "identifier": "ghcr.io/ritualdev-lab/dbshield:v0.2.1", + "transport": { + "type": "stdio" + } + } + ] +} diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..bda67d8 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,34 @@ +startCommand: + type: stdio + configSchema: + type: object + properties: + dialect: + type: string + enum: ["postgres", "mysql", "sqlite"] + default: "sqlite" + title: "Database Dialect" + description: "Target database dialect to sandbox and validate" + connectionString: + type: string + title: "Connection String / Database URL" + description: "Connection string or SQLite file path (e.g. postgres://user:pass@localhost:5432/mydb)" + safetyTier: + type: string + enum: ["STRICT", "PERMISSIVE", "READ_ONLY"] + default: "STRICT" + title: "Safety Tier" + description: "Guardrail enforcement level" + commandFunction: |- + (config) => ({ + command: 'npx', + args: ['-y', '@ritualdev-lab/dbshield', 'start'], + env: { + DBSHIELD_DIALECT: config.dialect || 'sqlite', + DBSHIELD_DB_URL: config.connectionString || '', + DBSHIELD_TIER: config.safetyTier || 'STRICT' + } + }) + exampleConfig: + dialect: "sqlite" + safetyTier: "STRICT"