OroIntelDocs
For agents:start at/llms.txt·everything as Markdown at/llms-full.txt·or add theMCP server.

Use Oro Intel with the Vercel AI SDK

Give a Vercel AI SDK agent live UK tender and contract data by connecting Oro Intel's remote MCP server with experimental_createMCPClient.

Prerequisites

  • An Oro Intel API key in ORO_API_KEY (create one, 250 free credits).
  • An LLM key (this example uses Anthropic via ANTHROPIC_API_KEY).
  • npm install ai @ai-sdk/anthropic @modelcontextprotocol/sdk (Node 18+)

Code

agent.mjs
// Vercel AI SDK agent with live UK procurement data via the Oro Intel remote MCP server.

import { anthropic } from "@ai-sdk/anthropic";
import { experimental_createMCPClient, generateText, stepCountIs } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const ORO_API_KEY = process.env.ORO_API_KEY; // https://app.oro-intel.com/dashboard/developers
if (!ORO_API_KEY) throw new Error("Set ORO_API_KEY");

const mcpClient = await experimental_createMCPClient({
  transport: new StreamableHTTPClientTransport(
    new URL("https://api.oro-intel.com/mcp/"), // trailing slash required
    { requestInit: { headers: { Authorization: `Bearer ${ORO_API_KEY}` } } },
  ),
});

try {
  const tools = await mcpClient.tools();
  const { text } = await generateText({
    model: anthropic("claude-sonnet-5"),
    tools,
    stopWhen: stepCountIs(6),
    prompt:
      "Look up the UK company 'Serco' and give me its full supplier profile. " +
      "Report how many public contracts it has won, and the credits_charged " +
      "and credits_remaining from the tool responses.",
  });
  console.log(text);
} finally {
  await mcpClient.close();
}

Expected output

output (trimmed)
Serco Limited (company number 02048608) has won 132 public contracts.
Lookup: 5 credits; full profile: 12 credits (credits_remaining: 233).

The model chains oro_lookup_company (5 credits) into oro_company_profile (12 credits); each tool response includes credits_charged/credits_remaining.

Next steps