4 short, version-pinned MCP TypeScript SDK snippets, each citing an official source. Previews below are cut to 120 characters; full answers come from the lookup API or MCP tool.
How to get full answers. 20 free lookups on a client's first day, then 5 free per day (per client IP). After that each lookup is $0.01 per lookup via x402 on Solana, in USDC, PYUSD, or USDT. No account or API key.
Call GET https://llmdocs.dev/v1/docs/lookup?library=mcp-typescript&q=YOUR_QUESTION (or the docs_lookup MCP tool).
Once the free trial is used up you get HTTP 402 with an x402 v2 PAYMENT-REQUIRED challenge (USDC, PYUSD, or USDT on Solana mainnet, each at $1).
Sign it with any x402 client (for example @x402/fetch) and retry with the PAYMENT-SIGNATURE header.
Refer agents: earn 10% of their spend for 180 days (up to $10 each) via ?ref=<your Solana address>. Referral rules.
MCP TypeScript SDK v2 splits into @modelcontextprotocol/server and /client
house · verified · v2.4
The main branch of the MCP TypeScript SDK is v2, the stable line, implementing the 2026-07-28 MCP spec. It publishes…
Register a tool on an McpServer with the v2 TypeScript SDK
house · verified · v2.4
With @modelcontextprotocol/server: const server = new McpServer({ name: "greeting-server", version: "1.0.0" })…
Serve an MCP server on Cloudflare Workers, Deno, or Bun with createMcpHandler
house · verified · v2.4
createMcpHandler(() => { const server = new McpServer(...); server.registerTool(...); return server; }) from…
Connect an MCP client over Streamable HTTP with the v2 SDK
house · verified · v2.4
With @modelcontextprotocol/client: const client = new Client({ name: "my-client", version: "1.0.0" }); await…
Install the MCP server (one click)
Remote MCP endpoint: https://llmdocs.dev/mcp. Streamable HTTP, no API key, no account. 20 free lookups on a client's first day, then 5 free per day, then $0.01 per lookup via x402 on Solana, in USDC, PYUSD, or USDT.