Skip to content

docs(mcp): add setup and authenticated-fetch usage guidance #596

Description

@mherod

Problem

Users need a tested setup path and an accurate description of what the MCP server exposes. The draft adds command help, but README/VitePress currently contain no MCP guide or authenticated-fetch examples.

Location: README.md:138, docs/guide/cli-usage.md:6, docs/guide/security.md:1, docs/.vitepress/config.mjs:34, src/cli/cli.ts:249, src/mcp/server.ts:48.
Type: documentation / feature delivery.
Priority: Medium. Estimate: S (1–2 hours; no matching size/s label exists).
Owner: @mherod. Readiness: blocked for final validation. Depends on #593, #594 and #595; drafting may start earlier, but examples must be verified against the finished command. No blocked label exists in the repository.

Found in: 2026-09-07 MCP implementation draft on top of bb7bd67841a0d72f750c0468fd08ca479e39e629.

Latest handoff snapshot: the implementation is preserved in local commit 96b5531 on codex/add-mcp-server, and the working tree is clean. These file/line references describe that implementation; they are not files guaranteed at the earlier base commit. Continue from this branch/commit through a PR to main, because direct pushes to main are prohibited. Type-check passes; MCP build, test, runtime and live authenticated-request verification remain outstanding in this planning handoff. A local commit does not establish remote delivery or CI success.

Proposed documentation

Add a VitePress MCP guide, link it from README/navigation, and update CLI/security pages. Cover the three tools and a client configuration using:

{
  "mcpServers": {
    "get-cookie": {
      "command": "get-cookie",
      "args": ["mcp", "--allow-origin", "https://app.example.com"]
    }
  }
}

This is a proposed example until tested against the built implementation. Provide an explicit local-build command/path variant for development; do not imply that the existing published npm version already contains MCP.

Research Findings

Official MCP documentation explains command/argument configuration for local servers and using Inspector to exercise them. Use documentation appropriate to the selected SDK/client generation.

Recommended Approach

  1. Document startup-origin configuration, profile discovery and a metadata-only cookie query followed by an authenticated GET example.
  2. Explain both gates for returning raw cookie values and the separate startup switch for methods beyond GET/HEAD. State that GET itself can still have server-side effects.
  3. Describe manual redirects, header/body limits, deadlines, response encoding/truncation, no Set-Cookie persistence and how HTTP failures differ from tool failures.
  4. Explain data handling: raw cookies are credentials, response bodies can contain private account data, and remote response text is untrusted. MCP output may reach client transcripts/model context.
  5. Preserve actual browser limitations and provide actionable troubleshooting for origin denial, missing profiles, locked/unreadable stores and unsupported encryption. Keep setup advice consistent with the selected client and OS.

Acceptance Criteria

  • README, CLI guide and VitePress navigation link to the MCP guide.
  • Client setup and all three tool examples are executed against the built CLI with synthetic fixtures or recorded manual evidence.
  • Documentation accurately covers origin/method/value gates, profile/container semantics, limits, redirects, response encoding and errors.
  • The guide clearly distinguishes the current local build from any published version; no release is claimed before it exists.
  • Safari named profiles, partitioned-cookie exclusions, Windows encryption limitations and non-browser-fetch semantics are stated without claiming browser-equivalent session behaviour.
  • Cookie values are absent from examples/logs; private-response and client-transcript implications are explained.
  • pnpm run check-links and pnpm run docs pass; no new formatting errors.

Duplicate Check and Existing Constraints

No existing MCP documentation issue was found. Read full bodies and comments of #560 (open, 1 comment; latest 2026-06-27), #557 (open, 0), and #572 (open, 0). Their existing scope already captures Safari named-profile storage research, ABE limitations and Windows DPAPI diagnostics respectively; this documentation issue references those limitations rather than duplicating their implementation work. No freshness comments were added.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationpriority-mediumMedium priority

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions