#Local adapter (stdio)
The quickest path is Connect your AI in Yasad, which installs Claude Code, Cursor or VS Code with one approval. For other clients, make an assistant key with the Yasad CLI. It keeps the key in a private file outside your projects and prints a fingerprint for the owner to approve:
Terminalnpx -y @yasad/cli@0.1.1 key https://your-workspace-api "$HOME/.yasad/assistant.env"
Then register it with your client. The CLI pins the version it registers:
Terminalnpx -y @yasad/cli@0.1.1 mcp add claude --env "$HOME/.yasad/assistant.env"# or for Codex:npx -y @yasad/cli@0.1.1 mcp add codex --env "$HOME/.yasad/assistant.env"
Other stdio clients such as Cursor (mcp add json prints this; mcp add vscode prints VS Code's .vscode/mcp.json format):
JSON{"mcpServers":{"yasad":{"command":"npx","args":["-y","@yasad/cli@0.1.1","mcp","--env","/absolute/private/assistant.env"]}}}
Restart the client, list tools, call getCapabilities, then read the yasad://workspace/context resource (and yasad://workspace/collections when listed).
#Writes are opt-in
Write tools need both a role that allows them and YASAD_MCP_ALLOW_WRITES=1 in the private env file. Reconnect after changing it. The key is rechecked on every call. Read-only mode is a safety switch, not a permission: the key's role is what Yasad enforces.
#Remote (Streamable HTTP)
Server-side clients can POST JSON-RPC to https://your-workspace-api/mcp with the same bearer key. Discovery is read-only by default; send X-Yasad-Allow-Writes: 1 to enable writes for an appropriately scoped key. Browser-origin requests are rejected.