Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
docs: added initial
Sheen Capadngan210c22451d0b
diff --git a/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txt b/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txtindex 3f2dc15577..feff40e0d9 100644--- a/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txt+++ b/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txt@@ -368,6 +368,8 @@ OpenClawOpenCodePerplexityxAI+# The MCP transport, always written "Streamable HTTP"+Streamable# --- Communication and messaging ---Discorddiff --git a/docs/docs.json b/docs/docs.jsonindex 9e74f05d63..e6111455fd 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -764,7 +764,14 @@"group": "Concepts","pages": ["documentation/platform/agent-vault/access-bundles",- "documentation/platform/agent-vault/services",+ {+ "group": "Services",+ "root": "documentation/platform/agent-vault/services",+ "pages": [+ "documentation/platform/agent-vault/http-apis",+ "documentation/platform/agent-vault/mcp-servers"+ ]+ },"documentation/platform/agent-vault/variables",{"group": "Sessions",diff --git a/docs/documentation/platform/agent-vault/access-bundles.mdx b/docs/documentation/platform/agent-vault/access-bundles.mdxindex f1eeb921b7..66a3acbbf0 100644--- a/docs/documentation/platform/agent-vault/access-bundles.mdx+++ b/docs/documentation/platform/agent-vault/access-bundles.mdx@@ -3,7 +3,7 @@ title: "Access bundles"description: "Lists of services that AI agents can access during a session."----An access bundle defines the list of [services](/documentation/platform/agent-vault/services) (external APIs) that an AI agent can access during a [session](/documentation/platform/agent-vault/sessions).+An access bundle defines the list of [services](/documentation/platform/agent-vault/services) (external systems) that an AI agent can access during a [session](/documentation/platform/agent-vault/sessions).You can reuse access bundles across as many sessions as you like. This makes them useful for scoping what services an agent can access depending on its task. For example, you might have:@@ -31,7 +31,7 @@ To create a new access bundle:</Step></Steps>-Now you can [add services](/documentation/platform/agent-vault/services#add-a-service) to the access bundle so agents using it can make authenticated requests.+Now you can [add services](/documentation/platform/agent-vault/services) to the access bundle so agents using it can make authenticated requests.## Manage access to access bundlesdiff --git a/docs/documentation/platform/agent-vault/guides/custom-agent.mdx b/docs/documentation/platform/agent-vault/guides/custom-agent.mdxindex c41730807b..f26d165d66 100644--- a/docs/documentation/platform/agent-vault/guides/custom-agent.mdx+++ b/docs/documentation/platform/agent-vault/guides/custom-agent.mdx@@ -39,7 +39,7 @@ First, create an [access bundle](/documentation/platform/agent-vault/access-bundOn the **Credential** step, paste the real API key.<Note>- If the API expects the key somewhere other than a header, such as in the URL, [add a substitution](/documentation/platform/agent-vault/services#add-a-substitution) instead. Note the placeholder you enter in **Replace**, because your agent sends it in [Step 3](#step-3-replace-the-api-keys-with-placeholders).+ If the API expects the key somewhere other than a header, such as in the URL, [add a substitution](/documentation/platform/agent-vault/http-apis#add-a-substitution) instead. Note the placeholder you enter in **Replace**, because your agent sends it in [Step 3](#step-3-replace-the-api-keys-with-placeholders).</Note></Step><Step>@@ -111,7 +111,7 @@ Store `ca.pem` where the agent can read it. The certificate isn't secret, so youDelete the real API keys from the agent's code and configuration. Most SDKs refuse to start without a key, so pass a placeholder value instead, such as `agent-vault`. The proxy replaces the placeholder with the real credential:- **If the service uses Bearer or Basic credentials:** the proxy replaces the header that carries the key, so any placeholder works-- **If the service uses a [substitution](/documentation/platform/agent-vault/services#substitutions):** use the exact placeholder you entered in [Step 1](#create-an-access-bundle)+- **If the service uses a [substitution](/documentation/platform/agent-vault/http-apis#substitutions):** use the exact placeholder you entered in [Step 1](#create-an-access-bundle)## Step 4: Send requests through the proxydiff --git a/docs/documentation/platform/agent-vault/guides/hermes-gateway.mdx b/docs/documentation/platform/agent-vault/guides/hermes-gateway.mdxindex 6ad997ac36..a5d16d57ea 100644--- a/docs/documentation/platform/agent-vault/guides/hermes-gateway.mdx+++ b/docs/documentation/platform/agent-vault/guides/hermes-gateway.mdx@@ -54,7 +54,7 @@ This guide walks you through running the [Hermes Agent](https://hermes-agent.nou- An Infisical organization where you're an Agent Vault admin- Two machines on the same private network, one for the Agent Vault proxy and one for Hermes (physical machines, virtual machines, or containers)- [Hermes Agent](https://hermes-agent.nousresearch.com/docs/getting-started/quickstart) installed on the Hermes machine, with the [gateway](https://hermes-agent.nousresearch.com/docs/user-guide/messaging) set up and working with your real API keys-- The [Infisical CLI](/cli/install) 0.43.133 or later installed on the Agent Vault machine (earlier versions don't apply [substitutions](/documentation/platform/agent-vault/services#substitutions))+- The [Infisical CLI](/cli/install) 0.43.133 or later installed on the Agent Vault machine (earlier versions don't apply [substitutions](/documentation/platform/agent-vault/http-apis#substitutions))- [`curl`](https://curl.se/download.html) and [`jq`](https://jqlang.org/download/) installed on the Hermes machine<SeparateMachinesNote />@@ -113,7 +113,7 @@ First, create an [access bundle](/documentation/platform/agent-vault/access-bundOn the **Credential** step, paste the real value of the API key from `~/.hermes/.env`.<Note>- [Add a substitution](/documentation/platform/agent-vault/services#add-a-substitution) for each key instead if either of these is true:+ [Add a substitution](/documentation/platform/agent-vault/http-apis#add-a-substitution) for each key instead if either of these is true:- The API expects the key outside a header, such as in the URL path. For example, Telegram's bot token goes in the URL of every request: `https://api.telegram.org/bot<token>/getUpdates`- The API uses more than one key (one service can hold a substitution for each key, and an access bundle can't have two services for the same host)@@ -371,7 +371,7 @@ Hermes writes the gateway's logs to `~/.hermes/logs/gateway.log`. On Linux, you- The session was revoked or has expired (check the **Sessions** page in Infisical, and [replace the session](#revoke-or-replace-the-session) if needed)- Under the proxy's [strict traffic policy](/documentation/platform/agent-vault/proxies#traffic-policy), no service in the bundle covers the host Hermes called (add a service that does, or use a pass-through service)- - The service covers the host, but doesn't allow the request's method or path (check the service's [methods and paths](/documentation/platform/agent-vault/services#methods-and-paths))+ - The service covers the host, but doesn't allow the request's method or path (check the service's [methods and paths](/documentation/platform/agent-vault/http-apis#methods-and-paths))</Accordion><Accordion title="Requests to Telegram fail with a 502">The proxy can only attach credentials to a request that names the API by its hostname (`api.telegram.org`). Hermes's Telegram adapter can connect to Telegram by IP address instead, and for those requests the proxy can't verify Telegram's certificate, so it returns a 502. The proxy logs these requests with `decision=error` and an IP address as the host.diff --git a/docs/documentation/platform/agent-vault/guides/openclaw-gateway.mdx b/docs/documentation/platform/agent-vault/guides/openclaw-gateway.mdxindex f7f7c42062..088fcb573f 100644--- a/docs/documentation/platform/agent-vault/guides/openclaw-gateway.mdx+++ b/docs/documentation/platform/agent-vault/guides/openclaw-gateway.mdx@@ -54,7 +54,7 @@ This guide walks you through running the [OpenClaw](https://docs.openclaw.ai/) [- An Infisical organization where you're an Agent Vault admin- Two machines on the same private network, one for the Agent Vault proxy and one for OpenClaw (physical machines, virtual machines, or containers)- [OpenClaw](https://docs.openclaw.ai/start/getting-started) installed on the OpenClaw machine, with the gateway installed as a service (`openclaw onboard --install-daemon`) and a messaging platform set up and working with your real API keys-- The [Infisical CLI](/cli/install) 0.43.133 or later installed on the Agent Vault machine (earlier versions don't apply [substitutions](/documentation/platform/agent-vault/services#substitutions))+- The [Infisical CLI](/cli/install) 0.43.133 or later installed on the Agent Vault machine (earlier versions don't apply [substitutions](/documentation/platform/agent-vault/http-apis#substitutions))- [`curl`](https://curl.se/download.html) and [`jq`](https://jqlang.org/download/) installed on the OpenClaw machine<SeparateMachinesNote />@@ -107,7 +107,7 @@ First, create an [access bundle](/documentation/platform/agent-vault/access-bundOn the **Credential** step, paste the real value of the API key.<Note>- [Add a substitution](/documentation/platform/agent-vault/services#add-a-substitution) for each key instead if either of these is true:+ [Add a substitution](/documentation/platform/agent-vault/http-apis#add-a-substitution) for each key instead if either of these is true:- The API expects the key outside a header, such as in the URL path. For example, Telegram's bot token goes in the URL of every request: `https://api.telegram.org/bot<token>/getUpdates`- The API uses more than one key (one service can hold a substitution for each key, and an access bundle can't have two services for the same host)@@ -388,7 +388,7 @@ To follow the gateway's logs, run `openclaw logs --follow`. To check the gateway- The session was revoked or has expired (check the **Sessions** page in Infisical, and [replace the session](#revoke-or-replace-the-session) if needed)- Under the proxy's [strict traffic policy](/documentation/platform/agent-vault/proxies#traffic-policy), no service in the bundle covers the host OpenClaw called (add a service that does, or use a pass-through service)- - The service covers the host, but doesn't allow the request's method or path (check the service's [methods and paths](/documentation/platform/agent-vault/services#methods-and-paths))+ - The service covers the host, but doesn't allow the request's method or path (check the service's [methods and paths](/documentation/platform/agent-vault/http-apis#methods-and-paths))</Accordion></AccordionGroup>diff --git a/docs/documentation/platform/agent-vault/how-it-works.mdx b/docs/documentation/platform/agent-vault/how-it-works.mdxindex 03cd63e9c7..ffcdedf2b2 100644--- a/docs/documentation/platform/agent-vault/how-it-works.mdx+++ b/docs/documentation/platform/agent-vault/how-it-works.mdx@@ -24,7 +24,7 @@ flowchart LRAgent Vault uses four primitives to create secure sessions for AI agents:-- [**Services**](#services): Individual APIs, each configured with a real credential+- [**Services**](#services): The APIs, MCP servers, and anything else the agent talks to, with any credentials to add- [**Access bundles**](#access-bundles): Groups of services, granted as a unit- [**Sessions**](#sessions): Time-bound access grants that an agent uses to authenticate to the proxy for the services in an access bundle- [**Proxies**](#proxies): The forward proxy that intercepts an agent's outbound traffic and attaches real credentials to authorized requests@@ -33,7 +33,7 @@ Here's how the four concepts connect:<Steps><Step>- The access bundle groups the services (external APIs) you want your agent to reach.+ The access bundle groups the services (external systems) you want your agent to reach.```mermaidflowchart LR@@ -113,19 +113,18 @@ Here's a breakdown of each primitive that Agent Vault relies on.### Services-A service represents one external API, such as GitHub's REST API, Slack's Web API, or Anthropic's messages endpoint. Each service holds:+A service represents one external system that an agent can reach, such as GitHub's REST API or Linear's MCP server. Each service holds:-- **Hosts**: The host or hosts the service applies to, like `api.github.com`-- **Authentication scheme**: How the API authenticates: bearer, basic, or pass-through-- **Credential**: The real API token or username and password the proxy attaches to matching requests-- **Rules**: The HTTP methods and paths the service allows (every method and path by default)-- **Custom headers**: Extra headers the proxy adds to each request-- **Substitutions**: Placeholders that the proxy replaces with real values+- **Target**: Where the system is, such as the host `api.github.com` or the server URL `https://mcp.linear.app/mcp`+- **Credential**: The real token, username and password, or OAuth connection that the proxy attaches to the agent's requests, if the service uses one+- **Options**: Settings that depend on the service's type, such as the HTTP methods and paths it allows, custom headers, and substitutions++Agent Vault supports two types of service: [HTTP APIs](/documentation/platform/agent-vault/http-apis) and [MCP servers](/documentation/platform/agent-vault/mcp-servers).You don't hand services to an agent directly—they're defined within access bundles.<Card title="Services" icon="plug" href="/documentation/platform/agent-vault/services">- External APIs that an AI agent can securely call during a session.+ Anything an AI agent talks to during a session, such as an API or an MCP server.</Card>### Access bundles@@ -152,7 +151,7 @@ Even if an attacker stole the session token, they could only reach the hosts, me### Proxies-A proxy runs where your agent's traffic leaves your network. It intercepts every outbound request, authorizes the request against the session's access bundle, attaches the matching service's credential as a header, and forwards the request to the upstream host. If the request breaks the matching service's [method or path rules](/documentation/platform/agent-vault/services#methods-and-paths), the proxy refuses it instead.+A proxy runs where your agent's traffic leaves your network. It intercepts every outbound request, authorizes the request against the session's access bundle, attaches the matching service's credential as a header, and forwards the request to the upstream host. If the request breaks the matching service's [method or path rules](/documentation/platform/agent-vault/http-apis#methods-and-paths), the proxy refuses it instead.<Card title="Proxies" icon="server" href="/documentation/platform/agent-vault/proxies">Forward proxies that intercept an AI agent's requests and attach real credentials on the way out.@@ -172,6 +171,17 @@ Here's what happens when an agent calls `api.github.com` through an Agent VaultIf the agent asks for a host that isn't covered by any service in the access bundle (like `api.internal.example.com`), the proxy either forwards the request without credentials or refuses it outright, depending on its [traffic policy](/documentation/platform/agent-vault/proxies#traffic-policy).</Note>+## Example flow: Linear MCP server++Here's what happens when an agent calls a tool on Linear's MCP server through an Agent Vault session. The agent has the server's real URL, `https://mcp.linear.app/mcp`, and no credential for it:++1. The agent's MCP client sends the tool call to `mcp.linear.app` through the [proxy](#proxies), with the [session](#sessions) token as the proxy credential.+2. The proxy finds the MCP [service](#services) in the session's [access bundle](#access-bundles) that covers `mcp.linear.app`, and reads the OAuth access token Infisical holds for it.+3. The proxy records the tool's name for the session log, attaches the access token, and forwards the request.+4. Linear responds, and the proxy pipes the response back to the agent.++Infisical refreshes the access token before it expires. If Linear rejects the token anyway, the proxy gets a fresh one from Infisical and retries the request once. The agent never signs in to Linear itself.+## Why no code changes are neededAgent Vault plugs into a mechanism the entire HTTP ecosystem already uses: the `HTTPS_PROXY` environment variable. Any HTTP client that reads `HTTPS_PROXY` routes through the proxy without any code changes. That includes `curl`, `git`, `gh`, Python's `requests`, and most SDKs.diff --git a/docs/documentation/platform/agent-vault/http-apis.mdx b/docs/documentation/platform/agent-vault/http-apis.mdxnew file mode 100644index 0000000000..54f5d90737--- /dev/null+++ b/docs/documentation/platform/agent-vault/http-apis.mdx@@ -0,0 +1,240 @@+---+title: "HTTP APIs"+description: "External APIs that an AI agent can securely call during a session."+---++An HTTP service is a [service](/documentation/platform/agent-vault/services) for one external API that an agent can access during a [session](/documentation/platform/agent-vault/sessions). Each HTTP service defines the external API’s [host URL](#host-patterns), its [authentication method](#credential-types), and a real credential to attach when forwarding requests from the agent.++<Tip>+An HTTP service can also limit which [HTTP methods and paths](#methods-and-paths) the agent can use, [add custom headers](#custom-headers) to each request, and [replace placeholder values](#substitutions) the agent sends with real ones.+</Tip>++## Add an HTTP service++To add an HTTP service to an access bundle:++<Steps>+ <Step>+ In Agent Vault, go to **Access Bundles**. Select your access bundle, then select **Add Service**.+ </Step>+ <Step>+ On the **Choose a template** panel, pick the template for the API you want to reach, or select **Custom** to configure the host and header yourself.++ <Frame>+ <img src="/images/platform/agent-vault/service-template-picker.png" alt="The Choose a template panel with Custom, OpenAI, Anthropic, Slack, GitHub, and Google Workspace" />+ </Frame>+ </Step>+ <Step>+ Follow the steps and paste your credentials in the **Credential** section.++ To use a value that several services share, type `{{` in a [field that accepts variables](/documentation/platform/agent-vault/variables#use-a-variable-in-a-service) and select a variable from the list that opens.+ </Step>+ <Step>+ Select **Add Service**. The service appears in the bundle's list.+ </Step>+</Steps>++## Credential types++When configuring a service, you have the option to set its credential type. This determines what the proxy attaches to outbound requests.++<Tip>+If you're configuring a service with a template, you can usually leave the credential type set to the default.+</Tip>++### Bearer++The proxy attaches one header in the format `<header name>: <prefix> <value>`, which defaults to `Authorization: Bearer <value>`.++Bearer is the right choice for most APIs. If the API expects a bare key instead of a `Bearer`-prefixed one, change the header name to `X-API-Key` and clear the prefix.++### Basic++The proxy attaches the header `Authorization: Basic <base64 of username:password>`. Either the username or the password can be left blank.++Basic is the right choice for APIs behind HTTP basic authentication, including ones that put the entire key in the username field.++### Pass-through++The proxy attaches no credential. Unless the service adds [custom headers](#custom-headers) or [substitutions](#substitutions), the proxy forwards the agent's request to the API unchanged.++Pass-through is the right choice when the proxy's strict [traffic policy](/documentation/platform/agent-vault/proxies#traffic-policy) would otherwise block the host. It lets the request reach the API without attaching a credential.++<Note>+For **Bearer** and **Basic** services, if the agent's request already carries a header with the same name as the one the service sends, the proxy replaces it with the service's credential.+</Note>++## Host patterns++When configuring a service, you have the option to set which host patterns it matches. A host pattern controls which outbound requests get the service's credential attached.++<Tip>+For security reasons, we recommend keeping host patterns as narrow as the API allows. If you're configuring a service with a template, you can usually leave the host set to the default.+</Tip>++### Multiple hosts++A single pattern can cover multiple hosts by listing them, separated by commas:++```text+api.github.com, uploads.github.com+```++### Default port++A host without a port specified only matches requests to the standard HTTPS port `443`:++```+api.github.com+```++This pattern matches `api.github.com:443`, but not `api.github.com:80` or `api.github.com:8080`.++### Non-standard ports++To match a port other than `443`, include it in the host:++```text+internal-api.example.com:8443+```++### Plaintext hosts++A service works the same way over plain HTTP as it does over HTTPS. The proxy attaches the credential, the custom headers, and the substitutions either way. Use a plaintext host for an API on your own network that doesn't serve HTTPS.++Leave the `http://` scheme off the host, and name the port instead:++```text+internal-api.example.com:8080+```++If you don't name the port, the host will only match [port `443`](#default-port):++<Warning>+The proxy sends the credential to a plaintext host unencrypted, so anyone who can read traffic between the proxy and the API can read the credential. Only use plaintext hosts on a network you trust.+</Warning>++### Wildcards++Wildcards match exactly one label. The pattern below matches `api.atlassian.net`, but not `a.b.atlassian.net` or `atlassian.net`.++```text+*.atlassian.net+```++## Host conflicts++Two services within an access bundle can't cover the same host with the same pattern. For example, if you have a service that defines its host as `api.github.com` and you try to create a second service with that same host, Infisical will stop you from saving the second service.++However, two services can match the same host if they define the host pattern differently. When the agent makes a request to that host, the request will match the service that defines the host more explicitly. For example:++- One service defines its host as `api.github.com`+- Another service defines it as `*.github.com`++In the above example, requests to `api.github.com` are handled by the first service.++<Warning>+The proxy applies only the more specific service's [methods and paths](#methods-and-paths). This means that if the `api.github.com` service allows only `GET`, the proxy refuses a `POST` to `api.github.com`, even if that same `POST` request would succeed through `*.github.com`.+</Warning>++<Note>+Different access bundles can cover the same host with different credentials, since an agent only gets the credential from the access bundle its session is scoped to.+</Note>++## Methods and paths++By default, a service allows every HTTP method and every path on its hosts. When configuring a service, you have the option to narrow it to only the methods and paths your agent needs.++<Frame>+ <img src="/images/platform/agent-vault/service-details.png" alt="The Details step of a GitHub service, allowing GET and POST on the path prefixes /repos and /search" />+</Frame>++### Methods++On the **Details** step, clear **All Methods** and select the HTTP methods the service allows. For example, if a service allows only `GET` and `HEAD`, the proxy refuses a `POST` or `DELETE` request before the request leaves your network.++### Paths++On the **Details** step's **Paths** field, enter each path prefix the service allows. A path prefix matches whole segments, so `/repos` covers `/repos/octo/hello` but not `/repositories`. Write the path exactly as it appears in the URL.++<Note>+If a service has path prefixes, the proxy also refuses any path that different servers would resolve differently, such as one containing `..` or an encoded slash. Ordinary paths still work, including ones with a space or a non-ASCII character such as `/repos/owner/repo/contents/café.md`.+</Note>++### Refused requests++If a request breaks either rule, the proxy refuses the request with a 403. The message names the service and the method or path it doesn't allow:++```text+HTTP/1.1 403 Forbidden++service "github" does not allow POST: blocked by service policy+```++```text+HTTP/1.1 403 Forbidden++service "github" does not allow path "/admin": blocked by service policy+```++## Custom headers++Some APIs need a header alongside the credential, such as an organization ID or an API version. On the **Credential** step, under **Advanced Options**, select **Add Custom Header** and enter a name, an optional prefix, and a value. The proxy attaches it to every request to that service, whatever credential type the service uses.++<Frame>+ <img src="/images/platform/agent-vault/service-advanced-options.png" alt="The Credential step with an API version custom header and a substitution that swaps the agent's placeholder for the real token, matched in the header" />+</Frame>++Infisical won't save a custom header with the same name as the credential's header, because the proxy would overwrite it with the credential. Infisical also won't save a custom header that the proxy sets itself, such as `Host`, `Content-Length`, or `Connection`.++<Tip>+A custom header's value can include a [substitution](#substitutions) placeholder. If that substitution has **Headers** selected under **Replace In**, the proxy replaces the placeholder with the real value, so several headers can reuse one secret.+</Tip>++## Substitutions++Instead of attaching headers to an agent's request, you can configure your service to use substitution instead.++With a substitution, you give the agent a placeholder instead of the real credential, such as a fake API token. The agent sends the placeholder in its requests, and the proxy replaces it with the real value before forwarding each request. For example, if you set the agent's GitHub token to `__GITHUB_PAT__`, the agent sends:++```text+Authorization: Bearer __GITHUB_PAT__+```++GitHub receives the real token, and the agent never holds it.++We recommend using substitutions when your agent's tool won't run without a token of its own, or when the API expects the credential outside a header, such as in the URL path or the query string.++<Info>+Substitutions work with every credential type, including pass-through.+</Info>++### Add a substitution++<Steps>+ <Step>+ On the **Credential** step, expand **Advanced Options** and select **Add Substitution**.+ </Step>+ <Step>+ Enter the placeholder your agent sends in **Replace**, and the real value in **With**.++ <Tip>+ The proxy replaces every occurrence of the placeholder, so pick one that won't appear anywhere else in the request.+ </Tip>+ </Step>+ <Step>+ Under **Replace In**, select where the proxy looks for the placeholder: **URL Path**, **Query String**, **Headers**, or **Body**.+ </Step>+ <Step>+ In the agent's environment or configuration, set the credential to the placeholder, such as `GITHUB_TOKEN=__GITHUB_PAT__`. Infisical doesn't set the placeholder for you.++ <Tip>+ Some tools check a token's format before they send it. If the agent's tool does, make the placeholder match the format of the real key, such as `ghp_` followed by 36 characters for a GitHub token.+ </Tip>+ </Step>+</Steps>++### Encoding and body limits++- **Slashes in the URL path:** The proxy sends a `/` in the real value as `%2F`, so a GitLab project like `group/project` stays one path segment and still passes the service's [path prefixes](#paths)+- **Large or compressed bodies:** The proxy doesn't replace placeholders in a body larger than 10 MB or compressed with `Content-Encoding` (it forwards the body unchanged and logs a warning that names the service)diff --git a/docs/documentation/platform/agent-vault/mcp-servers.mdx b/docs/documentation/platform/agent-vault/mcp-servers.mdxnew file mode 100644index 0000000000..a12d4b2a4f--- /dev/null+++ b/docs/documentation/platform/agent-vault/mcp-servers.mdx@@ -0,0 +1,179 @@+---+title: "MCP servers"+description: "Remote MCP servers that an AI agent can use during a session without holding their credentials."+---++An MCP service lets an agent use a remote [MCP server](https://modelcontextprotocol.io/), such as Linear's or Notion's, during a [session](/documentation/platform/agent-vault/sessions). It's one of the two types of [service](/documentation/platform/agent-vault/services) you can add to an access bundle. The other type, an HTTP service, covers a web API that the agent calls directly.++You add the MCP server to your agent with its real URL and no credentials. When the agent connects to the server, the [proxy](/documentation/platform/agent-vault/proxies) attaches the service's credential, so the agent can call the server's tools without ever holding the credential.++## Prerequisites++- The [Admin role](/documentation/platform/agent-vault/access-control) in Agent Vault+- An [access bundle](/documentation/platform/agent-vault/access-bundles) to add the MCP server to+- An enrolled [proxy](/documentation/platform/agent-vault/proxies#create-and-enroll-a-proxy) that your agent can reach+- An account with the MCP server's provider, or a token the server accepts++## Add an MCP server++<Steps>+ <Step>+ In Agent Vault, go to **Access Bundles**. Select your access bundle, then select **Add Service**.+ </Step>+ <Step>+ On the **Choose a Template** panel, pick a template under **MCP Servers**, or select **Custom MCP Server** to connect any other remote MCP server.+ </Step>+ <Step>+ On the **Details** step, enter a **Name**, and check the [**Transport** and **Server URL**](#server-url-and-transport). A template fills in the transport and server URL for you. Select **Continue**.+ </Step>+ <Step>+ On the **Credential** step, pick an **Auth Method** and set up the [credential](#credential-types). Select **Continue**.+ </Step>+ <Step>+ On the **Review** step, select **Add Service**. The service appears in the bundle's list with the type **MCP Server**.+ </Step>+</Steps>++Next, [connect your agent](#connect-your-agent) to the MCP server.++## Server URL and transport++- **Server URL:** The URL your agent connects to, such as `https://mcp.linear.app/mcp` (it must start with `https://`, and can't include a username, password, query string, or fragment)+- **Transport:** **Streamable HTTP** for most servers, or **SSE** if the server uses the older HTTP+SSE transport++The service covers every request to the server URL's host, whatever the path. If the URL includes a port other than `443`, the service covers only that port. Two services in the same access bundle can't cover the same host, as described in [host conflicts](/documentation/platform/agent-vault/http-apis#host-conflicts).++## Credential types++### OAuth 2.1++With OAuth 2.1, you sign in to the provider once from Infisical. Infisical stores the tokens the provider returns and refreshes the access token before it expires. The proxy only receives the access token, and the agent never receives any token.++<Steps>+ <Step>+ Under **Auth Method**, select **OAuth 2.1**, then select **Authorize**.++ <Note>+ Some servers, such as GitHub's, don't let Infisical register itself as an OAuth client. For these servers, the card asks for an OAuth app of your own instead. Create an OAuth app with the provider, and set its redirect URI to the **Redirect URI** the card shows. Then enter the app's **Client ID** and **Client Secret** (leave **Client Secret** empty for a public client), and select **Authorize** again.+ </Note>+ </Step>+ <Step>+ In the pop-up window, sign in to the provider and approve access.+ </Step>+ <Step>+ When the card shows **Authorized** and the scopes the provider granted, select **Continue**. **Continue** stays disabled until the authorization succeeds.+ </Step>+</Steps>++<Warning>+ Every session that uses the access bundle calls tools as the account you signed in with. Sign in with an account that has only the access your agents need.+</Warning>++### Bearer token++With a Bearer token, you paste a token the MCP server accepts into **Token**, such as a [GitHub personal access token](https://github.com/settings/tokens) for GitHub MCP. The proxy sends the token as `Authorization: Bearer <token>`.++To send the token in a different header or with a different prefix, expand **Advanced** and change **Header Name** or **Prefix**. To use a token that several services share, type `{{` in **Token** and select a [variable](/documentation/platform/agent-vault/variables).++## Custom headers++If the MCP server needs another header besides the credential, such as an organization ID, add it as a custom header. The proxy adds custom headers to every request to the server, whichever auth method the service uses.++<Steps>+ <Step>+ On the **Credential** step, expand **Advanced** and select **Add Custom Header**.+ </Step>+ <Step>+ Enter the header's **Name**, an optional **Prefix**, and the **Value**. To use a [variable](/documentation/platform/agent-vault/variables), type `{{` in **Value**.+ </Step>+</Steps>++Infisical won't save a custom header with the same name as the credential's header, which is `Authorization` unless you changed a Bearer token's **Header Name**. Infisical also won't save a header that the proxy sets itself, such as `Host` or `Content-Length`.++## Connect your agent++<Steps>+ <Step>+ [Create a session](/documentation/platform/agent-vault/sessions#create-a-session) for the access bundle, and copy the `infisical agent-vault run` command it gives you.+ </Step>+ <Step>+ Add the MCP server to your agent by its server URL. Don't add a token, and don't sign in to the server from the agent.++ <Tabs>+ <Tab title="Claude Code">+ ```bash+ claude mcp add --transport http linear https://mcp.linear.app/mcp+ ```++ If the service uses the SSE transport, use `--transport sse` instead.+ </Tab>+ <Tab title="Codex">+ ```bash+ codex mcp add linear --url https://mcp.linear.app/mcp+ ```++ Don't run `codex mcp login` for the server.+ </Tab>+ <Tab title="OpenCode">+ In `opencode.json`, add the server as a remote MCP server with OAuth turned off:++ ```json+ {+ "$schema": "https://opencode.ai/config.json",+ "mcp": {+ "linear": {+ "type": "remote",+ "url": "https://mcp.linear.app/mcp",+ "oauth": false+ }+ }+ }+ ```+ </Tab>+ </Tabs>+ </Step>+ <Step>+ Start the agent with the command from the session. For example, with Claude Code:++ ```bash+ infisical agent-vault run --session-token <session-token> --proxy <proxy-host>:17323 -- claude+ ```+ </Step>+ <Step>+ Ask the agent to use one of the server's tools, such as listing your Linear issues. If you've [set up session logs](/documentation/platform/agent-vault/session-logs#setting-up-session-logs), the call appears in the session's logs with the [tool name](/documentation/platform/agent-vault/session-logs#mcp-tool-calls).+ </Step>+</Steps>++## Limitations++- **Remote servers only:** An MCP service covers MCP servers that the agent reaches over HTTPS. A local MCP server that the agent starts as a process isn't an MCP service, but you can add [HTTP services](/documentation/platform/agent-vault/http-apis) for the APIs that the local server calls+- **No tool filtering:** The agent can call every tool the server offers to the credential, so limit what the agent can do through the credential's own permissions+- **No connectors that run in a vendor's cloud:** Custom connectors in claude.ai or ChatGPT connect from the vendor's servers, so their traffic never reaches your proxy+- **No WebSocket transports:** The proxy doesn't support [WebSocket connections](/documentation/platform/agent-vault/proxies#supported-connections)++## Troubleshooting++<AccordionGroup>+ <Accordion title="The agent gets a 502 response from the MCP server">+ If the server rejects an OAuth service's token, the proxy gets a fresh token from Infisical and sends the request again. If the server rejects the request again, or asks for scopes the authorization lacks, the proxy returns this `502` response to the agent:++ ```json+ {"error":"upstream_auth_failed","message":"The MCP server rejected the credential Infisical provided. Reauthorize this service in Infisical Agent Vault."}+ ```++ In the access bundle's **Services** table, the service shows **Needs Reauthorization** or **Needs Additional Scopes**. Open the service's menu, select **Reauthorize**, and sign in to the provider again. Then try the tool call again.+ </Accordion>+ <Accordion title="Authorize fails on a self-hosted instance">+ The redirect URI that Infisical gives the provider is your instance's `SITE_URL` followed by `/agent-vault/oauth/callback`. Check that:++ - `SITE_URL` is set to the URL you use to open Infisical+ - `SITE_URL` uses `https://` (providers such as Linear refuse a redirect URI on plain `http://` unless the host is `localhost`)+ </Accordion>+ <Accordion title="The agent asks you to sign in to the MCP server">+ The request reached the server without a credential, or with a Bearer token the server rejected. Check that:++ - The agent runs through `infisical agent-vault run` with a session for the access bundle+ - The server URL in the agent has the same host as the service's **Server URL**+ - The service's Bearer token is still valid (if it isn't, edit the service and paste a new one)+ </Accordion>+</AccordionGroup>diff --git a/docs/documentation/platform/agent-vault/overview.mdx b/docs/documentation/platform/agent-vault/overview.mdxindex bbbc41a7ce..182362de07 100644--- a/docs/documentation/platform/agent-vault/overview.mdx+++ b/docs/documentation/platform/agent-vault/overview.mdx@@ -45,7 +45,7 @@ Set up Agent Vault for the agent you use, or for an agent you wrote yourself.Lists of services that AI agents can access during a session.</Card><Card title="Services" icon="plug" href="/documentation/platform/agent-vault/services">- External APIs that an AI agent can securely call during a session.+ Anything an AI agent talks to during a session, such as an API or an MCP server.</Card><Card title="Variables" icon="braces" href="/documentation/platform/agent-vault/variables">Values you store once in an access bundle and use in any of its services.diff --git a/docs/documentation/platform/agent-vault/plan-your-setup.mdx b/docs/documentation/platform/agent-vault/plan-your-setup.mdxindex 48afd1d436..a2b8605790 100644--- a/docs/documentation/platform/agent-vault/plan-your-setup.mdx+++ b/docs/documentation/platform/agent-vault/plan-your-setup.mdx@@ -41,7 +41,7 @@ Configure the following options to get custom guidance and best practices tailorBefore running an agent, you set up two things:<ul>- <li>An [access bundle](/documentation/platform/agent-vault/access-bundles) in Infisical: a list of the [services](/documentation/platform/agent-vault/services) (the APIs) that the agent can call, each with its real credential</li>+ <li>An [access bundle](/documentation/platform/agent-vault/access-bundles) in Infisical: a list of the [services](/documentation/platform/agent-vault/services) (the external systems) that the agent can use, each with its real credential</li><li>A running [proxy](/documentation/platform/agent-vault/proxies): a program on its own machine that every request from the agent goes through</li></ul>@@ -161,7 +161,7 @@ Configure the following options to get custom guidance and best practices tailor</AgentVaultSetupStep><AgentVaultSetupStep step="forward">- The [real credential](/documentation/platform/agent-vault/services#credential-types) is added to the request at the proxy, so it never passes through the agent. If you've [set up session logs](/documentation/platform/agent-vault/session-logs#setting-up-session-logs), the request appears in the session's logs.+ The [real credential](/documentation/platform/agent-vault/http-apis#credential-types) is added to the request at the proxy, so it never passes through the agent. If you've [set up session logs](/documentation/platform/agent-vault/session-logs#setting-up-session-logs), the request appears in the session's logs.The proxy only attaches credentials for the services in the access bundle. Requests to any other host go out without a credential, unless the proxy's [traffic policy](/documentation/platform/agent-vault/proxies#traffic-policy) blocks them.</AgentVaultSetupStep>@@ -214,7 +214,7 @@ Follow these pages in order:</AgentVaultSetupBranch><AgentVaultSetupBranch building="scheduled,platform">- <li>[Create an access bundle](/documentation/platform/agent-vault/access-bundles#create-an-access-bundle), with a service for each API the agent calls</li>+ <li>[Create an access bundle](/documentation/platform/agent-vault/access-bundles#create-an-access-bundle), with a service for each external system the agent uses</li><li>[Enroll a proxy](/documentation/platform/agent-vault/proxies#create-and-enroll-a-proxy), and run it with Docker or systemd so that it keeps running between jobs</li></AgentVaultSetupBranch><AgentVaultSetupBranch building="scheduled" runs="none,computer,server">diff --git a/docs/documentation/platform/agent-vault/proxies.mdx b/docs/documentation/platform/agent-vault/proxies.mdxindex f57616b99a..4e73a4b12f 100644--- a/docs/documentation/platform/agent-vault/proxies.mdx+++ b/docs/documentation/platform/agent-vault/proxies.mdx@@ -143,8 +143,8 @@ no service covers host "internal.example.com": host blocked by policyThe proxy also returns a 403 for:-- A request to a port the service's [host pattern](/documentation/platform/agent-vault/services#host-patterns) doesn't name, such as `example.com:8443` for a service on `example.com`, which only covers port `443`-- A request that breaks the service's [method or path rules](/documentation/platform/agent-vault/services#methods-and-paths), under either traffic policy+- A request to a port the service's [host pattern](/documentation/platform/agent-vault/http-apis#host-patterns) doesn't name, such as `example.com:8443` for a service on `example.com`, which only covers port `443`+- A request that breaks the service's [method or path rules](/documentation/platform/agent-vault/http-apis#methods-and-paths), under either traffic policy### Exceptions@@ -155,12 +155,12 @@ To add exceptions, select the policy and enter the hosts in **Exceptions** as aException hosts behave differently from hosts that are covered by services:- **Credentials:** The proxy never attaches a credential to requests to an exception host-- **Ports:** An exception with no port matches the host on every port, while a [service's host pattern](/documentation/platform/agent-vault/services#default-port) with no port only matches port `443`+- **Ports:** An exception with no port matches the host on every port, while a [service's host pattern](/documentation/platform/agent-vault/http-apis#default-port) with no port only matches port `443`- **Interception:** The proxy still decrypts requests to an exception host, but doesn't block them- **Scope:** An exception applies to every agent that uses the proxy<Tip>-To let only one access bundle reach a host, add a [pass-through service](/documentation/platform/agent-vault/services#pass-through) to that bundle instead of adding an exception to the proxy.+To let only one access bundle reach a host, add a [pass-through service](/documentation/platform/agent-vault/http-apis#pass-through) to that bundle instead of adding an exception to the proxy.</Tip>### Poll intervaldiff --git a/docs/documentation/platform/agent-vault/services.mdx b/docs/documentation/platform/agent-vault/services.mdxindex 7bf606d3d0..b72c100139 100644--- a/docs/documentation/platform/agent-vault/services.mdx+++ b/docs/documentation/platform/agent-vault/services.mdx@@ -1,13 +1,9 @@---title: "Services"-description: "External APIs that an AI agent can securely call during a session."+description: "Anything an AI agent talks to during a session, such as an API or an MCP server."----A service represents one external API that an agent can access during a [session](/documentation/platform/agent-vault/sessions). Each service defines the external API’s [host URL](#host-patterns), its [authentication method](#credential-types), and a real credential to attach when forwarding requests from the agent.--<Tip>-A service can also limit which [HTTP methods and paths](#methods-and-paths) the agent can use, [add custom headers](#custom-headers) to each request, and [replace placeholder values](#substitutions) the agent sends with real ones.-</Tip>+A service is something your agent talks to during a [session](/documentation/platform/agent-vault/sessions), such as an API or an MCP server, that Agent Vault brokers credentials for. You store the real credential on the service, and the [proxy](/documentation/platform/agent-vault/proxies) adds it to the agent's requests to that service. The agent can authenticate to the service without ever holding the credential.You can configure services within an [access bundle](/documentation/platform/agent-vault/access-bundles). For example, you might create a **code-review** access bundle and add services for Slack, GitHub, and Anthropic:@@ -15,232 +11,15 @@ You can configure services within an [access bundle](/documentation/platform/age<img src="/images/platform/agent-vault/access-bundle-services.png" alt="The code-review access bundle's Services table listing its GitHub, Slack, and Anthropic services with their credentials and hosts" /></Frame>-## Add a service--To add a service to an access bundle:--<Steps>- <Step>- In Agent Vault, go to **Access Bundles**. Select your access bundle, then select **Add Service**.- </Step>- <Step>- On the **Choose a template** panel, pick the template for the API you want to reach, or select **Custom** to configure the host and header yourself.-- <Frame>- <img src="/images/platform/agent-vault/service-template-picker.png" alt="The Choose a template panel with Custom, OpenAI, Anthropic, Slack, GitHub, and Google Workspace" />- </Frame>- </Step>- <Step>- Follow the steps and paste your credentials in the **Credential** section.-- To use a value that several services share, type `{{` in a [field that accepts variables](/documentation/platform/agent-vault/variables#use-a-variable-in-a-service) and select a variable from the list that opens.- </Step>- <Step>- Select **Add Service**. The service appears in the bundle's list.- </Step>-</Steps>--## Credential types--When configuring a service, you have the option to set its credential type. This determines what the proxy attaches to outbound requests.--<Tip>-If you're configuring a service with a template, you can usually leave the credential type set to the default.-</Tip>--### Bearer--The proxy attaches one header in the format `<header name>: <prefix> <value>`, which defaults to `Authorization: Bearer <value>`.--Bearer is the right choice for most APIs. If the API expects a bare key instead of a `Bearer`-prefixed one, change the header name to `X-API-Key` and clear the prefix.--### Basic--The proxy attaches the header `Authorization: Basic <base64 of username:password>`. Either the username or the password can be left blank.--Basic is the right choice for APIs behind HTTP basic authentication, including ones that put the entire key in the username field.--### Pass-through--The proxy attaches no credential. Unless the service adds [custom headers](#custom-headers) or [substitutions](#substitutions), the proxy forwards the agent's request to the API unchanged.--Pass-through is the right choice when the proxy's strict [traffic policy](/documentation/platform/agent-vault/proxies#traffic-policy) would otherwise block the host. It lets the request reach the API without attaching a credential.--<Note>-For **Bearer** and **Basic** services, if the agent's request already carries a header with the same name as the one the service sends, the proxy replaces it with the service's credential.-</Note>--## Host patterns--When configuring a service, you have the option to set which host patterns it matches. A host pattern controls which outbound requests get the service's credential attached.--<Tip>-For security reasons, we recommend keeping host patterns as narrow as the API allows. If you're configuring a service with a template, you can usually leave the host set to the default.-</Tip>--### Multiple hosts--A single pattern can cover multiple hosts by listing them, separated by commas:--```text-api.github.com, uploads.github.com-```--### Default port--A host without a port specified only matches requests to the standard HTTPS port `443`:--```-api.github.com-```--This pattern matches `api.github.com:443`, but not `api.github.com:80` or `api.github.com:8080`.--### Non-standard ports--To match a port other than `443`, include it in the host:--```text-internal-api.example.com:8443-```--### Plaintext hosts--A service works the same way over plain HTTP as it does over HTTPS. The proxy attaches the credential, the custom headers, and the substitutions either way. Use a plaintext host for an API on your own network that doesn't serve HTTPS.--Leave the `http://` scheme off the host, and name the port instead:--```text-internal-api.example.com:8080-```--If you don't name the port, the host will only match [port `443`](#default-port):--<Warning>-The proxy sends the credential to a plaintext host unencrypted, so anyone who can read traffic between the proxy and the API can read the credential. Only use plaintext hosts on a network you trust.-</Warning>--### Wildcards--Wildcards match exactly one label. The pattern below matches `api.atlassian.net`, but not `a.b.atlassian.net` or `atlassian.net`.--```text-*.atlassian.net-```--## Host conflicts--Two services within an access bundle can't cover the same host with the same pattern. For example, if you have a service that defines its host as `api.github.com` and you try to create a second service with that same host, Infisical will stop you from saving the second service.--However, two services can match the same host if they define the host pattern differently. When the agent makes a request to that host, the request will match the service that defines the host more explicitly. For example:--- One service defines its host as `api.github.com`-- Another service defines it as `*.github.com`--In the above example, requests to `api.github.com` are handled by the first service.--<Warning>-The proxy applies only the more specific service's [methods and paths](#methods-and-paths). This means that if the `api.github.com` service allows only `GET`, the proxy refuses a `POST` to `api.github.com`, even if that same `POST` request would succeed through `*.github.com`.-</Warning>--<Note>-Different access bundles can cover the same host with different credentials, since an agent only gets the credential from the access bundle its session is scoped to.-</Note>--## Methods and paths--By default, a service allows every HTTP method and every path on its hosts. When configuring a service, you have the option to narrow it to only the methods and paths your agent needs.--<Frame>- <img src="/images/platform/agent-vault/service-details.png" alt="The Details step of a GitHub service, allowing GET and POST on the path prefixes /repos and /search" />-</Frame>--### Methods--On the **Details** step, clear **All Methods** and select the HTTP methods the service allows. For example, if a service allows only `GET` and `HEAD`, the proxy refuses a `POST` or `DELETE` request before the request leaves your network.--### Paths--On the **Details** step's **Paths** field, enter each path prefix the service allows. A path prefix matches whole segments, so `/repos` covers `/repos/octo/hello` but not `/repositories`. Write the path exactly as it appears in the URL.--<Note>-If a service has path prefixes, the proxy also refuses any path that different servers would resolve differently, such as one containing `..` or an encoded slash. Ordinary paths still work, including ones with a space or a non-ASCII character such as `/repos/owner/repo/contents/café.md`.-</Note>--### Refused requests--If a request breaks either rule, the proxy refuses the request with a 403. The message names the service and the method or path it doesn't allow:--```text-HTTP/1.1 403 Forbidden--service "github" does not allow POST: blocked by service policy-```--```text-HTTP/1.1 403 Forbidden--service "github" does not allow path "/admin": blocked by service policy-```--## Custom headers--Some APIs need a header alongside the credential, such as an organization ID or an API version. On the **Credential** step, under **Advanced Options**, select **Add Custom Header** and enter a name, an optional prefix, and a value. The proxy attaches it to every request to that service, whatever credential type the service uses.--<Frame>- <img src="/images/platform/agent-vault/service-advanced-options.png" alt="The Credential step with an API version custom header and a substitution that swaps the agent's placeholder for the real token, matched in the header" />-</Frame>--Infisical won't save a custom header with the same name as the credential's header, because the proxy would overwrite it with the credential. Infisical also won't save a custom header that the proxy sets itself, such as `Host`, `Content-Length`, or `Connection`.--<Tip>-A custom header's value can include a [substitution](#substitutions) placeholder. If that substitution has **Headers** selected under **Replace In**, the proxy replaces the placeholder with the real value, so several headers can reuse one secret.-</Tip>--## Substitutions--Instead of attaching headers to an agent's request, you can configure your service to use substitution instead.--With a substitution, you give the agent a placeholder instead of the real credential, such as a fake API token. The agent sends the placeholder in its requests, and the proxy replaces it with the real value before forwarding each request. For example, if you set the agent's GitHub token to `__GITHUB_PAT__`, the agent sends:--```text-Authorization: Bearer __GITHUB_PAT__-```--GitHub receives the real token, and the agent never holds it.--We recommend using substitutions when your agent's tool won't run without a token of its own, or when the API expects the credential outside a header, such as in the URL path or the query string.--<Info>-Substitutions work with every credential type, including pass-through.-</Info>--### Add a substitution--<Steps>- <Step>- On the **Credential** step, expand **Advanced Options** and select **Add Substitution**.- </Step>- <Step>- Enter the placeholder your agent sends in **Replace**, and the real value in **With**.-- <Tip>- The proxy replaces every occurrence of the placeholder, so pick one that won't appear anywhere else in the request.- </Tip>- </Step>- <Step>- Under **Replace In**, select where the proxy looks for the placeholder: **URL Path**, **Query String**, **Headers**, or **Body**.- </Step>- <Step>- In the agent's environment or configuration, set the credential to the placeholder, such as `GITHUB_TOKEN=__GITHUB_PAT__`. Infisical doesn't set the placeholder for you.-- <Tip>- Some tools check a token's format before they send it. If the agent's tool does, make the placeholder match the format of the real key, such as `ghp_` followed by 36 characters for a GitHub token.- </Tip>- </Step>-</Steps>+## Service types-### Encoding and body limits+You choose a service's type when you pick its template:-- **Slashes in the URL path:** The proxy sends a `/` in the real value as `%2F`, so a GitLab project like `group/project` stays one path segment and still passes the service's [path prefixes](#paths)-- **Large or compressed bodies:** The proxy doesn't replace placeholders in a body larger than 10 MB or compressed with `Content-Encoding` (it forwards the body unchanged and logs a warning that names the service)+<CardGroup cols={2}>+ <Card title="HTTP APIs" icon="globe" href="/documentation/platform/agent-vault/http-apis">+ Web APIs that the agent calls directly, such as GitHub, Slack, and Anthropic.+ </Card>+ <Card title="MCP servers" icon="server" href="/documentation/platform/agent-vault/mcp-servers">+ Remote MCP servers whose tools the agent calls, such as Linear and Notion.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/agent-vault/session-logs.mdx b/docs/documentation/platform/agent-vault/session-logs.mdxindex 568a47f2d5..96d7d9ebac 100644--- a/docs/documentation/platform/agent-vault/session-logs.mdx+++ b/docs/documentation/platform/agent-vault/session-logs.mdx@@ -14,7 +14,7 @@ import AgentVaultSessionLogsCorsRule from "/snippets/app-connections/aws/agent-vIf you're using Infisical Cloud, they're available under the **Enterprise Tier**. If you're self-hosting Infisical, contact [email protected] to purchase an enterprise license to use them.</Info>-A session log is a record of every request an agent makes during a [session](/documentation/platform/agent-vault/sessions): the method, host, path, status code, and whether the proxy attached a credential. The [proxy](/documentation/platform/agent-vault/proxies) adds every request it receives to the session log, including requests to hosts that no [access bundle](/documentation/platform/agent-vault/access-bundles) covers.+A session log is a record of every request an agent makes during a [session](/documentation/platform/agent-vault/sessions): the method, host, path, status code, whether the proxy attached a credential, and for an [MCP server](/documentation/platform/agent-vault/mcp-servers), the tool the agent called. The [proxy](/documentation/platform/agent-vault/proxies) adds every request it receives to the session log, including requests to hosts that no [access bundle](/documentation/platform/agent-vault/access-bundles) covers.The proxy encrypts the records before they leave your network and uploads them to an Amazon S3 bucket you own.@@ -127,7 +127,7 @@ You can view a session's logs if you created the session or you're an Agent Vaul<Tabs><Tab title="In Infisical">- Go to **Sessions** and select **View Session Logs** on the session's row. You can filter and search the requests, and while the session is active, new requests appear as the proxy uploads them.+ Go to **Sessions** and select **View Session Logs** on the session's row. You can filter the requests by type (**HTTP APIs** or **MCP Servers**) and outcome, and search them by host, path, method, tool, or service. While the session is active, new requests appear as the proxy uploads them.<Frame><img src="/images/platform/agent-vault/session-logs-view.png" alt="The Session Logs sheet for an active session, listing each request's time, method, host, path, upstream status, and outcome" />@@ -168,6 +168,22 @@ You can view a session's logs if you created the session or you're an Agent Vaul"accessBundle": "code-review"}```++ If a request matched an MCP service, its record also has `serviceType` set to `mcp`, and an `mcp` object with the [calls](#mcp-tool-calls) in the request:++ ```json+ {+ "serviceType": "mcp",+ "mcp": {+ "calls": [{ "method": "tools/call", "tool": "create_issue" }],+ "parsed": true+ }+ }+ ```++ - `serviceType`: `http` or `mcp`, or `null` if no service matched the request+ - `mcp.parsed`: `false` if the proxy couldn't read the calls from the request body+ - `mcp.truncated`: `true` if the request held more than 32 calls and the rest weren't recorded (left out otherwise)</Step></Steps>@@ -232,7 +248,20 @@ The outcome is one of four:| **Blocked** | The proxy refused the request, for one of the reasons in [Blocked requests](/documentation/platform/agent-vault/proxies#blocked-requests) || **Error** | The proxy couldn't reach the destination host |-Request and response bodies, headers, and query strings aren't recorded.+Request and response bodies, headers, and query strings aren't recorded. For a request to an MCP server, the proxy reads only the method and tool name of each call from the request body.++### MCP tool calls++If a request matched an MCP service, its row shows an **MCP** badge and the call the agent made, in place of the path:++- For a tool call, the tool's name and the method, such as `create_issue` and `tools/call`+- For any other call, the method, such as `initialize` or `tools/list`++The proxy never records a tool's arguments or results.++If the agent sent several calls in one request, the row shows the first call followed by `+N more`, and the tooltip on `+N more` lists the other calls. The proxy records up to 32 calls per request. If a request held more, the row shows `N+ more` instead.++If the proxy can't read the calls, the row shows the request path. This happens if the request body is larger than 1 MB, compressed, or not valid JSON.## Managing session logsdiff --git a/docs/documentation/platform/agent-vault/sessions-cli.mdx b/docs/documentation/platform/agent-vault/sessions-cli.mdxindex a2051b3ab0..d0857397fc 100644--- a/docs/documentation/platform/agent-vault/sessions-cli.mdx+++ b/docs/documentation/platform/agent-vault/sessions-cli.mdx@@ -36,7 +36,7 @@ The CLI creates sessions as a machine identity, so that the agent's access doesn## Step 2: Start the agent-If the agent won't start without an API key, such as `ANTHROPIC_API_KEY` for Claude Code, set the key to a placeholder, such as `agent-vault`. The proxy replaces the placeholder with the real key from the service. If the service uses a [substitution](/documentation/platform/agent-vault/services#substitutions), set the key to the service's placeholder instead.+If the agent won't start without an API key, such as `ANTHROPIC_API_KEY` for Claude Code, set the key to a placeholder, such as `agent-vault`. The proxy replaces the placeholder with the real key from the service. If the service uses a [substitution](/documentation/platform/agent-vault/http-apis#substitutions), set the key to the service's placeholder instead.On the agent's machine, set the machine identity's credentials and the proxy's address as environment variables, then start the agent with `infisical agent-vault run`:diff --git a/docs/documentation/platform/agent-vault/variables.mdx b/docs/documentation/platform/agent-vault/variables.mdxindex 565a7f6fe9..e4a551ffff 100644--- a/docs/documentation/platform/agent-vault/variables.mdx+++ b/docs/documentation/platform/agent-vault/variables.mdx@@ -56,18 +56,18 @@ An access bundle can hold up to 100 variables.## Use a variable in a service-You can use a variable in the following fields when [configuring a service](/documentation/platform/agent-vault/services#add-a-service):+You can use a variable in the following fields when [configuring a service](/documentation/platform/agent-vault/services):-- **Token** in a [Bearer](/documentation/platform/agent-vault/services#bearer) credential-- **Username** and **Password** in a [Basic](/documentation/platform/agent-vault/services#basic) credential-- **Value** in a [custom header](/documentation/platform/agent-vault/services#custom-headers)-- **With** in a [substitution](/documentation/platform/agent-vault/services#substitutions)+- **Token** in a [Bearer](/documentation/platform/agent-vault/http-apis#bearer) credential, or in an MCP server's [Bearer token](/documentation/platform/agent-vault/mcp-servers#bearer-token)+- **Username** and **Password** in a [Basic](/documentation/platform/agent-vault/http-apis#basic) credential+- **Value** in a custom header, for an [HTTP API](/documentation/platform/agent-vault/http-apis#custom-headers) or an [MCP server](/documentation/platform/agent-vault/mcp-servers#custom-headers)+- **With** in a [substitution](/documentation/platform/agent-vault/http-apis#substitutions)To use a variable:<Steps><Step>- [Add a service](/documentation/platform/agent-vault/services#add-a-service), or open an existing service's actions menu and select **Edit**. Then go to the **Credential** step.+ [Add a service](/documentation/platform/agent-vault/services), or open an existing service's actions menu and select **Edit**. Then go to the **Credential** step.</Step><Step>In a field that accepts variables, type `{{`. A list of the bundle's variables appears.diff --git a/docs/snippets/agent-vault/QuickstartBody.mdx b/docs/snippets/agent-vault/QuickstartBody.mdxindex e533a6575d..370731330f 100644--- a/docs/snippets/agent-vault/QuickstartBody.mdx+++ b/docs/snippets/agent-vault/QuickstartBody.mdx@@ -63,7 +63,7 @@ First, create an [access bundle](/documentation/platform/agent-vault/access-bund</Steps><Tip>- You can repeat these steps to add as many more services as you like to the access bundle.+ You can repeat these steps to add as many more services as you like to the access bundle. To give the agent a remote MCP server, such as Linear's or Notion's, [add an MCP server](/documentation/platform/agent-vault/mcp-servers#add-an-mcp-server).</Tip>### Enroll a proxy@@ -169,7 +169,7 @@ The CLI adds the proxy's certificate authority to the agent process' trusted CAs- The session was revoked or has expired (check the **Sessions** page in Infisical, and create a new one if needed)- Under the proxy's [strict traffic policy](/documentation/platform/agent-vault/proxies#traffic-policy), no service in the bundle covers the host you called (add a service that does, or use a pass-through service)- - The service covers the host, but doesn't allow the request's method or path (check the service's [methods and paths](/documentation/platform/agent-vault/services#methods-and-paths))+ - The service covers the host, but doesn't allow the request's method or path (check the service's [methods and paths](/documentation/platform/agent-vault/http-apis#methods-and-paths))</Accordion></AccordionGroup>diff --git a/docs/snippets/agent-vault/slots/AgentLaunchCommand.mdx b/docs/snippets/agent-vault/slots/AgentLaunchCommand.mdxindex ef2dfdac4a..e75d9d6b9e 100644--- a/docs/snippets/agent-vault/slots/AgentLaunchCommand.mdx+++ b/docs/snippets/agent-vault/slots/AgentLaunchCommand.mdx@@ -30,7 +30,7 @@ import { AgentVaultBranch } from "/snippets/AgentVaultQuickstartConfigurator.jsx</AgentVaultBranch><AgentVaultBranch agent="hermes">- Hermes reads its API keys from `~/.hermes/.env`, and it won't start without them. If the service you added holds one of those keys, such as your model provider's key, replace the key's value in that file with a placeholder, such as `agent-vault-openai`. The proxy attaches the real key, so Hermes only needs a value it accepts. If the service uses a [substitution](/documentation/platform/agent-vault/services#substitutions), use the exact value you entered in **Replace** instead.+ Hermes reads its API keys from `~/.hermes/.env`, and it won't start without them. If the service you added holds one of those keys, such as your model provider's key, replace the key's value in that file with a placeholder, such as `agent-vault-openai`. The proxy attaches the real key, so Hermes only needs a value it accepts. If the service uses a [substitution](/documentation/platform/agent-vault/http-apis#substitutions), use the exact value you entered in **Replace** instead.<Warning>Hermes treats some values as an unset key, including `dummy`, `placeholder`, `changeme`, `none`, and values made only of `x` characters, such as `sk-xxxx`. If you use one of these values, Hermes reports the key as missing instead of sending it to the proxy.@@ -54,7 +54,7 @@ import { AgentVaultBranch } from "/snippets/AgentVaultQuickstartConfigurator.jsx<AgentVaultBranch agent="openclaw">If the service you added holds your model provider's key, OpenClaw needs a placeholder in its place. Onboarding saves the key in OpenClaw's credential store. Run `openclaw models auth list` to find the saved profile, then remove it with `openclaw models auth logout <profile-id>`.- Then create `~/.openclaw/.env`, or add to it if it already exists, with a placeholder for the key, such as `OPENAI_API_KEY=agent-vault-openai`. The proxy attaches the real key, so OpenClaw only needs a value to send. If the service uses a [substitution](/documentation/platform/agent-vault/services#substitutions), use the exact value you entered in **Replace** instead.+ Then create `~/.openclaw/.env`, or add to it if it already exists, with a placeholder for the key, such as `OPENAI_API_KEY=agent-vault-openai`. The proxy attaches the real key, so OpenClaw only needs a value to send. If the service uses a [substitution](/documentation/platform/agent-vault/http-apis#substitutions), use the exact value you entered in **Replace** instead.Then start OpenClaw's terminal UI in local mode, so it runs without a separate Gateway. For OpenClaw, the command is `openclaw tui --local`:diff --git a/docs/snippets/agent-vault/slots/ServiceTemplatePickNote.mdx b/docs/snippets/agent-vault/slots/ServiceTemplatePickNote.mdxindex f7b4284ad4..0f07cff47c 100644--- a/docs/snippets/agent-vault/slots/ServiceTemplatePickNote.mdx+++ b/docs/snippets/agent-vault/slots/ServiceTemplatePickNote.mdx@@ -2,6 +2,6 @@ import { AgentVaultBranch } from "/snippets/AgentVaultQuickstartConfigurator.jsx<AgentVaultBranch service="none"><Note>- If the API you want to access isn't on the template list, pick **Custom** and set the host, header name, and prefix yourself. For more information, check out the [services](/documentation/platform/agent-vault/services) documentation.+ If the API you want to access isn't on the template list, pick **Custom** and set the host, header name, and prefix yourself. For more information, check out the [HTTP APIs](/documentation/platform/agent-vault/http-apis) documentation.</Note></AgentVaultBranch>