New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@mcpolyglot/config

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcpolyglot/config

Config schema and loader for mcpolyglot. Validates user config and resolves secrets via env / file / OS keychain refs.

latest
Source
npmnpm
Version
0.3.1
Version published
Maintainers
1
Created
Source

@mcpolyglot/config

Config schema and loader for mcpolyglot. Validates user config with Zod and resolves secrets from env / file / OS keychain refs.

Define a config

import { defineConfig } from '@mcpolyglot/config';

export default defineConfig({
  server: { name: 'mcpolyglot', version: '0.0.1' },
  transport: { kind: 'stdio' },
  sources: [
    {
      id: 'pg.main',
      kind: 'postgres',
      url: '${env:DATABASE_URL}',
      scopes: ['schema:read', 'tables:read', 'query:raw'],
      limits: { rowCap: 200, timeoutMs: 10_000, maxBytes: 262144 },
      redact: { columns: ['public.users.password_hash'], patterns: [] },
    },
  ],
});

Both .ts and .yaml configs are supported.

Secret refs

Literal credentials are rejected. You must use one of:

  • ${env:NAME} — process environment.
  • ${file:./path} — file on disk (good for Docker secrets / mounted files).
  • ${keychain:item} — OS keychain via the optional keytar dep.

Docs

MIT licensed.

FAQs

Package last updated on 04 Oct 2026

Related posts