Skip to main content
Glama
sifter-mcp

sifter-mcp

Official
by sifter-ai

Sifter

CI codecov PyPI npm Python Node License: MIT

Your documents are a dark database.

Open-source document intelligence engine — schema-driven extraction, NL query, MCP server, Python and TypeScript SDKs. Self-hostable under MIT.

Sifter demo


Why not RAG?

RAG is built for retrieval — find me chunks similar to this query. It breaks on homogeneous collections like invoices, contracts, or receipts where every document looks alike and the question is an aggregation, not a search.

Documents to structured records

Sifter's approach: extract structured fields once (client, date, total), store them as typed records, query with real filters and aggregations. The answer is exact and reproducible — because it's a database query, not a similarity search.


Related MCP server: API Agent

Quickstart

git clone https://github.com/sifter-ai/sifter
cd sifter/code
cp server/.env.example server/.env.local    # set SIFTER_DEFAULT_API_KEY (required)
docker compose up -d

Open http://localhost:3000 — create a sift, upload documents, query results.


Python SDK

pip install sifter-ai
from sifter import Sifter

s = Sifter(api_key="sk-...")

sift = s.create_sift("Invoices", "client name, date, total amount")
sift.upload("./invoices/")
sift.wait()

for record in sift.records():
    print(record["extracted_data"])
# {"client": "Acme Corp", "date": "2024-01-15", "total_amount": 1500.0}

TypeScript SDK

npm install @sifter-ai/sdk
import { Sifter } from "@sifter-ai/sdk";

const client = new Sifter({ apiKey: "sk-..." });

const sift = await client.createSift("Invoices", "client, date, total amount");
await sift.upload("./invoices/");
await sift.wait();

const records = await sift.records();
console.log(records);

MCP server (Claude Desktop / Cursor / AI agents)

{
  "mcpServers": {
    "sifter": {
      "command": "uvx",
      "args": ["sifter-mcp", "--base-url", "http://localhost:8000"],
      "env": { "SIFTER_API_KEY": "sk-dev" }
    }
  }
}

Then ask:

"What's the total unpaid across all invoices from last quarter?" "Show me all contracts expiring in the next 90 days." "Which candidates have Python and more than 5 years experience?"

Sifter answers with structured data — exact counts, sums, filtered rows. Not a text blob.

Want a remote MCP URL without running a local server? → Sifter Cloud


Dashboard

Sifter includes a built-in dashboard — no Metabase, no Grafana, no SQL required.

Describe what you want to see in plain language:

sift = client.sifts.get("invoices")
sift.create_dashboard("Show total invoiced and unpaid by vendor, monthly trend")

Produces KPI tiles, breakdowns, and time-series — updated automatically on every extraction.


What's included

  • Schema-driven extraction — describe what to extract in natural language; schema is inferred automatically and exported as Pydantic / TypeScript types

  • NL query — ask questions in plain language; Sifter generates inspectable MongoDB aggregation pipelines

  • MCP server — stdio transport, read + write tools, zero custom integration code

  • REST API + SDKs — full OpenAPI spec, typed clients for Python and TypeScript

  • Webhooks — HMAC-signed HTTP callbacks on every extraction event

  • Spec-driven dashboards — short NL spec → auto-generated board (KPI, breakdown, table, time series)

  • CLI — sifter extract, sifter records, sifter sifts for terminal workflows and CI

  • Self-hostable — Docker Compose, bring your own MongoDB and LLM API key


Don't want to run infrastructure?

Sifter Cloud is the managed version — no Mongo, no ops, remote MCP endpoint, Google Drive and email ingress. Free tier available.


Docs

Full documentation at docs.sifter.run — quickstart, SDK reference, MCP guide, cookbook, self-hosting.


License

MIT — see LICENSE.

Created by Bruno Fortunato.

Available Tools

15 tools
aggregate_siftA

Run a MongoDB aggregation pipeline against a sift's records.

Args:
    sift_id: The sift identifier
    pipeline: MongoDB aggregation pipeline stages
              e.g. [{"$group": {"_id": "$client", "total": {"$sum": "$total"}}}]

Returns:
    Array of aggregated rows

Inputs: sift_id (required), pipeline (required).

create_siftA

Create a new sift with the given extraction instructions.

Args:
    name: Human-readable sift name
    instructions: Natural language extraction instructions (e.g. "client, date, total")
    folder_path: Optional folder path to link (e.g. '/invoices/2025'); created if it doesn't exist

Inputs: name (required), instructions (required), folder_path.

delete_siftA

Delete a sift and all its records.

Args:
    sift_id: The sift identifier

Inputs: sift_id (required).

find_recordsA

Filter records with structured criteria (no LLM roundtrip).

Args:
    sift_id: The sift identifier
    filter: Mongo-subset filter dict e.g. {"total": {"$gt": 1000}}
    sort: Optional sort spec e.g. [["date", -1]]
    limit: Max records to return (default 50)
    cursor: Opaque pagination cursor from a previous call

Returns:
    {"records": [...], "next_cursor": "..." | null}

Inputs: sift_id (required), filter (required), sort, limit, +1 more.

get_extraction_statusA

Check extraction status for a document on a sift.

Args:
    document_id: The document identifier
    sift_id: The sift identifier

Returns:
    {"status": "queued|running|completed|failed", "error": "..." (on failure)}

Inputs: document_id (required), sift_id (required).

get_folderA

Get folder metadata, linked sifts, and document list for a specific folder.

Args:
    folder_path: Folder path (e.g. '/invoices/2025')

Inputs: folder_path (required).

get_record_citationsB

Get per-field citation map for a record (page, bbox, source text for each field).

Args:
    sift_id: The sift identifier
    record_id: The record identifier

Inputs: sift_id (required), record_id (required).

get_siftC

Get sift metadata and inferred extraction schema for a specific sift.

Inputs: sift_id (required).

list_foldersB

List folders with their name and document count.

Args:
    limit: Maximum number of folders to return (default 100, max 200)
    offset: Number of folders to skip for pagination

Inputs: limit, offset.

list_recordsB

Get extracted records from a sift.

Args:
    sift_id: The sift identifier
    limit: Maximum number of records to return (default 20, max 100)
    offset: Number of records to skip (ignored when cursor is provided)
    cursor: Opaque pagination cursor from a previous call's next_cursor field

Inputs: sift_id (required), limit, offset, cursor.

list_siftsA

List sifts with their name, instructions, and document/record counts.

Args:
    limit: Maximum number of sifts to return (default 50, max 200)
    offset: Number of sifts to skip for pagination

Inputs: limit, offset.

query_siftA

Run a natural language query over a sift's extracted records.

Args:
    sift_id: The sift identifier
    natural_language: The question to answer (e.g. "What is the total by client?")

Inputs: sift_id (required), natural_language (required). Returns: result

run_extractionC

Enqueue extraction for a document on a specific sift.

Args:
    document_id: The document identifier
    sift_id: The sift to extract with

Inputs: document_id (required), sift_id (required).

update_siftB

Update an existing sift's name or instructions.

Args:
    sift_id: The sift identifier
    name: New name (leave empty to keep current)
    instructions: New instructions (leave empty to keep current)

Inputs: sift_id (required), name, instructions.

upload_documentA

Upload a document to a folder. The folder is created if it doesn't exist. The document will be processed by all sifts linked to the folder.

Args:
    folder_path: Target folder path (e.g. '/invoices/2025'). Created if it doesn't exist.
    filename: Original filename (used for display)
    content_base64: Base64-encoded file bytes

Inputs: folder_path (required), filename (required), content_base64 (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 15 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: sift CRUD, document upload, folder management, record retrieval with two distinct methods, natural language and aggregation querying, extraction control, status checking, and citations. No overlapping functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_sift, list_records, upload_document). No mixing of styles or inconsistent verbs.

    Tool Count5/5

    15 tools is well-scoped for the domain of document extraction and querying. It covers sift management, document upload, folder operations, record retrieval, multiple query methods, and extraction lifecycle without being excessive.

    Completeness4/5

    Core workflows (create/read/update/delete sifts, upload docs, extract, query, browse folders) are covered. Minor gaps like explicit folder deletion or sift-folder unlinking are not present but may be intentionally omitted.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Transforms PDF collections into a searchable knowledge base using TF-IDF indexing and proximity matching. It enables users to search documents, retrieve specific page content, and manage document libraries through natural language via MCP clients.
      5
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables Claude and other MCP-compatible agents to process documents, extract structured data, detect PII, and export LLM-ready datasets through natural language tool calls.
      8
      25 PyPI
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A local-first MCP server that ingests PDFs, extracts structure, and provides semantic search and sequential navigation tools for AI clients to query and learn from documents.
      10
      MIT