Connect to AI
Databases Bearer Token

Fauna REST API

Serverless document-relational database with GraphQL

Fauna is a distributed document-relational database delivered as a cloud API. It combines the flexibility of documents with the relational integrity of SQL databases, offering ACID transactions, temporal queries, and native GraphQL support. Developers use Fauna for building modern applications that require global distribution, strong consistency, and serverless scalability without operational overhead.

Base URL https://db.fauna.com

API Endpoints

MethodEndpointDescription
POST/query/1Execute FQL (Fauna Query Language) queries to read and write data
POST/Execute GraphQL queries and mutations against your schema
GET/databasesList all databases in the current scope, returning name and metadata for each.
POST/databasesCreate a new database within the current scope, requires a unique name in the request body.
GET/databases/{name}Retrieve details about a specific database, including configuration and creation timestamp.
DELETE/databases/{name}Delete a database and all its contents, requires the database name in the path.
GET/collectionsList all collections in the current database, returning names and schema definitions.
POST/collectionsCreate a new collection with optional schema definition
GET/indexesList all indexes in the current database, showing terms, values, and source collections.
POST/indexesCreate a new index for efficient querying, specify source collection and indexed terms.
GET/functionsList all user-defined functions in the database, returning names and FQL definitions.
POST/functionsCreate a new user-defined function in FQL, requires name and function body.
GET/keysList all authentication keys in the current scope, showing permissions and creation dates.
POST/keysCreate a new authentication key with specific permissions
DELETE/keys/{id}Revoke an authentication key, requires the key ID in the path.

Code Examples

curl -X POST https://db.fauna.com/query/1 \
  -H 'Authorization: Bearer YOUR_FAUNA_SECRET' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {
      "get": {
        "ref": {
          "collection": "users",
          "id": "12345"
        }
      }
    }
  }'

Use Fauna from Claude / Cursor / ChatGPT

Get a hosted MCP endpoint for Fauna. Paste your Fauna API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Fauna directly with your credentials — no local install, works on mobile.

fauna_query Execute FQL queries to read, write, update, or delete documents with full transaction support
fauna_create_document Create a new document in a specified collection with automatic timestamp tracking
fauna_search_documents Search documents using indexes with pagination and filtering capabilities
fauna_temporal_query Query historical data at a specific timestamp or retrieve document history
fauna_manage_schema Create, update, or delete collections, indexes, and user-defined functions

Connect in 60 seconds

Paste your Fauna key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.

Connect Fauna to your AI →

Related APIs