Skip to content

feat(web-search-mcp): fully-mock buyer-side demo MCP (Fleet cookbook)#59

Draft
r-marques wants to merge 3 commits into
mainfrom
feat/web-search-demo-mcp
Draft

feat(web-search-mcp): fully-mock buyer-side demo MCP (Fleet cookbook)#59
r-marques wants to merge 3 commits into
mainfrom
feat/web-search-demo-mcp

Conversation

@r-marques

@r-marques r-marques commented Jul 15, 2026

Copy link
Copy Markdown
Member

What

A fully-mock MCP server (mcp-examples/web-search-mcp) for the "Agents That Pay" cookbook. It stands in for external sellers so a LangChain Fleet agent can be shown buying Exa / Baselayer access mid-task and the moment captured for screenshots. No payments, no auth, no credentials — it boots with zero env.

The cookbook beat is the agent buying from Exa/Baselayer (they are the sellers who verify + settle). This server is not a paywall; it only mocks the sellers' responses.

Tools (raw @modelcontextprotocol/sdk)

  • web_search({ query }) → mock Exa-style results + footer ✓ Exa API access purchased · $7 charged to your card via Nevermined delegation
  • company_lookup({ name }) → mock Baselayer-style verified company data + footer ✓ Baselayer verified-data access · paid via Nevermined card delegation

Streamable-HTTP at POST /mcp (stateless, no bearer). Default PORT=3010.

Files

mcp-examples/web-search-mcp/: package.json (no @nevermined-io/payments; raw MCP SDK + express + zod), tsconfig.json, .gitignore, .env.example (just PORT), src/main.ts, src/services/search.service.ts, README.md, FLEET-SMOKE-TEST.md. The docs include a "Making it real (production)" note pointing at Exa's real card-delegation purchase-key flow.

Verification

yarn build (tsc) compiles; node dist/main.js boots and listens with no creds; /health, and /mcp initialize / tools/list / tools/call all respond. The buyer footers render in tool output.

Draft.

🤖 Generated with Claude Code

r-marques and others added 3 commits July 15, 2026 13:45
…Fleet cookbook)

Minimal sandbox/demo Nevermined-paywalled MCP server with two paid tools:
- web_search(query)    -> mock Exa-style web results
- company_lookup(name) -> mock Baselayer-style verified company data

Mock data only (no external API/keys); the x402 payment/gating is real. Exists to
demo a LangChain Fleet agent buying tools mid-task against a card delegation.
Pins @nevermined-io/payments@^1.10.0; default PORT 3010. Includes FLEET-SMOKE-TEST.md.
Verified: yarn build (tsc) compiles + the server boots to Payments init on 1.10.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Append a short "✓ Purchased via Nevermined delegation · N credit(s) charged"
footer to each tool's text output so the buy is visible in the Fleet chat
(not only the LangSmith trace) — needed for the cookbook screenshots.
Representative credit cost (settlement is post-handler, so real
credits-redeemed/remaining-balance land in result._meta after return and
aren't available to the handler; no invented balance).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ayments/auth)

The cookbook beat is the Fleet agent BUYING from Exa/Baselayer (the sellers
verify+settle), so this stands in for the sellers — not a paywall. Remove
@nevermined-io/payments entirely; rebuild on the raw @modelcontextprotocol/sdk as
a plain streamable-HTTP MCP server (POST /mcp, no auth) that boots with zero creds.
Two mock tools (web_search, company_lookup); footers now represent paying the
external seller via the delegation. Docs reframed + a "Making it real" note that
points at Exa's real card-delegation purchase-key flow.

Verified: yarn build compiles; server boots + listens; /mcp initialize, tools/list,
and tools/call all respond with no credentials.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@r-marques r-marques changed the title feat(web-search-mcp): demo web-search + company-lookup paid MCP (Fleet cookbook) feat(web-search-mcp): fully-mock buyer-side demo MCP (Fleet cookbook) Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant