Skip to main content

Semantic vector DB as an MCP server for Claude Code

Project description

arcana-mcp

Semantic vector DB as an MCP server for Claude Code — SQLite + FTS5 + local ONNX embeddings.

Gives Claude persistent, searchable project knowledge across conversations. Index files, store findings, search semantically — all through MCP tools.

Install

pip install arcana-mcp

Quick Start

Add to your .mcp.json:

{
  "mcpServers": {
    "arcana": {
      "command": "arcana-mcp",
      "args": ["serve"]
    }
  }
}

Or use the init command to set everything up:

arcana-mcp init

This will:

  1. Copy bundled skills (/absorb, /context) to .claude/skills/arcana/
  2. Add the MCP server entry to .mcp.json
  3. Print a CLAUDE.md snippet for the orientation protocol

Tools

Tool Description
arcana_add_resource Index a file or directory into the DB
arcana_add_memory Store a memory entry with embedding
arcana_search Hybrid semantic + FTS5 search (best default)
arcana_find Pure semantic (cosine similarity) search
arcana_grep Keyword/regex search via FTS5
arcana_read Read full content of a resource
arcana_ls List direct children at a URI
arcana_tree Show recursive tree at a URI
arcana_stat Get metadata + chunk count for a resource
arcana_rm Remove a resource (with optional recursive)
arcana_mkdir Create a directory at a URI
arcana_mv Move/rename a resource

Skills

/absorb <path>

Generates knowledge files optimized for Claude retrieval. Surveys a directory, synthesizes structured knowledge, and indexes it into Arcana. Re-runnable — updates stale files, removes orphans.

/context

Quick access to search, store, and browse project knowledge. Use arcana_search for hybrid search, arcana_add_memory for quick findings, arcana_add_resource for indexing files.

Configuration

Environment Variable Default Description
ARCANA_DB_PATH ~/.arcana/context.db SQLite database path
ARCANA_MODEL_CACHE ~/.arcana/models ONNX model cache directory

Architecture

  • SQLite + FTS5: Full-text search with trigram tokenization
  • fastembed: Local ONNX embeddings (BAAI/bge-small-en-v1.5, 384 dimensions)
  • Hybrid search: 0.7 × semantic + 0.3 × FTS5 for best-of-both ranking
  • Markdown chunking: Splits on # headings into ~2000 char segments
  • MCP transport: stdio via FastMCP

CLAUDE.md Snippet

Add this to your project's CLAUDE.md for the orientation protocol:

## Project Context (Arcana)

Arcana is a semantic vector DB for project knowledge. Use `arcana_*` MCP tools directly.

### Orientation protocol
When starting work on a package/feature you haven't touched in this session:
1. `arcana_search("<package or feature>")` — get context BEFORE exploring code
2. If results are relevant, `arcana_read` the top hit for full context
3. Only then Grep/Glob actual source files for implementation details

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arcana_mcp-0.1.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arcana_mcp-0.1.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file arcana_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: arcana_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for arcana_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9c3a2ff70bdbeefb048600d31b4a0a9c7bd8b77b97eda6b4e8198a545b886743
MD5 a86b1d857a4b8f6c75f9be0595560e3f
BLAKE2b-256 25fe308e711afc4defc1710069e87b700864c5cdd62d007e2abb56b1ec38e871

See more details on using hashes here.

Provenance

The following attestation bundles were made for arcana_mcp-0.1.0.tar.gz:

Publisher: publish.yml on samelie/arcana-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arcana_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: arcana_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for arcana_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65e3a8ccb9bf2bc2293e9619669c2de96fd741b03a0d603fc2cf12f558a35f42
MD5 2aaa3a4289452f7b709ae42e3eb5aa80
BLAKE2b-256 46c04a566e8b6f4760e2700ea5077259a77cbae74a9c149cd7d1a045e6d89915

See more details on using hashes here.

Provenance

The following attestation bundles were made for arcana_mcp-0.1.0-py3-none-any.whl:

Publisher: publish.yml on samelie/arcana-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page