---
name: iblai-connect-veeva-vault
description: "Read and write Veeva Vault data through the Vault REST API (versioned YY.1 to YY.3, e.g. v26.2) and expose it to an ibl.ai agent as an MCP tool. Use when the user asks an agent to work with Veeva Vault data, or to set up a Veeva Vault MCP connection on ibl.ai."
metadata:
  kind: guide
---

# Veeva Vault connector for AI agents

> A starting point maintained on ibl.ai at https://ibl.ai/developer/connectors/veeva-vault — not part of the iblai/base repository. Checked against Veeva Systems' documentation on October 20, 2026; test it against your own Veeva Vault setup before you rely on it.

Veeva Vault is a cloud platform for regulated life sciences content and data, used for quality, regulatory, clinical and safety work. It holds documents, binders, object records, lifecycles and workflows, with an audit trail.

## Auth & conventions

- **API:** Vault REST API (versioned YY.1 to YY.3, e.g. v26.2) (REST). Read and write documents, renditions, binders and object records; run VQL queries; manage workflows and lifecycles; read audit history; use MDL for metadata. Vault AI agent actions are callable through the API.
- **Base URL:** https://{vaultDNS}/api/{version}
- **Access:** Issued by your administrator. Calls need a Vault user account whose security profile or permission set grants API Access; without it, authentication succeeds but other calls return INSUFFICIENT_ACCESS. The Vault administrator grants it.
- **Auth:** Username and password (session ID); OAuth 2.0 / OpenID Connect; Salesforce delegated requests; Delegated access. POST /api/{version}/auth with username and password returns a session ID, sent in the Authorization header on later calls. Session IDs expire after inactivity. OAuth 2.0 / OIDC is the alternative to password sessions.
- **Limits:** A per-Vault burst limit over a fixed 5-minute window; past it, Vault delays responses (X-VaultAPI-ResponseDelay). No daily limit since v21.1. The auth endpoint has its own 1-minute burst limit; job status calls are one per 10 seconds.
- Keep Veeva Vault credentials in environment variables or the ibl.ai credential store. Never print a token in chat and never commit one to a file.
- Destructive or outward-facing calls are marked **Confirm with the user first** — do.

## Reads

- **Documents** — Document metadata, versions, renditions, attachments, annotations and relationships.
- **Binders** — Binders, their sections and exports.
- **Object records** — Records of standard and custom Vault objects.
- **VQL queries** — Vault Query Language queries across documents and objects.
- **Workflows** — Active workflows, tasks and available user actions.
- **Audit history** — Document, object and login audit trails and logs.

## Writes

- **Documents** — Create a document, upload a new version or update fields.
- **Object records** — Create, upsert and update object records.
- **Workflow actions** — Initiate workflows and complete workflow tasks, which move content through its lifecycle. **Confirm with the user first.**
- **Delete** — Delete a document or object records. **Confirm with the user first.**

## Expose it to an ibl.ai agent (MCP)

Veeva Systems publishes an official MCP server, Vault AI MCP (https://limited.veevavault.dev/mcp/vault-mcp-server/overview). Register it below as-is, or host your own server that wraps the calls in this skill.

First install the ibl.ai platform skills and connect your organization (writes `IBLAI_ORG`, `IBLAI_USERNAME` and `IBLAI_API_KEY` to `.env`):

```bash
npx skills add iblai/base --all
# then, in your coding agent:
/iblai-api-login
```

Every call below sends `Authorization: Api-Token $IBLAI_API_KEY`.

1. **Register the server** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-servers/` with `name`, `url`, `transport` (`sse` | `websocket` | `streamable_http`) and `auth_type` (`none` | `token` | `oauth2`). Capture the returned `id`.
   - For an API key or service credential use `auth_type=token` with `auth_scope=platform` for one key across the organization, or scope it to a single agent for one key per agent.
2. **Create the connection** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-server-connections/` with `server`, `scope` (`platform` | `mentor` | `user`), `auth_type`, and either `credentials` + `authorization_scheme` or a `connected_service` id for OAuth. Credentials are masked on read; never send a masked value back.
3. **Enable it on the agent** — `GET https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/{agent_id}/settings/`, add `mcp-tool` to `tool_slugs` and the server id to `mcp_servers`, then `PATCH` the full lists back. They are replaced, not merged.

Full reference: https://ibl.ai/developer/platform/mcp/mcp-connections and the `/iblai-api-agent-mcp` skill.

## Example prompts

- "Find every SOP in Effective state that references the cleaning validation procedure"
- "List change controls opened this quarter that are still in review"
- "Summarize the latest approved version of the stability protocol for product X"
- "Which documents in the CMC binder were updated after the last submission?"

## Guardrails

- Vault holds GxP-regulated content such as SOPs, batch records, submissions and safety cases, subject to 21 CFR Part 11 electronic records and signature rules.
- Request the narrowest Veeva Vault scopes or role the task needs, and prefer a read-only credential for agents that only answer questions.
- Return the fields the user asked for, not whole records; do not paste personal data into chat that the user did not request.
- Before any write, show the user exactly what will change and wait for a yes.
- Respect the documented limits above: page through results and back off on rate-limit responses instead of retrying in a loop.

## References

- Vault API reference: https://general.veevavault.dev/vault-api/api-reference
- Authenticating to Vault: https://general.veevavault.dev/vault-api/getting-started/authenticating/
- Vault AI MCP overview: https://limited.veevavault.dev/mcp/vault-mcp-server/overview
- Vault AI MCP: https://limited.veevavault.dev/mcp/vault-mcp-server/overview
- This connector on ibl.ai: https://ibl.ai/developer/connectors/veeva-vault
- ibl.ai MCP server connections: https://ibl.ai/developer/platform/mcp/mcp-connections
