feat(talent): blockrun_talent — discover + hire BlockRun marketplace skills#18
Open
Zambala108 wants to merge 1 commit into
Open
feat(talent): blockrun_talent — discover + hire BlockRun marketplace skills#18Zambala108 wants to merge 1 commit into
Zambala108 wants to merge 1 commit into
Conversation
…v0.22.0
New MCP tool exposing the BlockRun agent marketplace (business.blockrun.ai) to
any MCP host. action:"list" (default) browses/searches the catalog for free,
ranked by call volume; action:"run" hires a skill by slug, signing ONE standard
single-leg `exact` USDC x402 payment from the wallet on Base and returning its
output — budget-gated against the quoted price, charged only on a successful
run (the marketplace settles only on success, so a failed run is free).
Mirrors the manual-402 pattern in speech.ts/music.ts (same @blockrun/llm
signer, checkBudget/recordSpending, getChain Base guard), with the two
marketplace deltas: the 402 challenge arrives in the JSON body (not a
PAYMENT-REQUIRED header) and the signed payment goes in the `x-payment` header
(not PAYMENT-SIGNATURE). ASCII-safe payment description (createPaymentPayload
base64s with btoa). scripts/smoke-talent.ts added.
Live-tested end-to-end against real Coinbase CDP /verify on Base mainnet:
402 -> @blockrun/llm-signed x-payment -> {"valid":true}, exact-price gate
10000 == 10000, result returned, $0.01 recorded. tools/list handshake shows
blockrun_talent among 19 tools.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new MCP tool,
blockrun_talent, that exposes the BlockRun agent marketplace (business.blockrun.ai) — paid AI skills published by other creators — to any MCP host (Claude Desktop, Claude Code, Cursor, Cline, …).list(default)queryfilters name, description, data source; ranked by call volume)runslugwithinputWhy
The marketplace speaks standard single-leg
exactx402, so the MCP server pays it with the same wallet +@blockrun/llmsigner the other tools already use. One tool turns every MCP host into a buyer of marketplace talent — the agent can hire a specialized skill (live data, a domain analysis, a niche transform) for a sub-task, or when the user asks it to "find an agent for X".How it follows the existing patterns
Mirrors
speech.ts/music.ts(manual-402, Base only):registerTalentTool(server, budget)→server.registerTool("blockrun_talent", { zod inputSchema }, handler)getChain()Base guard,getOrCreateWalletKey()+privateKeyToAccountcheckBudget()before paying (against the real quoted price from the 402),recordSpending()afterformatError,{ content:[{type:"text"}], structuredContent }responses, localfetchWithTimeoutTwo deltas because the marketplace is standard x402 (not the gateway): the 402 challenge comes back in the JSON body (parsed straight into
extractPaymentDetails, no PAYMENT-REQUIRED header) and the signed payment goes in thex-paymentheader (not PAYMENT-SIGNATURE). The payment description is ASCII-stripped becausecreatePaymentPayloadbase64s the payload withbtoa.Spend safety
No interactive prompt is needed: hiring is gated by (a) the budget cap (
checkBudget/recordSpending, per-agent viaagent_id) and (b) the MCP host's own tool-approval UI.listis free and never touches the budget. A failed run is free (the route settles only on success).Tested
npm run typecheck✓ ·npm run build✓tools/listhandshake returns 19 tools includingblockrun_talentscripts/smoke-talent.ts(added): list (free), list+query, missing-slug error, paid run/verifyon Base mainnet (buyer0x1f44…):@blockrun/llm-signedx-paymentand it clears the route's exact-price gate. (On-chain settle + creator payout are proven on mainnet in the business repo: settle0x1cea9d…, payout0xc0d971….)Companion to the Franklin CLI's
/market+agent_talent(BlockRunAI/Franklin#83) — same marketplace, same payment path.🤖 Generated with Claude Code