Skip to content
abdou-da0wewPublic

About

Docxer: AI-powered documentation search engine with MCP protocol, SMO architecture, and multi-site crawling

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Docxer

CI CodeQL OpenSSF Scorecard Release Go Report Card

Multi-site documentation indexer with MCP server, web dashboard, and CLI. Built for AI coding agents to query any documentation semantically.

Architecture

    AI Agent                     MCP Server (stdio)       Web Dashboard (:8080)
        │                              │                         │
        └──── JSON-RPC 2.0 ────────────┴────── HTTP/REST ────────┤
                                    │                            │
                              Registry (multi-site, LRU cache)
                                    │
                         Site Index (per-site: chunks +
                                    TF-IDF + pre-computed norms)
                                    │
                         Crawler │ Extractor │ AI (optional)

Binaries

Binary Description
docxer-mcp MCP server over stdio — connect AI agents directly
docxer-serve Web dashboard + REST API on :8080
docxer-ctl CLI management tool
docxer-crawl Crawl a site's documentation
docxer-index Full crawl + index pipeline
docxer-idx Build search index from crawled pages

Quick Start

# 1. Build everything
make build

# 2. Add a site
./docxer-ctl sites add "My Docs" "https://example.com/sitemap.xml"

# 3. Crawl
./docxer-ctl crawl my-docs

# 4. Index
./docxer-ctl index my-docs

# 5. Start the dashboard
./docxer-serve

# 6. OR start the MCP server (for AI agents)
./docxer-mcp

CLI Usage

$ docxer-ctl sites list                    # List all indexed sites
$ docxer-ctl sites add "Name" <sitemap>   # Add a new site
$ docxer-ctl sites remove <id>            # Remove a site
$ docxer-ctl crawl <site_id>              # Crawl a site
$ docxer-ctl index <site_id> [--skip-ai]  # Build search index
$ docxer-ctl search "query" [--site ID] [--limit N]  # Search
$ docxer-ctl stats                        # Show global statistics

MCP Server (for AI Agents)

Connect any AI agent via stdio JSON-RPC 2.0:

Tools

Tool Params Description
search text, site_id?, category?, limit? Search documentation
get_page url, site_id? Get full page content
list_sites — List all indexed sites
add_site name, sitemap_url Add a site to index
crawl_site site_id Trigger crawl (background)
remove_site site_id Delete a site
stats — Global index statistics

Example MCP call from an agent:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search",
    "arguments": {"text": "deferred lighting shadows", "limit": 5}
  }
}

REST API (Dashboard)

Method Path Description
GET / Redirects to dashboard
GET /api/v2/health Health check
GET /api/v2/stats Global statistics
GET /api/v2/sites List all sites
POST /api/v2/sites Add a site
DELETE /api/v2/sites/{id} Remove a site
POST /api/v2/sites/{id}/crawl Trigger crawl
POST /api/v2/sites/{id}/index Trigger indexing
POST /api/v2/search Search across sites

Testing

Docxer has 4 test tiers:

make test-unit          # Unit tests with race detection
make test-integration   # Integration tests (filesystem isolation)
make test-smoke         # Smoke tests (binary existence + help flags)
make test-reality       # Reality tests (against live AI API)
make test-all           # All tiers

See docs/development.md for test framework details.

Release Process

See docs/release-process.md for the full release workflow:

  • Semantic versioning and conventional commits
  • Creating a release (tag + push)
  • GitHub Environment approval gate
  • Discord notifications and approval bot
  • Rollback procedures

Configuration

Edit config/config.json or use environment variables:

Variable Default Description
DATA_DIR ./data Data directory
AI_BASE_URL https://opencode.ai/zen/v1/chat/completions AI API endpoint
AI_MODEL nemotron-3-ultra-free AI model name
AI_API_KEY public API key
SERVE_HOST 0.0.0.0 Server bind address
SERVE_PORT 8080 Server port

Performance

  • Search latency: ~70ms across 724 chunks / 3,242 vocabulary terms
  • Memory: ~15MB per loaded site index
  • Cache: LRU eviction keeps hot sites in memory (configurable via cache_size)
  • Crawling: 117 pages in ~25s with 8 concurrent workers

Data Storage

.doc/data/                  # Project-local data (or ~/.doc/data/ global)
├── sites.json              # Site registry
├── docxer-docs/            # Per-site directory
│   ├── pages/              # Raw crawled pages (JSON)
│   └── index.json          # Search index (TF-IDF + chunks + norms)
└── ...

About

Docxer: AI-powered documentation search engine with MCP protocol, SMO architecture, and multi-site crawling

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages