Doc Agent

Doc Agent

Enables extraction of structured data from documents like invoices, receipts, and bank statements using local Vision AI (Ollama) or cloud providers (Gemini), with data stored in a local SQLite database.

Category
Visit Server

README

doc-agent

Document extraction and semantic search CLI with MCP integration. Extract structured data from invoices, receipts, and bank statements using Vision AI.

Features

  • šŸ” Document Extraction: Extract structured data from PDFs and images using Vision AI
  • šŸ¦™ Ollama-First: Privacy-first default using local llama3.2-vision model
  • šŸ”§ Zero Setup: Auto-installs Ollama via Homebrew if needed, auto-pulls models
  • šŸ“„ Multi-Format: Supports PDFs and images (PNG, JPEG, WebP)
  • šŸ”¬ OCR-Enhanced: Uses Tesseract.js for accurate text extraction from receipts
  • šŸ’¾ Local Storage: All data persists to local SQLite database
  • šŸ”Ž Semantic Search: Natural language search over indexed documents (coming soon)
  • šŸ¤– MCP Integration: Use via Claude Desktop or any MCP-compatible assistant
  • šŸ”’ Privacy-First: Data stays on your machine (unless you opt for cloud AI)

Quick Start

Installation

npm install -g doc-agent

Usage

Extract document data (uses Ollama by default):

doc extract invoice.pdf

šŸ’” Don't have Ollama? No problem! The CLI will offer to install it for you via Homebrew.

With Gemini (cloud, higher accuracy):

export GEMINI_API_KEY=your_key_here
doc extract invoice.pdf --provider gemini

Start MCP server:

doc mcp

Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "doc-agent": {
      "command": "npx",
      "args": ["-y", "doc-agent", "mcp"],
      "env": {
        "GEMINI_API_KEY": "your_key_here"
      }
    }
  }
}

Then in Claude Desktop:

"Extract data from ~/Downloads/invoice.pdf"

Development

# Clone and install dependencies
git clone https://github.com/prosdevlab/doc-agent
cd doc-agent
pnpm install

# Build the project
pnpm build

# Run CLI locally
pnpm dev extract examples/invoice.pdf

# Run tests
pnpm test

# Start MCP server
pnpm mcp

Architecture

The CLI is built with Ink (React for CLIs) for rich interactive output:

packages/
ā”œā”€ā”€ cli/           # Ink-based CLI with services, hooks, and components
ā”œā”€ā”€ core/          # Shared types and interfaces
ā”œā”€ā”€ extract/       # Document extraction (Gemini, Ollama) + OCR
ā”œā”€ā”€ storage/       # SQLite persistence (Drizzle ORM)
└── vector-store/  # Vector database for semantic search

Roadmap

See ROADMAP.md for the project plan.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured