stil
DocsStil MCP Installation

Stil MCP Installation

Connect Stil MCP to Codex, Cursor, and Claude Code using the hosted endpoint or local stdio server

Recommended setup: hosted MCP

For Codex and other remote-first clients, use the hosted Stil MCP endpoint with a project-scoped API key. OAuth is intentionally disabled in v1.0 while the browser authorization flow is hardened.

[mcp_servers.stil]
url = "https://upcduaibsatudbsxcjxb.supabase.co/functions/v1/mcp-server"
bearer_token_env_var = "STIL_MCP_API_KEY"

Codex

Export your project API key as STIL_MCP_API_KEY, add Stil to your shared Codex config in ~/.codex/config.toml, then start a new session. Once connected, Codex can call get_ds_context, Gate checks, and Figma planning tools from the same thread.

model = "gpt-5.4"
model_reasoning_effort = "high"

[mcp_servers.stil]
url = "https://upcduaibsatudbsxcjxb.supabase.co/functions/v1/mcp-server"
bearer_token_env_var = "STIL_MCP_API_KEY"

Cursor and Claude Code

For local repo-aware workflows, run the stdio server via npx. Point STIL_WORKSPACE_DIR at the directory that contains your exported .stil workspace data, and keep Gate mode on warn until your team is ready for strict blocking.

{
  "mcpServers": {
    "stil": {
      "command": "npx",
      "args": ["@stilhq/mcp"],
      "env": {
        "STIL_WORKSPACE_DIR": "${workspaceFolder}",
        "STIL_GATE_MODE": "warn"
      }
    }
  }
}

Verify the installation

After restarting your client, call get_ds_context or check_change_safety once. If the hosted endpoint returns Authorization required, verify that the project API key is configured as the bearer token. If the local server warns that .stil is missing, point STIL_WORKSPACE_DIR at a workspace that contains .stil/changesets and .stil/reports.

Tool to try first: get_ds_context

Expected result:
- tokens, components, rules, and meta in structured JSON
- no "Authorization required" error when the API key is present
- no ".stil/ directory not found" warning when using local stdio