MCP server mode: client compatibility tests and setup recipes

Aperta
#201 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Read docs/guide/mcp-server.md and apps/cli/src/mcp_serve/tests.rs to understand the current guide and test harness; inspect apps/cli/src/mcp_serve.rs and crates/daemon-api/src/mcp_server.rs for the server and HTTP facade. Start by running the existing CLI tests, then map the proposal into conformance tests and client recipes. Done means the requested compatibility coverage passes in Linux and Windows CI, and the guide and index include client setup and troubleshooting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: apps area: daemon enhancement help wanted

size: M · first-timer: no

Summary

Harden bot mcp serve (Praxi as an MCP server for other agents) with an end-to-end compatibility test suite driven by a real MCP client, and publish tested setup recipes for the common MCP clients.

Why it matters

bot mcp serve lets Claude Code, Cursor, an IDE or any MCP client hand tasks to a Praxi bot and, optionally, use its browser and desktop tools. That is a strong integration, but today the only documented client is a single claude mcp add line, and the protocol surface (tool schemas, cancellation, size limits, error results) is only partly covered by tests. People will try other clients and hit differences we have not seen.

Current state

  • docs/guide/mcp-server.md documents the credential flow (bot token create --scope mcp:tasks), the task tools (bot_list, task_start, task_status, task_result, task_cancel, schedule_list), the optional computer layer, approvals, limits and revocation.
  • apps/cli/src/mcp_serve.rs (layers Layer::Tasks and Layer::Computer, stdio transport only) and apps/cli/src/mcp_serve/tests.rs. rmcp is already a dependency, with its client feature in the dev dependencies of apps/cli.
  • The HTTP facade it talks to is GET /v1/mcp-server/tools and POST /v1/mcp-server/call in crates/daemon-api/src/mcp_server.rs.
  • There is no inbound MCP HTTP listener, by design.

Proposal and suggested approach

  1. Conformance tests. A test that starts the real bot mcp serve process against the in-process daemon with the fake provider and drives it with the rmcp client: initialize, capability negotiation, tools/list (assert every schema is valid JSON Schema and descriptions are present), the full task life cycle, cancellation mid-run, a credential that is expired or revoked, over-limit inputs, a rate-limited call, and malformed frames. Keep it hermetic (no network, no keys).
  2. Tool metadata. Review the exported tools for sensible annotations (read-only vs. changes state) and stable, documented names; list them in the docs table.
  3. Client recipes. A "Connect your MCP client" section with configuration for at least Claude Code, Claude Desktop, Cursor and VS Code, plus a generic stdio example. Mark each recipe as verified (with the client version you used) or unverified; do not guess.
  4. Troubleshooting. The three or four failures people will hit (keychain not reachable from the client's launch environment, wrong data dir, expired token, client timeouts during approval) with the exact message and fix.

Acceptance criteria

  • The new tests run in cargo test -p cli on Linux and Windows CI without extra setup and fail loudly if a tool schema or the life-cycle semantics change.
  • Docs: recipe section and troubleshooting added to docs/guide/mcp-server.md and linked from docs/guide/index.md.
  • No change to the authority model described in the guide (approvals, scopes, limits).

Out of scope

An HTTP/SSE transport for the server, new tool layers, changing approval semantics, anything that lets an MCP client approve an action.

How to get started

Read docs/guide/mcp-server.md, then apps/cli/src/mcp_serve/tests.rs for the existing harness. Comment here to claim it; PRs that only add one verified client recipe are also welcome.

Lingua principale
Rust
Stelle
0
Fork
1
Merge medio
6h 54m
PR unite (30g)
152

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di emreocell/Praxi-Bot

Tutte le issue di emreocell/Praxi-Bot

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.