Connect quarry to…
Frameworks and APIs
Use quarry's MCP tools from LangChain, LlamaIndex, the Vercel AI SDK, OpenAI, Anthropic, Pydantic AI, Google ADK, CrewAI and Mastra.
Each framework loads quarry's tools (search, get_dataset, ask, …) from the
MCP server. Pass an API key to use your
subscriptions; drop the header to search for free and pay per question with
x402.
LangChain and LangGraph
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"quarry": {
"transport": "http",
"url": "https://quarry.market/api/mcp",
"headers": {"Authorization": "Bearer qk_..."},
}
})
tools = await client.get_tools()LlamaIndex
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec
client = BasicMCPClient("https://quarry.market/api/mcp", headers={"Authorization": "Bearer qk_..."})
tools = await McpToolSpec(client=client).to_tool_list_async()Vercel AI SDK
import { createMCPClient } from "@ai-sdk/mcp";
const quarry = await createMCPClient({
transport: {
type: "http",
url: "https://quarry.market/api/mcp",
headers: { Authorization: `Bearer ${process.env.QUARRY_API_KEY}` },
},
});
const tools = await quarry.tools();
// … generateText({ model, tools, prompt }) …
await quarry.close();OpenAI Agents SDK
from agents import Agent
from agents.mcp import MCPServerStreamableHttp
async with MCPServerStreamableHttp(
name="quarry",
params={"url": "https://quarry.market/api/mcp", "headers": {"Authorization": f"Bearer {key}"}},
cache_tools_list=True,
) as quarry:
agent = Agent(name="Researcher", mcp_servers=[quarry])OpenAI Responses API
{
"type": "mcp",
"server_label": "quarry",
"server_description": "Sourced documents with citations",
"server_url": "https://quarry.market/api/mcp",
"authorization": "qk_...",
"require_approval": "never"
}Anthropic Messages API
Send the header anthropic-beta: mcp-client-2025-11-20 and:
{
"mcp_servers": [
{ "type": "url", "url": "https://quarry.market/api/mcp", "name": "quarry", "authorization_token": "qk_..." }
],
"tools": [{ "type": "mcp_toolset", "mcp_server_name": "quarry" }]
}Pydantic AI
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPToolset
quarry = MCPToolset("https://quarry.market/api/mcp", headers={"Authorization": "Bearer qk_..."})
agent = Agent("openai:gpt-5.2", toolsets=[quarry])Google ADK
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams
quarry = McpToolset(
connection_params=StreamableHTTPConnectionParams(
url="https://quarry.market/api/mcp",
headers={"Authorization": "Bearer qk_..."},
)
)CrewAI
from crewai import Agent
from crewai.mcp import MCPServerHTTP
researcher = Agent(
role="Researcher", goal="Answer with sources", backstory="…",
mcps=[MCPServerHTTP(url="https://quarry.market/api/mcp", headers={"Authorization": "Bearer qk_..."}, streamable=True)],
)Mastra
import { MCPClient } from "@mastra/mcp";
const mcp = new MCPClient({
id: "quarry",
servers: {
quarry: {
url: new URL("https://quarry.market/api/mcp"),
requestInit: { headers: { Authorization: `Bearer ${process.env.QUARRY_API_KEY}` } },
},
},
});
const tools = await mcp.listTools();