Scoped Mcp

security MCP Server

Per-agent scoped MCP tool proxy — credential isolation, resource scoping, and audit logging for AI agent deployments

VerifiedInstall Ready
securitysecurity
4 views4 stars0 forksMIT

Why This Matters

Discovered via github-topic:model-context-protocol and last synced 2mo ago.

VerifiedInstall Ready
Source
github-topic:model-context-protocol
Stars
4
Last synced
2mo ago
Install
Instructions detected

Install

1. Install the package

pip install scoped-mcp
33
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (33)

Capability

scoped-mcp

http_proxy

— (dynamic; see module config)

sqlite

10

0

matrix

`MATRIX_HOMESERVER`, `MATRIX_ACCESS_TOKEN`

manifest

RBAC

smtp

`SMTP_HOST`, `SMTP_PORT`, `SMTP_USER`, `SMTP_PASSWORD`

no

no

Module

Required env vars

grafana

`GRAFANA_URL`, `GRAFANA_SERVICE_ACCOUNT_TOKEN`

slack_webhook

`SLACK_WEBHOOK_URL`

Scope

Read tools

discord_webhook

`DISCORD_WEBHOOK_URL`

ntfy

`NTFY_URL`

secret

token)\s*[:=]\s*\S+' fields: [path, query, body] action: block # or: warn decode: [base64, urlsafe_base64, url] # Optional: human-in-the-loop approval (requires state_backend.type: dragonfly) hitl: approval_required: ["filesystem_delete_*", "sqlite_execute"] shadow: ["mcp_proxy.*"] # log-only, return synthetic empty success timeout_seconds: 300 notify: type: ntfy # or: log (default), webhook, matrix topic: homelab-hitl ``` ### Environment Variable Substitution Manifest fields support `${VAR_NAME}` placeholders, expanded from the process environment before YAML parsing: ```yaml state_backend: type: dragonfly url: "redis://:${REDIS_PASSWORD}@host:6379/0" # always quote substitution sites credentials: source: file path: "${SECRETS_FILE}" ``` Rules: - Only the braced form is expanded (`${VAR}`, not `$VAR`) to prevent accidental substitution. - Undefined variables at startup are a hard error — the agent will not start with incomplete config. - Expanded values are never written to audit or ops logs. - **Always YAML-quote fields receiving substitution** — a secret value containing `:`, `{`, or `}` can corrupt the YAML structure if the field is unquoted. ### Top-Level Fields and Strict Validation The top-level manifest model rejects unknown fields (`extra="forbid"`). A misspelled or stale key fails the manifest at load time rather than being silently ignored — a deliberate guard against shadowing attacks, where an unrecognized field could mask a real setting. Every field an agent platform attaches to its manifests must therefore be modeled explicitly. Alongside the operational fields (`modules`, `credentials`, `state_backend`, `rate_limits`, `argument_filters`, `response_filters`, `hitl`, `audit`), the model accepts three **platform-metadata** fields. scoped-mcp validates and stores them but does not act on them — they are consumed by the task dispatcher, agent bus, and other agents on the platform:

influxdb

`INFLUXDB_URL`, `INFLUXDB_TOKEN`

per-tool

per-profile

filesystem

local-mcp-gateway

Kong MCP

yes

no (containers)

0

0

Type

Purpose

max_auto_risk

string

interaction_permissions

`{auto_approved: [...], needs_approval: [...]}`

workspace_access

list of entries (below)

Key

Type

path

string

access

`readonly` \

git_backed

bool

branch_required

bool

mcp_proxy

Forward tool calls to an upstream MCP server (HTTP or stdio)

RBAC

RBAC

partial

yes