examples/mcp-agent: an agent that pays per MCP tool call, guarded
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- blockchain
Direzione di ricerca
Start from test/official-mcp.test.ts, which already runs agentSafeGuard with the @x402/mcp client over the in-memory transport, and reuse its chain-free local facilitator. Read the @x402/mcp section of sdk/README.md and the layout of examples/agent-workflow. Done when npm start prints the allowed call, the hijacked 402 (payee_mismatch) and the exhausted plan, npm test asserts all three, and the example is wired into the newcomer CI job.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
test/official-mcp.test.ts (added in 8af8daa) shows agentSafeGuard working with the @x402/mcp client over the in-memory transport: a tool call to the pinned payee is paid, a swapped payee is refused (payee_mismatch), and the sealed plan is enforced.
What: turn that into a runnable example in examples/mcp-agent/: a small MCP client that pays for a tool call through Agent Safe, against a local paid MCP server (reuse the chain-free local facilitator from the test). Show the owner config (registry, plan, origin = the MCP server URL) and the output for an allowed call, a hijacked 402 and an exhausted plan.
Done when: npm i && npm start prints the three outcomes, npm test asserts them, and it is added to the newcomer CI job. Installed from the published packages like the other examples.
See sdk/README.md (the @x402/mcp section) and examples/agent-workflow for the shape.
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 0
- Merge medio
- 3h 51m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DeepFirstHQ/deepfirstsearch
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
guard: a documented way to pin the payee for clients that expose only a custom fetch or walletApertaenhancement help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
-
help wanted integration
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
-
enhancement good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
-
help wanted integration
Difficoltà 3/5 Mezza giornata Idoneità per principianti 25/100
Tutte le issue di DeepFirstHQ/deepfirstsearch
Issue simili
-
The inspector never shows the instances field, so scaling out is unreachableForse già presa @Mrkewl l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
xevrion/breakscale#96 ·
I maintainer di solito rispondono entro 4 giorni
-
Object parameters lose their structure when resources is enabledForse già presa @asts-top l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
rossant/awesome-math#199 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
jaegertracing/jaeger-ui#4618 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
mifi/lossless-cut#3125 ·
I maintainer di solito rispondono entro 1 giorno