Skip to main content
Glama
rdnpradipta

Muninn

by rdnpradipta

Muninn — Page-Citable Research Knowledge Base + MCP Server

Named after Odin's raven of memory. From research PDFs → chunked at page level → embedded (BAAI/bge-small-en-v1.5) → Qdrant vector DB → served over MCP so any future Claude session (desktop, web, phone) can query the corpus with exact filename, p. N citations — no re-reading, no chat-context cost.

Note: pdfs/, notes/, and qdrant_db/ are not included in this repo. pdfs/ holds the source papers, notes/ holds Claude's generated reading notes, and qdrant_db/ is the resulting vector DB — all excluded for privacy, since they contain personal research material and its derived content rather than shareable code.

Layout

pdfs/            the source PDFs
notes/           Claude's reading notes (notes*.jsonl) — re-ingestable
ingest.py        PDFs + notes → qdrant_db/  (run once, and after adding PDFs)
muninn_mcp.py    MCP server (stdio locally, Streamable HTTP when hosted)
push_to_cloud.py local qdrant_db/ → Qdrant Cloud (one command)
Dockerfile       Hugging Face Space deployment
qdrant_db/       the vector DB (created by ingest.py)

Data model (collection muninn): type=raw — verbatim chunks, ~1000 chars, never crossing page boundaries → every chunk has exactly one (source_file, page); type=page — full page text (backs get_page, and later page-rendering/highlighting: exact search_for → sentence pieces → fuzzy word alignment → semantic nearest-chunk fallback); type=claude_note — interpretation layer. Raw = ground truth, notes = orientation.

Related MCP server: sci-bot-mcp

Step 1 — Ingest (your machine, ~2-3 min)

cd <this folder>
uv run ingest.py          # downloads bge-small (~130MB) once, builds qdrant_db/

Step 2 — Use locally right away (optional)

Claude Desktop → claude_desktop_config.json:

{"mcpServers": {"muninn": {"command": "uv",
  "args": ["run", "--directory", "/ABSOLUTE/PATH/TO/THIS/FOLDER", "muninn_mcp.py"]}}}

Claude Code: claude mcp add muninn -- uv run --directory /ABSOLUTE/PATH muninn_mcp.py

Note: Qdrant local mode is single-process — stop the MCP server before re-running ingest.py.

Step 3 — Host it (laptop-off access, $0/mo)

3a. Qdrant Cloud (free tier, 4GB): create a cluster at cloud.qdrant.io, copy URL + API key, then:

QDRANT_URL=https://xxxx.cloud.qdrant.io QDRANT_API_KEY=... uv run push_to_cloud.py

3b. HF Space: create a Space (SDK = Docker), push Dockerfile + muninn_mcp.py to it. In Space Settings → Variables and secrets set:

name

kind

value

MUNINN_PATH_TOKEN

secret

python -c "import secrets; print(secrets.token_urlsafe(24))"

QDRANT_URL

variable

your cluster URL

QDRANT_API_KEY

secret

your cluster key

3c. Connect Claude: Settings → Connectors → Add custom connector → https://<user>-<space>.hf.space/mcp-<TOKEN>

MCP tools

search(query, top_k, doc_id, note_type) → ranked chunks with citation; list_documents() → corpus inventory; get_page(doc_id, page) → full page text. Retrieval tip: if a query misses, try HyDE (in the corpus, doc 322d71209a2f): write a hypothetical paragraph answering the question and search with that.

Adding papers later

Drop PDFs into pdfs/, re-run uv run ingest.py (idempotent per file), then push_to_cloud.py if hosted. Ask Claude to read the new paper and append a note to notes/ for the interpretation layer.

Available Tools

6 tools
get_citationA

APA-7 citation for a document: in-text (parenthetical + narrative) and the full reference-list entry. Use these verbatim when writing — the corpus is APA only, never mix styles. For a direct quote, add the page to the in-text form: '(Author, Year, p. N)'.

Args: doc_id: document id from search/list_documents.

ParametersJSON Schema
NameRequiredDescriptionDefault
doc_idYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. States it provides citation text, implying read-only behavior, but does not explicitly disclose non-destructiveness, error conditions (e.g., invalid doc_id), or any limitations. Some behavioral context is present but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences plus an args line, front-loaded with the main explanation. No redundant words, every sentence earns its place. Efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple single-parameter tool with no output schema, description covers the key aspects: output types, usage instructions, and parameter source. Missing edge-case behavior (e.g., missing metadata) but overall fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description adds meaning for the doc_id parameter: 'document id from search/list_documents.' This links to sibling tools and clarifies where the ID comes from, going beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it provides APA-7 citation (parenthetical, narrative, full reference) for a document, using verb 'get' and specific resource 'citation'. It distinguishes from siblings like list_documents and search by specifying the exact output format and context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells agent to use output verbatim and that the corpus is APA-only, never mix styles. Provides usage for direct quotes with page numbers. No alternative citation tool exists among siblings, so exclusion is not needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_pageA

