Metadata-Version: 2.5
Name: data-vault-mcp
Version: 0.4.1
Summary: Local MCP tools for Confidential Agentic Data Vault
Project-URL: Repository, https://github.com/aptos-labs/agentic-data-vault
Project-URL: Homepage, https://private-vault-web-6vgsvc5oma-uc.a.run.app/
Requires-Python: <3.14,>=3.12
Requires-Dist: anyio<5,>=4.5
Requires-Dist: aptos-sdk<0.13,>=0.12.2
Requires-Dist: cryptography<51,>=50.0.1
Requires-Dist: httpx<1,>=0.28
Requires-Dist: mcp==2.2.0
Description-Content-Type: text/markdown

# Confidential Agentic Data Vault MCP

Local MCP tools for private vault records, search and file attachments. This
package runs a stdio MCP server. Configure it using your harness's own MCP
commands or settings; it does not install or configure harnesses.

[Website and API keys](https://private-vault-web-6vgsvc5oma-uc.a.run.app/) ·
[Setup guide](https://private-vault-web-6vgsvc5oma-uc.a.run.app/?setup=mcp) ·
[Source](https://github.com/aptos-labs/agentic-data-vault/tree/private-vault)

## Agent-guided installation

Give your agent this message:

> Read https://private-vault-web-6vgsvc5oma-uc.a.run.app/static/mcp-install.md
> and set up Data Vault MCP in this harness using its native MCP configuration.
> Preserve my other MCP servers. Ask me for my API key and any required
> configuration choices, then verify the connection.

### Instructions for the installing agent

1. Identify the current harness and its normal launcher/configuration environment.
   Do not choose a harness just because its binary is on PATH. Use the native
   command or configuration below. Keep existing MCP servers, and update an
   existing `data-vault` entry instead of adding a duplicate. Use native scope
   defaults; user-wide configuration is an explicit user choice.
2. Check for `uv`/`uvx`. Install uv from its official instructions if missing.
   The server command is `uvx --python 3.12 data-vault-mcp@latest`, over stdio.
   Python 3.12 is prepared automatically; no source clone or Node.js is needed.
   The optional warm-up command below can pre-download this environment.
3. Ask the user for an authorized API key if one is not already configured for
   this service. They can sign in with Google at the website, open **Account &
   API keys**, choose **Generate + authorize API key**, then **Copy key**.
   Set the copied value in the server's `PV_API_KEY` environment setting, using
   the harness's credential input when available, or guide the user to paste it
   into that setting. Do not print the key in diagnostics. A file is optional.
4. Apply the matching native configuration below. For Atlas, use `atlas mcp
   add-json`; if the user's normal launcher is `uv run atlas`, use that launcher
   instead. If `uvx` is unavailable to the harness, use its resolved absolute
   executable path. Do not add deployment flags or `--allow-dir`.
5. Reload/restart the MCP connection using the harness's normal controls. Some
   harnesses require the user to restart or approve a project configuration;
   explain that next step rather than claiming it is already connected.
6. Once the tools are available, call `get_mcp_version` and `list_vaults`.
   Report the version and whether authentication succeeded. An empty vault list
   is valid. Do not create a vault, append a record, upload files or attach a
   vault just to test installation. Follow the MCP's session consent flow when
   the user subsequently chooses vaults for automatic recording.

The rest of this page provides the commands and configuration for these steps,
and can also be followed manually.

## Requirements

On macOS/Linux, install [uv](https://docs.astral.sh/uv/getting-started/installation/)
and your harness. `uvx --python 3.12` automatically prepares Python 3.12.
You do not need Node.js, a repository checkout, or separate node/gas credentials.
Internet access is needed for package resolution and the vault service.

## Copy your API key

Sign in with Google on the website. Open **Account & API keys**, choose
**Generate + authorize API key**, then **Copy key**.

In your harness's MCP settings below, replace `PASTE_API_KEY_HERE` with the
copied key in **PV_API_KEY**. You do not need to download or create a key file.
The local MCP uses the private key to sign requests; the worker verifies the
signature and permissions. The private key itself is not sent to the service.
Keep the configuration containing your key private and out of version control.

## Configure your harness

Use your harness's native settings. Merge the `data-vault` entry into existing
settings, preserving other servers. If that entry already exists, update it.

**Atlas** — replace the key placeholder, then run in the directory where you
start Atlas:

```sh
atlas mcp add-json data-vault '{"command":"uvx","args":["--python","3.12","data-vault-mcp@latest"],"env":{"PV_API_KEY":"PASTE_API_KEY_HERE"},"timeout":180000}'
```

This adds or updates `data-vault` in the project's `.mcp.json`, preserving other
servers. If your normal launcher is `uv run atlas`, use `uv run atlas mcp add-json`
instead. For a deliberately user-wide setup, add `--scope user` after `add-json`.
Keep your normal configuration environment. Restart Atlas or run `/mcp reload`
inside the session. The timeout is in milliseconds.

**Codex** — edit your active `config.toml`, normally `~/.codex/config.toml`
(or `$CODEX_HOME/config.toml` if you override `CODEX_HOME`):

```toml
[mcp_servers.data-vault]
command = "uvx"
args = ["--python", "3.12", "data-vault-mcp@latest"]
startup_timeout_sec = 120
tool_timeout_sec = 180

[mcp_servers.data-vault.env]
PV_API_KEY = "PASTE_API_KEY_HERE"
```

**Claude Code** — edit your project's `.mcp.json`:

```json
{
  "mcpServers": {
    "data-vault": {
      "command": "uvx",
      "args": ["--python", "3.12", "data-vault-mcp@latest"],
      "env": {"PV_API_KEY": "PASTE_API_KEY_HERE"}
    }
  }
}
```

Claude Code will ask you to approve the project MCP configuration. If you
explicitly use another scope, edit that active configuration instead.
Other MCP clients can use the same JSON shape. For a configuration form, set
command `uvx`, the arguments shown above, and an environment variable
`PV_API_KEY` with your copied key.

If your harness cannot find `uvx`, replace `command` with the absolute path
printed by `command -v uvx` in your terminal. Restart/reload the harness after
saving. Ask your agent to list your vaults and call `get_mcp_version` to verify
its package version, deployment and log path.

See the [Codex MCP documentation](https://developers.openai.com/codex/mcp/)
and [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp)
for their native configuration controls.

## Optional warm-up

Run once to pre-download Python 3.12 (if needed), the MCP package and its
dependencies. `--help` prints the available options and exits; it does not start
the MCP server and needs no API key:

```sh
uvx --python 3.12 data-vault-mcp@latest --help
```

This can avoid a connection timeout during the first launch. You may skip it;
your harness's first launch will download the same environment.

## Optional key files

If you prefer a file, **Download key** is still available. Keep it private
(`chmod 600 /absolute/path/to/key`) and add `--api-key-file /absolute/path/to/key`
to the server's arguments. An explicit file argument overrides `PV_API_KEY`.
Without either, the server uses `PV_API_KEY_FILE` or the existing default
`~/.config/confidential-vault-6038be20/api-key`. File-based setups keep working.
An invalid or empty `PV_API_KEY` is rejected, without silently selecting a file.
Ed25519 seed strings and Ed25519 private JWK strings are accepted.

Attachment tools use paths supplied by your harness, subject to operating-system
file permissions. No directory allowlist or working-directory restriction is
applied. The configured credential file, when used, cannot be attached or overwritten.

## Updates and removal

`@latest` resolves the latest stable PyPI release at each new MCP process start;
an already-running server keeps its current version. When upgrading from 0.1/0.2,
remove any `--allow-dir` arguments and their following directory values from
the harness registration; that option and its directory restriction are removed.

Remove the registration using your harness:

```sh
atlas mcp remove data-vault
codex mcp remove data-vault
claude mcp remove data-vault
```

For other clients, remove their `data-vault` settings entry. Removing a
registration keeps your credential files, downloads and vault data.
If you explicitly registered a user-scoped server, use the matching
`--scope user` when removing it.

## Tools and privacy

The tools support vault discovery, session intent consent, append/read/search,
attachments, permissions and forget. At session start the agent asks which
vaults may receive automatic records. Intent changes require renewed consent.
Use your harness's tool-confirmation controls when you need independent write
approval. Local files are uploaded only through explicit file operations.

Logs omit credentials and content. On macOS they are under
`~/Library/Logs/confidential-vault-6038be20/`; on Linux under
`$XDG_STATE_HOME/confidential-vault-6038be20/` (default `~/.local/state/`).

The current prototype's on-chain worker attestation verification is mocked;
use synthetic data.
