Hashgrid DNA (local)

ai.hashgridPublished by hashgrid.aiv1.3.0Updated Oct 31, 2026

Search that learns from feedback, over text and images: embeds locally, sends DNA only vectors.

The publisher's own server: Hashgrid DNA

VerifiedSTDIODesktop onlyKnowledge & MemoryAI & ML

Overview

AI-generated overview

Local MCP server for Hashgrid DNA, a feedback-trained search index over text and images that keeps content on your machine and sends only embeddings.

What you can do
  • Add text or image items to a searchable grid, keyed by path so searches can narrow by prefix
  • Search items with a text query or an image file and page through further results
  • Score results from -1 to 1 so later searches rank better
  • Create a grid for this server, or delete a grid and all its items and scores
  • Delete individual items and their stored content
When to use it
Useful when an assistant needs a small private search index over its own notes, documents or images that improves from relevance feedback, rather than a general web search.
Requirements
Runs locally via uvx from the hashgrid PyPI package (Python). Needs an embedder setting (HASHGRID_EMBEDDER, e.g. fastembed, openai or voyage) and a local sqlite index path (HASHGRID_INDEX). A grid API key (HASHGRID_API_KEY) or create_grid; OPENAI_API_KEY or VOYAGE_API_KEY if those embedders are chosen.
Before you install
Stores secrets: HASHGRID_API_KEY, OPENAI_API_KEY and VOYAGE_API_KEY. Content stays local but embeddings are sent to Hashgrid, and text or images go to OpenAI or Voyage when those embedders are used. delete_item and delete_grid permanently remove data; delete_grid requires the grid name as confirmation. Self-signed grids hold up to 1024 items.

Installation

In SourceWeft

  1. Open Hashgrid DNA (local) in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

hashgrid

The Python client for Hashgrid DNA, a search engine that learns from your grades. You store items, ask a question, get the items that fit it best, and grade them with an LLM, a smaller model or your users. Each grade improves the results for every question.

bash
pip install hashgrid

Sign up

Each grid has its own API key (hg-…). DNA.signup makes a grid, no key needed, and returns its key:

python
from hashgrid import DNA
api_key = DNA.signup("mine")print(api_key)   # shown only now: store it, e.g. as $HASHGRID_API_KEY

DNA(api_key) opens the grid, and DNA() opens it from $HASHGRID_API_KEY. A grid made this way holds up to 1024 items, queries included (dna.info().max_items), and each address can sign up a few times a day. Need more? Write to [email protected].

The loop

python
from hashgrid import DNA
dna = DNA()
dna.put("cities/lisbon", "Lisbon, a hilly coastal capital")dna.put("cities/oslo", "Oslo, between fjords and forest")
query = dna.query("a capital by the sea")results = query.results(limit=2, prefix="cities/")results[0].key                      # "cities/lisbon"query.grade(results[0], 1.0)        # a good resultquery.grade(results[1], -0.5)       # a poor one
  • Items live at keys, like 42 or tools/42. prefix narrows results and listings to keys that start with it. Results return keys and metadata, not content: map the keys back to your own data.
  • Queries have an id. To ask the same question again, reopen it with dna.query(id=query.id), so its grades add up.
  • Grades run from -1 (wrong) to 1 (right). You can grade any item, not only those a query returned. Only grades train DNA, and a grade shows in results within a few seconds.

Content

An item or a query is text (str), a record (a dict), an image (its bytes, or a Path to its file), or an embedding from the grid's model (a list of floats). DNA embeds the rest itself.

python
from pathlib import Path
dna.put("tools/search", {"name": "search", "description": "Search the web"})dna.put("photos/beach", Path("beach.jpg"))dna.put("raw", '{"a": 1}', type="text/plain")   # text that looks like JSON

DNA keeps only what it matches on: text and records up to 8 KB, images as a 512 px WebP. dna.get(key) reads one item back, as kept.

Everything else

methodroute
DNA.signup(name), returns the API keyPOST /
dna.info()GET /
dna.delete_grid()DELETE /
dna.put(key, content, type=, if_match=, if_none_match=), dna.put_many({key: content})PUT /items/{key}
dna.get(key)GET /items/{key}
dna.delete(key)DELETE /items/{key}
dna.items(prefix), every pageGET /items
dna.query(content), or dna.query(id=…) to reopen onePOST /queries
query.results(limit, prefix, ungraded=)GET /queries/{id}/results
query.grade(key, score)PUT /queries/{id}/grades/{key}
query.grades(), as {key: score}GET /queries/{id}/grades
query.delete_grade(key)DELETE /queries/{id}/grades/{key}
query.delete()DELETE /queries/{id}

Methods take a key or the Item / Result itself. AsyncDNA and AsyncQuery have the same methods, awaited. Errors are subclasses of DNAError: Unauthorized (401), Forbidden (403, the grid is full), NotFound (404), PreconditionFailed (412), TooLarge (413), UnsupportedType (415), Invalid (422) and TooManyRequests (429).

For agents, DNA has a hosted MCP server at https://dna.hashgrid.ai/mcp.

License

MIT

Source: README.md at commit aeb2def

Tools

7

add_item

Add an item to search: `text`, or `image`, the path of an image file (images need an image embedder). `key` is a path unique in the grid (e.g. "/docs/intro"), so searches can narrow by prefix; left out, it is a hash of the content, and adding the same content again changes nothing. Returns the item's id and key.

Parameterskeytextimage

more_results

The next `k` results of a search (1 to 50), not shown before; empty when none are left.

Parameterskprefixquery_idrequired

score

Score how well item `item_id` fits search `query_id`, from -1 (wrong) to 1 (perfect): a result of the search, or any item. Only scores train DNA; a new score replaces the last.

Parametersscorerequireditem_idrequiredquery_idrequired

delete_item

Delete an item, its content in the index and its scores.

Parametersitem_idrequired

create_grid

Create a DNA grid for this server, when it has none (no key needed): its API key is saved in the local index, and the other tools use it from then on.

Parametersname

delete_grid

Delete this server's grid, every item and score in it and its content in the local index, for good. `confirm` must be the grid's name. Only when the user asks for it.

Parametersconfirmrequired

Version history

3
  1. v1.3.0LatestOct 24, 2026
  2. v1.1.0Oct 19, 2026
  3. v1.0.0Oct 19, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Hashgrid integrations