FIELD GUIDE / MCP

MCP without
blind trust.

Configure stdio or Streamable HTTP servers from user/project config, portable imports, or local Agent Plugins. Named credentials and authorization-code + PKCE OAuth (with refresh) ship for Streamable HTTP. Trust is per session; every model-requested tool call still pauses for inspection and one-time approval.

Configured MCP · OAuth refresh · three-OS stdio sandbox

Add servers with veasel mcp add [user|project] or POST /v1/mcp-servers. Capabilities: mcp.servers.configured, mcp.credentials, mcp.oauth. Portable .mcp.json / .cursor/mcp.json import read-only. OAuth prints an authorize URL — Veasel does not auto-launch a browser. Trusted stdio defaults to require ( VEASEL_MCP_STDIO_SANDBOX): Linux Bubblewrap, macOS Seatbelt, or Windows AppContainer wrap MCP child processes — or they refuse to start.

Scopes and precedence

  • user — writable $VEASEL_DATA_DIR/mcp-servers.json (default for veasel mcp add).
  • project — writable <workspace>/.veasel/mcp-servers.json.
  • project-import — read-only portable mcpServers from workspace .mcp.json then .cursor/mcp.json. .vscode/mcp.json (servers key) is not imported.
  • Same name for configured/<name>: project > project-import > user.

Configure servers from the CLI

Run these commands in a terminal connected to the local Veasel API:

# User scope (default)
veasel mcp add stdio memory npx -y @modelcontextprotocol/server-memory
veasel mcp add http docs https://mcp.example.com/mcp

# Project scope (session workspace)
veasel mcp add project stdio repo-tools ./bin/mcp-server
veasel mcp add project http docs https://mcp.example.com/mcp

# Optional named HTTP credential (header names only in list views)
veasel mcp credentials list
veasel mcp credentials set gh-pat --header Authorization=Bearer …

veasel mcp list
veasel mcp enable memory
veasel mcp disable project repo-tools
veasel mcp remove user memory
veasel mcp remove project repo-tools
  • stdio — bare PATH command or absolute regular file; optional absolute cwd via the API. Veasel does not download packages or run install scripts for you.
  • http — Streamable HTTP URL with the same origin and header rules as plugin MCP (HTTPS or loopback; redirects refused). May reference a named credential; literal server headers win on conflicts.
  • Names identify the server under the synthetic catalog package configured. List views omit header/env secret values.
  • Disabled servers leave durable config in place but drop out of the plugin catalog until re-enabled. Imported portable entries are read-only — edit the source file or add a writable project/user override.
  • Headless: veasel mcp list|add|…, veasel mcp credentials …, veasel mcp oauth … (same loopback API).

Add a server in the Solid TUI

Enter /mcp add to choose user or project scope, then stdio or Streamable HTTP. Project options appear only inside a session with an active workspace.

  • For stdio, enter the server name, executable, and optional arguments. For Streamable HTTP, enter the name and endpoint. Remote endpoints need HTTPS; HTTP is limited to loopback.
  • Adding a server only saves its configuration. No server starts or connects until you trust it in the session with /mcp trust configured/<name>. Review every tool call before approval.
  • If the name already exists in that scope, Veasel asks before replacing its saved configuration.

Named credentials and OAuth (PKCE)

Streamable HTTP servers can attach a named credential from $VEASEL_DATA_DIR/mcp-credentials.json (mcp.credentials). Authorization-code + PKCE S256 stores the verifier in owner-only $VEASEL_DATA_DIR/mcp-oauth-pending.json and upserts Authorization: Bearer into that credential on complete. Secret values are never returned by the API or printed by the CLI.

# Headless — print authorize URL, then complete manually
veasel mcp oauth authorize my-cred \
  --authorization-endpoint https://auth.example/authorize \
  --token-endpoint https://auth.example/token \
  --client-id veasel-local \
  --redirect-uri http://127.0.0.1:PORT/callback
# Open the printed URL yourself (no automatic browser launch)
veasel mcp oauth complete my-cred --state … --code …
# or: --callback-url 'http://127.0.0.1:PORT/callback?code=…&state=…'

# Headless — single-shot 127.0.0.1 loopback listener (still prints the URL)
veasel mcp oauth authorize my-cred \
  --authorization-endpoint https://auth.example/authorize \
  --token-endpoint https://auth.example/token \
  --client-id veasel-local \
  --listen
# Wait for the browser redirect to /callback, then the CLI completes for you

