Metadata-Version: 2.4
Name: keeper-manifest-mcp-server
Version: 1.0.0rc2
Summary: Offline Keeper Manifest MCP server: read and propose only, never apply.
Project-URL: Documentation, https://docs.keeper.io/keeperpam/keeper-manifest/
Project-URL: Homepage, https://github.com/Keeper-Security/keeper-manifest
Project-URL: Repository, https://github.com/Keeper-Security/keeper-manifest
Project-URL: Issues, https://github.com/Keeper-Security/keeper-manifest/issues
Project-URL: Changelog, https://github.com/Keeper-Security/keeper-manifest/blob/main/CHANGELOG.md
Project-URL: Security, https://github.com/Keeper-Security/keeper-manifest/blob/main/SECURITY.md
Project-URL: License, https://github.com/Keeper-Security/keeper-manifest/blob/main/LICENSE
Author: Keeper Security Engineering
Maintainer: Martin Sawczyn, Jeremy London
License-Expression: MIT
License-File: LICENSE
Keywords: ai-agent,claude,cursor,keeper,manifest,mcp
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Security
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.11
Requires-Dist: keeper-manifest<1.1.0,>=1.0.0rc2
Requires-Dist: mcp<2,>=1.0.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff==0.15.10; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == 'test'
Description-Content-Type: text/markdown

### Keeper Manifest MCP Server

