Loading…
Loading…
Integrate FAQai into your stack with our official SDKs, or connect it to AI coding agents (Claude Desktop, Cursor, and any MCP host) with the FAQai MCP server. All of them authenticate with an API key.
You'll need an API key (available on paid plans) to use the SDKs or MCP server.
Upgrade your planInstall
npm install @faqai/sdkQuickstart
import { FaqaiClient } from "@faqai/sdk";
const client = new FaqaiClient("faq_your_api_key"); // or set FAQAI_API_KEY
// Upload (any size up to your plan limit) and wait for processing
const doc = await client.upload("large-report.pdf", { wait: true });
// List generated datasets
const { datasets } = await client.listDatasets(doc.id);
// Export a dataset for your vector DB
const content = await client.export(datasets[0].id, "pinecone");Tip: set the FAQAI_API_KEY environment variable instead of hardcoding the key. Never commit keys to source control.
The @faqai/mcp-server package lets any MCP-compatible host — across models like Claude, GPT, and Gemini — call FAQai directly: upload documents, generate RAG datasets, and export to your vector database from inside the agent.
Standard config
{
"mcpServers": {
"faqai": {
"command": "npx",
"args": ["-y", "@faqai/mcp-server"],
"env": {
"FAQAI_API_KEY": "faq_your_key_here"
}
}
}
}This exact block works as-is in Cursor, Claude Desktop, Windsurf, Cline / Roo Code, and JetBrains AI Assistant — only the file it goes in differs:
Cursor
~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project), then reload.
Claude Desktop
claude_desktop_config.json, then restart Claude Desktop.
Windsurf
~/.codeium/windsurf/mcp_config.json, then reload the MCP servers.
Cline / Roo Code
The extension's MCP settings file (cline_mcp_settings.json).
JetBrains AI Assistant
Settings → Tools → AI Assistant → Model Context Protocol (MCP).
Any MCP host
Any client that spawns a local stdio server accepts this block.
VS Code (Copilot agent mode)
VS Code uses a top-level servers key. Save as .vscode/mcp.json in your workspace (or add under the mcp block in user settings).
// .vscode/mcp.json
{
"servers": {
"faqai": {
"command": "npx",
"args": ["-y", "@faqai/mcp-server"],
"env": {
"FAQAI_API_KEY": "faq_your_key_here"
}
}
}
}Zed
Zed uses context_servers in its settings.json.
// Zed settings.json
{
"context_servers": {
"faqai": {
"source": "custom",
"command": "npx",
"args": ["-y", "@faqai/mcp-server"],
"env": {
"FAQAI_API_KEY": "faq_your_key_here"
}
}
}
}Claude Code (CLI)
claude mcp add faqai \
-e FAQAI_API_KEY=faq_your_key_here \
-- npx -y @faqai/mcp-serverOpenAI Agents SDK (Python)
Drive the server from your own GPT-powered agent code.
from agents import Agent
from agents.mcp import MCPServerStdio
faqai = MCPServerStdio(
params={
"command": "npx",
"args": ["-y", "@faqai/mcp-server"],
"env": {"FAQAI_API_KEY": "faq_your_api_key"},
}
)
agent = Agent(
name="RAG dataset builder",
instructions="Use FAQai to turn documents into production-ready RAG datasets.",
mcp_servers=[faqai],
)Requires Node 18+. Replace faq_your_key_here with a key from API Keys.
Hosts that connect over a URL instead of launching a local process — ChatGPT, Claude.ai (web), Grok / xAI, and hosted agent frameworks — can use the FAQai remote MCP server over Streamable HTTP. Authenticate with one-click OAuth (for hosts with OAuth connectors) or with your API key via the Authorization header.
Authorization: Bearer faq_…Cursor & other hosts (remote URL + headers)
{
"mcpServers": {
"faqai": {
"url": "https://faqai.app/api/mcp",
"headers": {
"Authorization": "Bearer faq_your_key_here"
}
}
}
}VS Code (remote HTTP server)
// .vscode/mcp.json
{
"servers": {
"faqai": {
"type": "http",
"url": "https://faqai.app/api/mcp",
"headers": { "Authorization": "Bearer faq_your_key_here" }
}
}
}OpenAI Agents SDK (Python)
from agents.mcp import MCPServerStreamableHttp
faqai = MCPServerStreamableHttp(
params={
"url": "https://faqai.app/api/mcp",
"headers": {"Authorization": "Bearer faq_your_api_key"},
}
)OpenAI Responses API
from openai import OpenAI
client = OpenAI()
resp = client.responses.create(
model="gpt-4.1",
tools=[{
"type": "mcp",
"server_label": "faqai",
"server_url": "https://faqai.app/api/mcp",
"headers": {"Authorization": "Bearer faq_your_api_key"},
"require_approval": "never",
}],
input="List my FAQai documents and their status.",
)
print(resp.output_text)ChatGPT, Claude.ai & Grok
In each app's connector / custom-MCP settings, add a server with URL https://faqai.app/api/mcp. You can connect two ways:
Authorization: Bearer faq_… header instead.Note: uploading a local file isn't available over the remote endpoint (there's no local filesystem) — use ingest_url for web content, or the local stdio setup / SDK for file uploads. All other tools (generate, search, export, coverage, webhooks, usage) work remotely, metered by your plan exactly like the REST API.