Skip to content

feat(mcpservers): selfHostedEnvVarTypes schema, column metadata and validation (DBIP #3683) - #3698

Open
foxxx009 wants to merge 1 commit into
Chain-Love:json-toolsfrom
foxxx009:dbip-3683-envvar-types-tools
Open

feat(mcpservers): selfHostedEnvVarTypes schema, column metadata and validation (DBIP #3683)#3698
foxxx009 wants to merge 1 commit into
Chain-Love:json-toolsfrom
foxxx009:dbip-3683-envvar-types-tools

Conversation

@foxxx009

@foxxx009 foxxx009 commented Sep 7, 2026

Copy link
Copy Markdown

Summary

Implements the schema/tooling part of DBIP #3683 ([DBIP] Add per-variable types for required self-hosted MCP configuration): an optional selfHostedEnvVarTypes column for the mcpservers table that classifies each documented required environment variable of a self-hosted MCP server.

Type of change

  • Add data rows
  • Update data rows
  • Remove data rows
  • Schema change
  • Documentation/metadata only

Scope

  • Networks affected: global (category mcpservers)
  • Categories affected: mcpservers

Changes by file

  • tools/schema.json: adds optional selfHostedEnvVarTypes object to $defs/mcpservers; member values are restricted to the six allowed labels (api-key, wallet-private-key, wallet-mnemonic, access-token, other-secret, non-secret). Not added to required, so all legacy rows remain valid.
  • meta/columns.json: adds the matching column metadata entry (group security), so rule_meta_columns_consistent accepts the new column.
  • tools/csv_to_json.py:
    • duplicate object members in a selfHostedEnvVarTypes cell are rejected before ordinary JSON parsing can silently discard them;
    • after offer resolution and normalization, resolved rows are validated: a non-empty map is only valid for hostingType=Self-hosted, every key must exactly match (case-sensitive) a name in the resolved selfHostedRequiredEnvVars list, and every label must be one of the six allowed values (also enforced by the schema);
    • blank and whole-cell null normalize to None and inherit from the referenced offer under the existing normalize/resolve_offers semantics; an explicitly supplied object replaces the inherited map as a whole (not merged key by key), and an explicit {} clears inherited classifications without changing the required-variable list. The final map is validated against the final required-variable list after resolution.

Wiki (MCP Servers page) - proposed text for the maintainers to apply

selfHostedEnvVarTypes (optional, mcpservers only): a JSON object classifying the documented required environment variables of a self-hosted MCP server. Allowed labels: api-key, wallet-private-key, wallet-mnemonic, access-token, other-secret, non-secret. Keys must exactly match names in selfHostedRequiredEnvVars (case-sensitive); partial maps are permitted and missing variables are simply unclassified (never "no secrets" by default). Classify from first-party documentation only, and never store credential values, private keys, recovery phrases, or tokens in this field. This field describes local setup configuration independently of authType, which describes how a client authenticates to a hosted server.

Validation performed

  • Full pipeline run locally on current main data plus the pilot cell: validate_csv.py, csv_to_json.py and validate.py all pass.
  • Negative cases verified to be rejected: duplicate object members, undeclared variable names (including case mismatches), unsupported labels, and non-empty maps on non-self-hosted rows.

Links

Validation checklist

  • I followed the Style Guide and Column Definitions.
  • I personally opened and verified every new link I'm adding. (the only referenced source is https://github.com/FIL-Builders/foc-storage-mcp#configuration )
  • If I added new entries - I personally confirmed that the provider I'm adding (modifying) currently supports the adjusted network(s). (no provider rows changed)
  • This PR is not a blind AI-generated submission (every value traced to first-party documentation; full validation pipeline executed locally)

Optional

  • Rewards address (for data patching rewards):
    Rewards address: 0x2409b47a530be3831158f10b08ac93f7d08c1ff2
    ​​​​​​​​​​

…and validation

Implements the schema/tooling part of DBIP Chain-Love#3683 (per-variable types for
required self-hosted MCP configuration).

- schema.json: add optional selfHostedEnvVarTypes object to $defs/mcpservers
  (additionalProperties restricted to the six allowed labels)
- meta/columns.json: add the selfHostedEnvVarTypes column metadata entry
- tools/csv_to_json.py:
  * reject duplicate object members in selfHostedEnvVarTypes cells before
    ordinary JSON parsing can silently discard them
  * validate resolved rows: non-empty maps require hostingType=Self-hosted,
    keys must exactly match the resolved selfHostedRequiredEnvVars list
    (case-sensitive), labels must be one of the six allowed values
  * blank/whole-cell null inherit from the referenced offer under the
    existing normalize/resolve_offers semantics; an explicit object (or {})
    replaces the inherited map as a whole

Full pipeline verified locally: validate_csv, csv_to_json and validate all
pass on the current data, and negative cases (duplicate members, undeclared
names, unsupported labels, hosted servers with non-empty maps) are rejected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant