Integrations / LangChain
FastAF for LangChain: web search and scraping over MCP
Give LangChain live public web data: Google search, Maps, News, YouTube transcripts, page scraping to Markdown and more, as 23 tools from the hosted FastAF MCP server at https://api.fastaf.co/mcp (Streamable HTTP, stateless). The same API key works over REST, and failed calls cost no credits.
How do you get a key?
Sign up at fastaf.co/signup: the first API key arrives by email with the confirmation link. Confirm the email to unlock 500 free credits every month, then export the key:
export FASTAF_API_KEY=... # keep it out of prompts and repositoriesHow do you connect LangChain?
pip install langchain langchain-openai langchain-mcp-adaptersLoad the FastAF tools with MultiServerMCPClient and hand them to any LangChain or LangGraph agent:
import asyncio
import os
from langchain.agents import create_agent
from langchain_mcp_adapters.client import MultiServerMCPClient
async def main() -> None:
client = MultiServerMCPClient({
"fastaf": {
"transport": "streamable_http",
"url": "https://api.fastaf.co/mcp",
"headers": {"Authorization": f"Bearer {os.environ['FASTAF_API_KEY']}"},
}
})
tools = await client.get_tools()
agent = create_agent("openai:gpt-4.1", tools)
result = await agent.ainvoke({"messages": [{"role": "user", "content": "Top 5 Google results for 'standing desk under $300' in the US"}]})
print(result["messages"][-1].content)
asyncio.run(main())Current releases accept "http" as the same transport as "streamable_http". Any chat model works in create_agent; the OpenAI one needs OPENAI_API_KEY. LangChain 1.4 also ships a beta MCPAdapter that connects to the same URL.
For a single search tool without MCP, the FastAF Python SDK has a LangChain extra (pip install "fastaf-sdk[langchain]", version 0.2.1):
import os
from fastaf import FastAF
from fastaf.tools import langchain_tool
client = FastAF(os.environ["FASTAF_API_KEY"])
search = langchain_tool(client) # one StructuredTool named fastaf_searchChecked on against langchain-mcp-adapters README, LangChain MCP documentation and langchain-mcp-adapters 0.3.2, langchain 1.4.7, fastaf-sdk 0.2.1 on PyPI.
How do you check it works?
await client.get_tools() returns one LangChain tool per FastAF MCP tool. Listing needs no credits; each tool result reports credits_used and credits_remaining.
What does it cost?
500 free credits every month after email verification, shared by REST and MCP and by all your keys. After that, prepaid packs from $10 for 20,000 credits, without expiry. A Google search costs 5 credits and a plain page scrape 1; failed calls cost nothing. Every tool result reports credits_used and credits_remaining. See FastAF pricing.
FAQ
How do I add FastAF to LangChain?
Use MultiServerMCPClient from langchain-mcp-adapters with the streamable_http transport, pointing at the hosted MCP server https://api.fastaf.co/mcp with Authorization: Bearer and your FastAF API key, read from the FASTAF_API_KEY environment variable, then pass await client.get_tools() to your agent.
Is there a free tier?
Yes: 500 free credits every month per account after email verification, no card, shared by REST and MCP. After that, pay per call with prepaid credits or with x402 on the REST endpoints.
Am I charged for failed tool calls?
No. A call that fails costs no credits.
Which tools does the server expose?
23 tools, for example google_search, google_maps_places, search_news, youtube_transcript, scrape_url, extract. Listing them is public and needs no key; calling one needs a FastAF API key or an OAuth token.
Can the MCP server be paid with x402?
No. MCP tool calls need an API key or OAuth. x402 pay-per-call, from $0.003 per call, works on the REST endpoints under https://api.fastaf.co/x402/v1/.
Related
MCP server docs · Add FastAF to Claude Code, Codex and Cursor · SDKs · Tavily-compatible API · All integrations
Other clients: FastAF for Claude Code · FastAF for Cursor · FastAF for Vercel AI SDK · FastAF for OpenAI Agents SDK