# Attach credential when adding HTTP MCP
veasel mcp add http docs https://mcp.example.com/mcp --credential my-cred
  • API: POST /v1/mcp-oauth/authorize and POST /v1/mcp-oauth/complete (mcp.oauth). redirect_uri must be loopback HTTP.
  • --listen binds a one-shot 127.0.0.1 listener on path /callback, prints authorize_url to stderr, waits for the browser callback, then calls complete. It does not open a browser for you.
  • Without --listen, copy the printed URL, finish login in a browser, then run oauth complete with code+state or callback_url.
  • On HTTP 401, Veasel parses Bearer challenges and may fetch protected resource / authorization-server metadata to help you fill authorize and token endpoints — it still does not start a dance until you call authorize.
  • Refresh. When a refresh token is stored (owner-only mcp-oauth-refresh.json), veasel mcp oauth refresh <cred> or POST /v1/mcp-oauth/refresh exchanges it. On HTTP 401, Veasel may auto-refresh once per call path, then clear or fail closed — it does not invent silent multi-retry loops. Dynamic Client Registration (DCR) is deferred; use an explicit client_id.

Transport notifications (honest scope)

These are MCP protocol behaviors, not a product notification center:

  • On turn cancel, stdio and Streamable HTTP emit best-effort notifications/cancelled for the in-flight request id.
  • Trusted Streamable HTTP may open a GET SSE notification stream after initialize (listen_notifications); 405/404 means unsupported. Messages go to an internal queue, not the chat UI.

Portable import

Drop a portable mcpServers file at the workspace root. Veasel lists it under scope project-import when the session has a directory (or when the API passes directory):

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Prefer .mcp.json (Claude Code / Copilot portable) or .cursor/mcp.json. Imports never overwrite writable user or project files.

Trust, then approve each call

Adding or importing a server does not grant the model access. Trust it for the current session, then review every tool call:

/mcp trust configured/memory
/mcp untrust configured/memory

Ctrl+R   # review MCP calls; select one to inspect, approve, or reject
  • Plugin-packaged servers still use /mcp trust <plugin>/<server>.
  • The TUI review screen states that the call has not reached its server yet. Rejected or interrupted calls are not replayed.
  • Trusted stdio defaults to VEASEL_MCP_STDIO_SANDBOX=require: Linux Bubblewrap, macOS Seatbelt (/usr/bin/sandbox-exec), or Windows AppContainer + Job is required, and a missing backend refuses to start. Explicit auto permits unsandboxed fallback and off disables wrapping (capabilities mcp.stdio.sandbox.bubblewrap, mcp.stdio.sandbox.seatbelt, mcp.stdio.sandbox.windows only when wrap will run; network shared). Inspect effects before approval.

HTTP API

Operator config is separate from per-session trust and per-call approval:

MethodPathPurpose
GET · POST/v1/mcp-serversList (optional ?directory= for project + imports) or upsert (scope / directory for project).
PATCH · DELETE/v1/mcp-servers/{name}Enable/disable or remove; query scope=user|project and directory for project.
GET · POST/v1/mcp-credentialsList or upsert named HTTP header credentials (mcp.credentials; values never returned).
DELETE/v1/mcp-credentials/{name}Remove a named credential.
POST/v1/mcp-oauth/authorizeStart PKCE S256 authorize (mcp.oauth; returns URL + state).
POST/v1/mcp-oauth/completeExchange code/state or callback_url; upsert Bearer into the named credential.
POST/v1/mcp-oauth/refreshExchange a stored refresh token; update Bearer (values never returned).
GET · POST/v1/sessions/{id}/mcp-serversPer-session trust (plugin_name=configured).
GET · POST/v1/sessions/{id}/mcp-tool-calls…Inspect, approve, or reject one pending tool call.
curl -sS 'http://127.0.0.1:4097/v1/mcp-servers?directory=/path/to/workspace'
curl -sS -X POST http://127.0.0.1:4097/v1/mcp-servers \
  -H 'content-type: application/json' \
  -d '{"name":"memory","transport":"stdio","command":"npx","args":["-y","@modelcontextprotocol/server-memory"],"scope":"project","directory":"/path/to/workspace"}'
curl -sS -X PATCH 'http://127.0.0.1:4097/v1/mcp-servers/memory?scope=project&directory=/path/to/workspace' \
  -H 'content-type: application/json' \
  -d '{"enabled":false}'

Full request and response shapes live in the runtime OpenAPI contract.

Plugin-packaged MCP

Agent Plugin packages under $VEASEL_PLUGIN_DIR or $VEASEL_DATA_DIR/plugins may declare stdio or Streamable HTTP servers in mcp.json. Those appear in the plugin catalog (GET /v1/plugins), not under /v1/mcp-servers. Local directory links can be managed with /plugin add|remove and /v1/plugins/links — Veasel does not fetch remote packages. See the plugins ledger for conformance status.

Still open

  • Automatic browser launch for OAuth (today: print URL + optional loopback --listen).
  • Import of .vscode/mcp.json (servers layout).
  • Remote Agent Plugins marketplace (local host is READY; fail-closed stdio sandboxing ships on Linux/macOS/Windows withrequire as the default).
  • Product UI for inbound MCP notification streams (transport listen is internal).

Security boundary API & headless Plugins ledger