Companion package (`keeper-manifest-mcp-server`, also launched via `keeper-manifest mcp serve`) exposing the single **read-only and propose-only** Model Context Protocol ([MCP](https://modelcontextprotocol.io/)) server for Keeper Manifest. AI clients (Claude Desktop, Cursor, ChatGPT, custom agents) can inspect manifests, discover all **58** registered manifest families, evaluate policy/refusal checks, generate unsigned governance and migration proposals, and run `validate` / `plan` / `apply --dry-run` via the child CLI entrypoint. Trust boundary: `APPLY_BLOCKED = True` is fixed, `assert_no_apply()` keeps `keepercommander` out of the MCP parent process, subprocess tools shell out to `python -m keeper_manifest.cli`, and no `apply` write tool exists. See [AI Assistant (MCP Server)](https://docs.keeper.io/keeperpam/keeper-manifest/ci-cd-integration/ai-assistant) for the full reference guide.

### About this server

[Model Context Protocol](https://modelcontextprotocol.io/) (MCP) is a JSON-RPC over stdio convention between a host (the AI product) and a server that advertises typed tools. This package implements the Keeper Manifest MCP server: 17 tools that list and inspect records on a YAML manifest, explain refusal-pack checks, aggregate policy checks, propose rotation / revoke / offboard / migration plans with unsigned receipts, audit non-human identity (NHI) posture, enumerate canonical family descriptors, and dispatch `validate`, `plan`, and `apply --dry-run` to the installed `keeper-manifest` CLI. Inspect and propose paths run offline without mutating tenants. The CLI dispatch path runs in a child subprocess and can use `provider=mock` (default) or `provider=commander` for **plan** and **apply --dry-run** when your environment has Commander credentials configured for that child process - still with no MCP-exposed apply.

The server ships alongside the core `keeper-manifest` distribution so teams can adopt the CLI without pulling in MCP dependencies unless needed. Install `keeper-manifest` in the same Python environment as this package: family descriptor tools import `keeper_manifest.core.capabilities` / `keeper_manifest.core.schema`, and subprocess-backed `validate` / `plan` / `apply --dry-run` tools invoke `keeper_manifest.cli`.

### Installation

```
pip install keeper-manifest-mcp-server
# Or install an isolated CLI:
uv tool install keeper-manifest-mcp-server
```

Or from a checkout of this repository:

```
git clone https://github.com/Keeper-Security/keeper-manifest.git
cd keeper-manifest
uv sync --all-packages --extra dev
```

Requires Python 3.11 or newer.

### Starting the server

Run the console script or CLI wrapper with no arguments; transport is stdio for MCP hosts:

```
keeper-manifest-mcp-server
```

Equivalent CLI launcher and module entrypoints:

```
keeper-manifest mcp serve
python3 -m keeper_manifest_mcp_server.server
```

Use `keeper-manifest-mcp-server --test-list-tools` to print registered tool metadata as JSON and exit. Point your MCP client at this process; configuration is client-specific (Claude Desktop, Cursor, and custom hosts each document their `mcpServers` format).

### Tools available

Registered tool names use the `keeper-manifest.` prefix (**17** tools). Implementations map 1:1 to modules under `keeper_manifest_mcp_server/tools/`.

1. **Manifest inspection (YAML on disk)** - `keeper-manifest.list_records`, `keeper-manifest.inspect_record`, `keeper-manifest.list_principals`, `keeper-manifest.blast_radius`: load the manifest from `manifest_path`, `KEEPER_MANIFEST_MCP_MANIFEST`, or the bundled sample, list or inspect records and principals with secret metadata redacted at the boundary, and compute blast-radius relationships. See [Manifest Families](https://docs.keeper.io/keeperpam/keeper-manifest/manifest-families) for schema context by family.

2. **Policy and refusal** - `keeper-manifest.refusal_explain`, `keeper-manifest.policy_check`: read a manifest path and return refusal rows (for example shared-credential grant counts) and an aggregated policy-pack status.

3. **Propose-only governance** - `keeper-manifest.propose_rotation`, `keeper-manifest.propose_revoke`, `keeper-manifest.propose_offboard`: build YAML-serialized plans from `MockProvider` only, plus unsigned receipts; nothing is applied.

4. **Validate, plan, and dry-run** - `keeper-manifest.validate_manifest`, `keeper-manifest.plan_manifest`, `keeper-manifest.apply_manifest_dry`: subprocess to `python -m keeper_manifest.cli validate|plan|apply --dry-run`; `plan_manifest` and `apply_manifest_dry` accept `provider` (`mock` default, `commander` optional for live planning or dry-run rehearsal against authenticated sessions in the child process). Output is captured as structured fields and passed through the package redactor.

5. **Family discovery** - `keeper-manifest.list_families`, `keeper-manifest.describe_family`: sorted canonical IDs and structured family capability metadata (`lane`, `public_tier`, `operations`, `discover_mode`, `enforcement`, `schema_resource`, `schema_title`, and best-effort `example_path` when running from a repo checkout) backed by `keeper_manifest.core.capabilities.FAMILY_DESCRIPTORS`. Registry size matches the core package (**58** registered families; see [All 58 Families](https://docs.keeper.io/keeperpam/keeper-manifest/manifest-families/all-families) and [Family Maturity](https://docs.keeper.io/keeperpam/keeper-manifest/core-concepts/family-maturity)).

6. **Migration, import rehearsal, and NHI audit** - `keeper-manifest.propose_keeper_ss_migration`, `keeper-manifest.propose_cyberark_import`, `keeper-manifest.nhi_audit`: convert Keeper Secrets Scanner SARIF findings into proposed KSM manifests, generate sanitized offline CyberArk import previews and CLI proposals without live PVWA calls, and audit non-human identity tier posture on a manifest.

Compliance report CLI commands and KSM bus CLI commands belong to the `keeper-manifest` CLI surface rather than MCP tools; see [AI Assistant (MCP Server)](https://docs.keeper.io/keeperpam/keeper-manifest/ci-cd-integration/ai-assistant) for the complete 17-tool MCP specification.

### Trust and security

`APPLY_BLOCKED` is fixed `True`. On startup and after each tool handler, `assert_no_apply()` ensures the `keepercommander` package is not loaded in the **MCP server** process - live SDK code cannot be pulled into the MCP parent process by design. There is no `--allow-writes` flag: mutation is out of scope, and real tenant apply always requires an operator or approved CI job running `keeper-manifest apply` directly. Proposal tools are offline-only and return plans and unsigned receipts, not tenant writes. Tool descriptions are static strings registered in `server.py` (no runtime prompt injection from remote definitions). All structured tool results pass through the redactor for secret-shaped fields.

### Configuration

- **`KEEPER_MANIFEST_MCP_MANIFEST`**: optional path to the YAML manifest used by inspection and propose tools when `manifest_path` is omitted; when unset, the bundled `sample.yaml` next to the package is used.
- **Subprocess resource and concurrency bounds**: CLI-backed tools (`validate_manifest`, `plan_manifest`, `apply_manifest_dry`) offload onto a worker pool so the asyncio event loop remains responsive, cap concurrent child processes via `KEEPER_MANIFEST_MCP_MAX_CONCURRENT_SUBPROCESSES` (default `4`, fallback `KEEPER_MANIFEST_MCP_MAX_CONCURRENT_PROCESSES`) with finite slot acquisition wait `KEEPER_MANIFEST_MCP_CONCURRENCY_WAIT_SECONDS` (default `60` seconds), bound execution duration via `KEEPER_MANIFEST_MCP_SUBPROCESS_TIMEOUT_SECONDS` (default `60` seconds), and enforce live streaming per-stream output quotas via `KEEPER_MANIFEST_MCP_MAX_OUTPUT_BYTES` (default `8388608` bytes per `stdout`/`stderr`). Exceeding output quota, timeout, or cancelling an active `call_tool` coroutine immediately terminates and reaps the owned child process group before releasing the concurrency slot, with redacted error output.
- **Commander / `keeper-manifest`**: for `plan_manifest` or `apply_manifest_dry` with `provider=commander`, configure the child CLI the same way you would for normal Commander sessions (environment variables and session files as documented in [Quick Start](https://docs.keeper.io/keeperpam/keeper-manifest/quick-start) and [Authentication](https://docs.keeper.io/keeperpam/keeper-manifest/installation-and-setup/authentication)).

### Integrations

**Claude Desktop** - Add a server entry that runs `keeper-manifest-mcp-server` (or `keeper-manifest` with `["mcp", "serve"]`):

```json
{
  "mcpServers": {
    "keeper-manifest-mcp": {
      "command": "keeper-manifest-mcp-server",
      "args": [],
      "env": {
        "KEEPER_MANIFEST_MCP_MANIFEST": "/path/to/acme-lab.yaml"
      }
    }
  }
}
```

**Cursor** - In the MCP settings UI or project JSON, register a stdio server with the same `command` / `args` / `env` pattern your version expects.

**Custom agents** - Any MCP-compatible host can spawn `keeper-manifest-mcp-server` (or `keeper-manifest mcp serve`) and list the 17 tools per the protocol spec linked from [modelcontextprotocol.io](https://modelcontextprotocol.io/).

### Running tests

```
cd src/keeper-manifest-mcp-server
uv run pytest -q
```

From the monorepo root: `pytest -q src/keeper-manifest-mcp-server/tests/ -k 'not live'`.

### Where to read next

- [`docs/capabilities/TOUR.md`](https://github.com/Keeper-Security/keeper-manifest/blob/main/docs/capabilities/TOUR.md) - capability overview for Keeper Manifest.
- [`docs/use-cases/ai-agent-platform.md`](https://github.com/Keeper-Security/keeper-manifest/blob/main/docs/use-cases/ai-agent-platform.md) - AI platform persona: MCP posture and guarded execution.
- [`docs/mcp/MCP_SERVER.md`](https://github.com/Keeper-Security/keeper-manifest/blob/main/docs/mcp/MCP_SERVER.md) - complete 17-tool MCP server reference and security boundary.
- [`docs/families/`](https://github.com/Keeper-Security/keeper-manifest/tree/main/docs/families) - design notes and briefs for manifest families.

### About Keeper Security

Keeper Security is the creator of KeeperPAM - the zero-trust and zero-knowledge privileged access management ("PAM") platform for securing and managing access to your critical infrastructure.
- [Keeper Security Homepage](https://keepersecurity.com)
- [Privileged Access Management](https://www.keepersecurity.com/privileged-access-management/)
- [Endpoint Privilege Manager](https://www.keepersecurity.com/endpoint-privilege-management/)
- [Encryption and Security Model](https://docs.keeper.io/en/enterprise-guide/keeper-encryption-model)
- [Downloads](https://www.keepersecurity.com/download.html?t=d)
