MCP

Introduction to the Secryn MCP server and its authentication model.

MCP Introduction

Secryn provides an MCP (Model Context Protocol) server so agents and MCP clients can retrieve secrets, keys, and certificates.

The MCP server calls your Secryn API. It is not a separate credential system.

All requests follow JSON-RPC format and use the tools/call method to execute operations.

MCP requires:

  • The instance's shared Mcp-Session-Id header. There is one session id for the instance, shown in MCP settings.
  • The vault access key inside the tool-call arguments (vault.accessKey or credentials.accessKey). The client, and any model that sees the tool call, can see that key.

Authentication Model

Each MCP request requires:

1. Session Header

One session id is configured for the whole instance. Every client sends that same value:

Mcp-Session-Id: YOUR_INSTANCE_SESSION_ID

2. Vault Credentials (Inside Request Body)

Vault credentials are passed inside the request under:

  • vault
  • credentials

The MCP server will use the provided credentials to call your Secryn API.

baseUrl must include the /api suffix.

Example:

{
  "vault": {
    "id": "Test Vault",
    "vaultId": "Test Vault",
    "accessKey": "VAULT_ACCESS_KEY",
    "baseUrl": "https://demo.secryn.io/api"
  }
}

Important Notes

  • method must be tools/call (slash format).
  • baseUrl must include /api.
  • Vault credentials are required for non-public resources.
  • Public keys/certificates require code when preferPublic=true.
  • Secrets are never public.
  • MCP activity is written to MCP logs. Those logs are database rows and are not tamper-evident. They do not include secret values or private keys.
  • The access key in the tool call is the same vault access key used by the REST API: one key per vault, read-only, not role-based.