Skip to content

feat: vouch serve --transport http + Bearer-token auth [VEP] #176

Description

@plind-junior

Labels: enhancement, VEP

What you're trying to do

vouch serve today is stdio + JSONL only, so vouch can't run as a network MCP server. As a result, five Claude surfaces are blocked: Claude.ai web Custom Connectors, Claude mobile (write), Claude Managed Agents, the Messages-API mcp_servers field, and Anthropic Computer Use. They each require a publicly reachable HTTPS MCP endpoint, and vouch has nothing to point at.

This is the single highest-leverage change. ROADMAP 0.1 already scopes it.

Suggested shape

vouch serve --transport http \
            --bind 127.0.0.1:7777 \
            --auth bearer
  • New module src/vouch/http_server.py wraps the same kb.* handlers as jsonl_server.py but speaks MCP-over-Streamable-HTTP (per the official MCP spec).
  • Auth: read bearer_tokens: [...] (or bearer_token: env:VOUCH_TOKEN) from config.yaml under a new serve section; reject unauthenticated requests with HTTP 401.
  • Defaults: bind 127.0.0.1, refuse to start unbound (0.0.0.0) without an explicit auth config.
  • Ship a reference deployment under adapters/http-tunnel/: Dockerfile + fly.toml + a Cloudflare Tunnel compose.yml.

Acceptance

  • vouch serve --transport http exposes the full kb.* method surface as a Custom Connector that Claude.ai can register.
  • Without a Bearer token, requests return 401; with a valid token, behavior matches stdio/JSONL.
  • A test pack from vouchdev/setup-vouch (or curl) hits /health and /messages end-to-end.
  • Default bind is localhost; --bind 0.0.0.0 errors out unless --auth bearer is set.

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions