{
  "markdown": "# vcp-sdk\n\nPython SDK for the **Value Context Protocol (VCP)** — portable AI ethics\nvalidation — plus the **Creed Commons** client (`vcp` CLI) for installing\nsigned value artifacts.\n\n- Protocol and docs: [valuecontextprotocol.org](https://valuecontextprotocol.org)\n- Creed Commons registry: [Creed-Space/vcp-hub](https://github.com/Creed-Space/vcp-hub)\n\n## Legacy distribution status\n\nThis repository supplies the legacy standalone `vcp-sdk` 0.8.0 distribution on\n[PyPI](https://pypi.org/project/vcp-sdk/0.8.0/) and the\n`io.github.Creed-Space/vcp-mcp` 0.8.0 server entry in the MCP Registry. It is\nseparate from, and is not, the project-maintained VCP-SDK. To review and run\nthis source directly, select and verify an exact commit, then install that\ncheckout:\n\n```bash\ngit checkout --detach <reviewed-vcp-sdk-python-commit>\npython -m pip install .\npython -m pip install \".[hub]\"  # include the Creed Commons CLI dependencies\n```\n\nThis candidate and the project-maintained VCP-SDK both use the `vcp` Python\nimport namespace. Install them in separate virtual environments. Installing\nboth into one environment is unsupported because one distribution can replace\nthe other's modules.\n\n## SDK — tokens, CSM1, VCP-Lite\n\n```python\nfrom vcp import Token, CSM1Code, validate_lite\n\ntoken = Token.parse(\"family.safe.guide@1.0.0\")\ncode = CSM1Code.parse(\"N5+F+E\")\nidentity = {\"domain\": \"family\", \"approach\": \"safe\", \"role\": \"guide\"}\ndocument = {\"vcp_version\": \"lite-1.0\", \"identity\": identity, \"persona\": \"nanny\", \"adherence\": 5, \"scopes\": [\"F\"]}\nerrors = validate_lite(document)\n```\n\n`CSM1Code.encode()` (and `str(code)`) emits the canonical form with scopes\nsorted (`N5+F+E` encodes as `N5+E+F`), matching the project-maintained\nVCP-SDK and spec §2.10.1; `to_nano()`/`to_micro()` preserve input order.\n`Token.parse` also accepts `creed://` and `vcp://` URIs and normalises them to\ncanonical form — a superset of the reference SDK, whose `parse` takes only\nthe bare token grammar.\n\n## Creed Commons — signed value artifacts\n\nCreed Commons distributes constitutions, creeds, and detector configs as\n**signed data that a values engine interprets — never executable code**.\nInstalling an artifact is a signature-verification decision, not a\ncode-execution one:\n\n```bash\nvcp search gaslighting\nvcp install creed-space/anti_gaslighting     # verify Ed25519 + sha256 + schema, then write\nvcp verify                                    # re-check installed tree against vcp.lock\n```\n\n`vcp install` verifies against a trust root **pinned inside this package**\n(the registry cannot vouch for itself), pins `name@version` + content sha256 +\nthe verifying key in `vcp.lock`, and never imports, evals, or executes what it\nfetched.\n\n**Community namespaces** are delegated, never a new root: the hub's\n`namespace_registry.json` binds each namespace to its publisher's Ed25519 keys\nand is itself signed by the pinned root; artifacts must verify against a key\nregistered to their own namespace. Registration and moderation:\n[GOVERNANCE.md](https://github.com/Creed-Space/vcp-hub/blob/main/GOVERNANCE.md).\n\nTrust tiers: `signed` proves integrity and origin, not semantics; `verified`\nadditionally carries a domain-separated **root counter-signature** (issued\nafter lint + red-team + human review) that the client checks on install and\non every `vcp verify`.\n\n## CLI — protocol operations\n\nAlongside the Creed Commons commands, `vcp` runs the protocol operations\ndirectly. These call the same functions the MCP tools do, so scripted CLI\noutput and MCP tool output carry the same fields.\n\n```bash\nvcp token validate family.safe.guide@1.0.0   # parse a VCP/I token\nvcp token parse N5+F+E                       # parse a CSM1 code\nvcp lite validate agent.json                 # validate a VCP-Lite document\nvcp lite to-csm1 agent.json                  # VCP-Lite document -> CSM1 code\nvcp encode --space office --agency peer      # context -> VCP/A wire format\nvcp classify \"Never endanger a child\"        # principle -> Schwartz value\nvcp status                                   # versions, capabilities, vocabularies\n```\n\nOutput is JSON by default. `--quiet` prints just the value the command is\nabout, for shell consumption:\n\n```bash\n$ vcp lite to-csm1 agent.json --quiet\nN5+E+F\n\n$ vcp encode --space office --constraints legal --constraints time --quiet\n📍🏢|🔒⚖️⏱️\n```\n\nThe `validate`/`parse` commands **exit 0 when valid and 1 when invalid**, so\nthey work as a CI gate:\n\n```bash\nvcp lite validate agent.json --quiet || exit 1\n```\n\n`vcp encode` takes one flag per context dimension (`--space`, `--agency`,\n`--cognitive-state`, …); `--company` and `--constraints` repeat for multiple\nvalues, and each personal dimension has a matching `--<dim>-intensity` (1-5).\nRun `vcp encode --help` for the full list.\n\n## MCP Server\n\n<!-- mcp-name: io.github.Creed-Space/vcp-mcp -->\n\n`vcp-mcp` exposes the SDK to any MCP client (Claude Code, Claude Desktop, or\nanything else that speaks the protocol). It runs over stdio by default and is\n**pure local computation** — no network calls, no state between calls, no user\ndata read.\n\n```bash\npython -m pip install \".[mcp]\"\nvcp-mcp\n```\n\nClaude Desktop / Claude Code config:\n\n```json\n{\n  \"mcpServers\": {\n    \"vcp\": {\n      \"command\": \"vcp-mcp\"\n    }\n  }\n}\n```\n\n### Tools\n\n| Tool | What it does |\n|---|---|\n| `vcp_status` | SDK/spec versions, capabilities, dimension and persona vocabularies |\n| `vcp_validate_token` | Parse a VCP/I token into domain / approach / role / version / namespace |\n| `vcp_parse_csm1` | Parse a CSM1 code into persona / adherence / scopes / namespace / version (conflicting or deprecated scopes are rejected) |\n| `vcp_encode_context` | Encode the 18 VCP/A context dimensions to wire, JSON, and session metadata |\n| `vcp_validate_lite` | Validate a VCP-Lite document; returns the equivalent CSM1 code and token |\n| `vcp_lite_to_csm1` | Convert VCP-Lite persona/adherence/scopes to a CSM1 code |\n| `creed_classify_principle` | Map a constitution principle to a Schwartz value; flag circular-model tensions |\n\nResource `vcp://lite/examples` serves the bundled VCP-Lite example documents.\n\n### HTTP transport\n\nFor hosted deployments, `vcp-mcp` also speaks Streamable HTTP:\n\n```bash\nvcp-mcp --transport http --port 8080     # binds 127.0.0.1, endpoint /mcp\n```\n\n`--port` defaults to `$PORT` then `8080`. The endpoint runs **stateless** (a\nfresh transport per request), so a gateway may route any request to any\nreplica. Only `POST /mcp` is served — `GET` would otherwise hold an idle event\nstream open per connection, so it is refused with a clean JSON-RPC 405. A\n`GET /health` endpoint returns `{\"status\": \"ok\"}`.\n\nThe server has no authentication, so binding beyond loopback requires an\nexplicit opt-in:\n\n```bash\nVCP_MCP_ALLOW_INSECURE_HTTP=true vcp-mcp --transport http --host 0.0.0.0\n```\n\nSet that only when either a gateway or reverse proxy fronts the server and\nhandles client auth, or you intentionally run it as a public, unauthenticated,\nstateless compute endpoint (as `render.yaml` in this repo does). In the latter\ncase put a rate limit / WAF in front of it: the exposure is abuse of paid\ncompute rather than data, since the server holds no state and reads nothing.\n\n## Development\n\n```bash\npip install -e \".[dev]\"\npytest tests/\n```\n\n## License\n\nApache-2.0. © Creed Space.\n",
  "bytes": 7308,
  "sha": "9086de557a4f970de0dbcf83b17e0bbc950bc30284ed00958561793ccfeeb6fc",
  "repo_slug": "creed-space/vcp-sdk-python",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_creed_space_vcp_mcp_ae5aab43/readme"
}