Full text of one page of a document — for reading context around a search hit.

Args: doc_id: document id from search/list_documents. page: 1-based page number.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageYes
doc_idYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description indicates it is a read operation ('reading context') and explains the parameters, but with no annotations, it could be more explicit about being non-destructive or any limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two sentences and a bulleted list, front-loading the purpose and providing parameter details efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is sufficient for a simple tool, explaining purpose and parameters, but could mention the return format explicitly since there is no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description adds critical meaning: doc_id comes from search/list_documents and page is 1-based, fully compensating for the lack of schema property descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves the full text of one page of a document for reading context around a search hit, distinguishing itself from siblings like search or render_page.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use after a search by referencing doc_id from search, but it does not explicitly specify when not to use it or mention alternatives like get_citation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_documentsA

List all documents in the knowledge base with doc_id, title, and pages.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must cover behavioral traits. It states read-only listing but omits details like pagination, rate limits, or performance characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with verb and resource, no redundant words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a parameterless tool with output schema; minor gaps like no mention of ordering, limits, or pagination.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist (0 params), so baseline is 4. Description adds value by listing output fields (doc_id, title, pages) which are not in the input schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description specifies verb 'list', resource 'documents', and output fields. Clear purpose but does not distinguish from sibling tools like search or get_page.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implied usage is to get a list of all documents, but no explicit guidance on when to use versus alternatives or context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

render_pageA

Render a PDF page as an image, optionally with a passage highlighted. Use after search/get_page to SHOW the user the exact source location.

Args: doc_id: document id from search/list_documents. page: 1-based page number. highlight: passage to highlight. Verbatim raw-chunk text from search() always works; paraphrases usually work too — matching falls back exact -> sentence pieces -> fuzzy word alignment -> semantic (embeds the text and highlights the nearest raw chunk on this page). Returns the image plus a highlight_method report. "" = no highlighting.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageYes
doc_idYes
highlightNo

TDQS

A4.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Details highlight fallback logic and return content (image + report). Lacks potential side effects or performance notes, but still strong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise yet comprehensive. First sentence gives purpose, then context, then parameter details. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Handles tool complexity well. Covers highlight logic, return value, and usage context. No output schema, but description provides enough detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description adds full meaning: doc_id from search/list_documents, page is 1-based, highlight explains matching behavior and default. Great compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Render a PDF page as an image, optionally with a passage highlighted.' Uses specific verb and resource, distinguishes from siblings like search/get_page.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises 'Use after search/get_page to SHOW the user the exact source location.' Provides clear context and detailed highlight behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

save_hydeA

Persist a HyDE hypothetical document as a reusable type=hyde bridge.

Use after a search(query, hypothesis=...) fallback produced good grounding, so the same retrieval miss becomes an indexed hit next time (searchable via note_type="hyde" or "everything"). A hyde bridge is generated text, never a citable source. Idempotent per (doc_id, query) — re-saving updates in place.

Args: query: the user query this hypothesis answers (used for the bridge id). hypothesis: the hypothetical answer paragraph to store and embed. doc_id: optional document this bridge is about ("" = corpus-wide). title: optional label ("" = derived from the query).

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
titleNo
doc_idNo
hypothesisYes

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses idempotency per (doc_id, query), in-place updates, the non-citable nature, and searchability via note_type.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear lead sentence and a bullet-like list for arguments. It is slightly long but every sentence adds value; could be slightly more terse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and 0% schema coverage, the description fully explains inputs, idempotency, use case, and integration with other tools (searchable via note_type). It is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must explain parameters. It thoroughly describes each parameter: query (user query and bridge id), hypothesis (answer paragraph), doc_id (optional scope), title (optional label derived from query).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Persist') and resource ('HyDE hypothetical document'), and distinguishes this tool from siblings by specifying it's for hypothetical documents and creates a 'type=hyde bridge' for search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use: after a 'search(query, hypothesis=...) fallback produced good grounding', and what not to use for: 'never a citable source'. It also mentions idempotency and searchability via note_type.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.1/5.0
Disambiguation5/5

Every tool has a clearly distinct purpose: listing documents, getting page text, retrieving citations, rendering pages, saving hypothetical documents, and searching. No overlap or ambiguity.

Naming Consistency4/5

Most tool names follow a verb_noun pattern (list_documents, get_page, get_citation, render_page, save_hyde). 'search' is a single verb but is a standard exception for search functionality. Overall consistent.

Tool Count5/5

Six tools is well-scoped for a knowledge base server covering listing, reading, citation, rendering, saving, and searching. Each tool is essential and not excessive.

Completeness4/5

The tool set covers core read operations and search with HyDE support, plus citation and visualization. Missing write/update operations for raw documents, but intentional for a knowledge base. Minor gap for editing documents.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rdnpradipta/muninn'

If you have feedback or need assistance with the MCP directory API, please join our Discord server