ngmeyer/librarian-mcp
The Karpathy LLM Wiki pattern, productionized. MCP server that gives Claude a librarian for your Obsidian vault — graph traversal, auto-wikilinks, trigram search.
5a008aa32d88librarian-mcp0.1.2 in Cargo.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
Top risks in plain words
- HIGHTools
library_import,library_index,library_list,library_metadataand 6 more read or write any file path by design: an agent steered by prompt injection can use them that way. - HIGH4 production dependencies have known vulnerabilities (worst: high).
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Give it only the folder it needs
library_import,library_index,library_list,library_metadataand 6 more can read or write any file path. Mount a single project folder, read-only where you can. - Turn off the tools you do not use
Most MCP clients let you disable single tools. If you do not need
library_import,library_index,library_listand 7 more, switch them off. - Update its vulnerable packages
Use
crossbeam-epoch0.9.20 or later,rmcp3.9.0 or later,tokio1.51.6 or later. - Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 20 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
library_importlibrary_cluster, library_daily, library_eval, library_graph_analysis, library_import, library_index and 13 moreNo tool was seen to: connect to the internet or other hosts; read passwords, tokens or keys; read environment variables; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files19 tools · library_cluster, library_daily, library_eval +16
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (20: 20 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
library_importtool Import any document (PDF, DOCX, XLSX, image, audio, etc.) into the library as markdown. Uses MarkItDown to convert, then saves with frontmatter and auto-linked ProcessesFilesoutside textReads/writes files
Import any document (PDF, DOCX, XLSX, image, audio, etc.) into the library as markdown. Uses MarkItDown to convert, then saves with frontmatter and auto-linked wikilinks.
library_indextool Regenerate topic Index/<Topic>.md map-of-content (MOC) notes from the live graph so newly-added notes gain backlinks from their topic hub instead of staying orpFilesoutside textReads/writes files
Regenerate topic Index/<Topic>.md map-of-content (MOC) notes from the live graph so newly-added notes gain backlinks from their topic hub instead of staying orphaned. Pass `topic` to rebuild one hub, or omit to rebuild every existing Index/*.md. Relatedness = full-text search for the topic name plus the topic's graph neighbors, grouped by directory. Backs up overwritten notes to Index/.bak-<date>/ first.
library_listtool List files and directories in the library. Optionally filter by subdirectory. When multiple vaults are configured, shows all vaults at root level.Filesoutside textReads/writes files
List files and directories in the library. Optionally filter by subdirectory. When multiple vaults are configured, shows all vaults at root level.
library_metadatatool Read YAML frontmatter metadata from a library file.Filesoutside textReads/writes files
Read YAML frontmatter metadata from a library file.
library_optimizetool Autoresearch loop that optimizes the vault graph for retrieval (generic; works on any vault). Measures link relevancy (intra-community edge %) and traversal recFilesoutside textReads/writes files
Autoresearch loop that optimizes the vault graph for retrieval (generic; works on any vault). Measures link relevancy (intra-community edge %) and traversal recall, then iteratively adds only intra-community edges via two graph-derived moves — community hub MOCs and same-community Related(auto) links — and re-measures the projected lift. Dry-run by default (reports projection + proposed actions); pass apply:true to write (backs up touched notes first).
library_readtool Read a file from the library by relative path.Filesoutside textReads/writes files
Read a file from the library by relative path.
library_reporttool Run full vault analysis and generate a GRAPH_REPORT.md with god nodes (most structurally important notes), topic communities, surprising cross-community connectFilesoutside textReads/writes files
Run full vault analysis and generate a GRAPH_REPORT.md with god nodes (most structurally important notes), topic communities, surprising cross-community connections, and suggested questions. Returns the file path and summary.
library_suggest_linkstool Suggest wikilinks for a file. Scans content for mentions of existing note titles (including aliases) that aren't already linked. Returns suggestions without modFilesoutside textReads/writes files
Suggest wikilinks for a file. Scans content for mentions of existing note titles (including aliases) that aren't already linked. Returns suggestions without modifying the file.
library_visualizetool Generate an interactive HTML visualization of the vault's knowledge graph. Nodes are colored by community and sized by structural importance. Returns the file pFilesoutside textReads/writes files
Generate an interactive HTML visualization of the vault's knowledge graph. Nodes are colored by community and sized by structural importance. Returns the file path written.
library_writetool Write or create a file in the library. Auto-links mentions of existing notes as [[wikilinks]] using canonical file names for Obsidian graph compatibility. CreatFilesoutside textReads/writes files
Write or create a file in the library. Auto-links mentions of existing notes as [[wikilinks]] using canonical file names for Obsidian graph compatibility. Creates parent directories if needed.
library_clustertool Detect topic communities in the vault's knowledge graph using modularity optimization. Returns cluster assignments with member lists, sizes, and topic labels (mFilesoutside text
Detect topic communities in the vault's knowledge graph using modularity optimization. Returns cluster assignments with member lists, sizes, and topic labels (most-connected node per cluster).
library_dailytool Create or append to a daily note. Defaults to today. Saves to the first vault.Filesoutside text
Create or append to a daily note. Defaults to today. Saves to the first vault.
library_evaltool Evaluate the knowledge graph as RAG-for-the-brain. Reports link relevancy (share of edges within one topic community), connectivity (largest connected componentFilesoutside text
Evaluate the knowledge graph as RAG-for-the-brain. Reports link relevancy (share of edges within one topic community), connectivity (largest connected component), and traversal-to-relevant recall: for each probe query, land on the top search hit and measure what fraction of the top-20 search-relevant notes is reachable within 1 and 2 hops, plus mean hop distance. Pass `queries`, or omit to probe with the Index/ topic names.
library_graph_analysistool Analyze the vault's knowledge graph structure. Returns connected components (clusters), hub notes (most connected), bridge notes (connect otherwise separate cluFilesoutside text
Analyze the vault's knowledge graph structure. Returns connected components (clusters), hub notes (most connected), bridge notes (connect otherwise separate clusters), and orphan notes (no links at all).
library_linkstool Get backlinks (files linking TO this file) and outgoing links (files this file links TO).Filesoutside text
Get backlinks (files linking TO this file) and outgoing links (files this file links TO).
library_searchtool Search library files by text query. Returns matching file paths with context snippets. Uses an in-memory index for fast results.
Search library files by text query. Returns matching file paths with context snippets. Uses an in-memory index for fast results.
library_shortest_pathtool Find the shortest link chain between two notes in the knowledge graph. Returns the path as a list of note titles, or reports if no path exists.Filesoutside text
Find the shortest link chain between two notes in the knowledge graph. Returns the path as a list of note titles, or reports if no path exists.
library_statstool Get library statistics: file count, total words, link count, orphans, tags. Aggregates across all configured vaults.Filesoutside text
Get library statistics: file count, total words, link count, orphans, tags. Aggregates across all configured vaults.
library_tagstool List all tags in the library, or filter by prefix.Filesoutside text
List all tags in the library, or filter by prefix.
library_traversetool Traverse the knowledge graph from a starting note using BFS. Returns all notes reachable within N hops, with their distance and connections. Useful for explorinFilesoutside text
Traverse the knowledge graph from a starting note using BFS. Returns all notes reachable within N hops, with their distance and connections. Useful for exploring a topic neighborhood.
Text the model reads (20)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
library_search tool
Search library files by text query. Returns matching file paths with context snippets. Uses an in-memory index for fast results.
library_read tool
Read a file from the library by relative path.
library_write tool
Write or create a file in the library. Auto-links mentions of existing notes as [[wikilinks]] using canonical file names for Obsidian graph compatibility. Creates parent directories if needed.
library_list tool
List files and directories in the library. Optionally filter by subdirectory. When multiple vaults are configured, shows all vaults at root level.
library_links tool
Get backlinks (files linking TO this file) and outgoing links (files this file links TO).
library_tags tool
List all tags in the library, or filter by prefix.
library_metadata tool
Read YAML frontmatter metadata from a library file.
library_daily tool
Create or append to a daily note. Defaults to today. Saves to the first vault.
library_stats tool
Get library statistics: file count, total words, link count, orphans, tags. Aggregates across all configured vaults.
library_suggest_links tool
Suggest wikilinks for a file. Scans content for mentions of existing note titles (including aliases) that aren't already linked. Returns suggestions without modifying the file.
library_traverse tool
Traverse the knowledge graph from a starting note using BFS. Returns all notes reachable within N hops, with their distance and connections. Useful for exploring a topic neighborhood.
library_shortest_path tool
Find the shortest link chain between two notes in the knowledge graph. Returns the path as a list of note titles, or reports if no path exists.
library_graph_analysis tool
Analyze the vault's knowledge graph structure. Returns connected components (clusters), hub notes (most connected), bridge notes (connect otherwise separate clusters), and orphan notes (no links at all).
library_import tool
Import any document (PDF, DOCX, XLSX, image, audio, etc.) into the library as markdown. Uses MarkItDown to convert, then saves with frontmatter and auto-linked wikilinks.
library_cluster tool
Detect topic communities in the vault's knowledge graph using modularity optimization. Returns cluster assignments with member lists, sizes, and topic labels (most-connected node per cluster).
library_visualize tool
Generate an interactive HTML visualization of the vault's knowledge graph. Nodes are colored by community and sized by structural importance. Returns the file path written.
library_report tool
Run full vault analysis and generate a GRAPH_REPORT.md with god nodes (most structurally important notes), topic communities, surprising cross-community connections, and suggested questions. Returns the file path and summary.
library_index tool
Regenerate topic Index/<Topic>.md map-of-content (MOC) notes from the live graph so newly-added notes gain backlinks from their topic hub instead of staying orphaned. Pass `topic` to rebuild one hub, or omit to rebuild every existing Index/*.md. Relatedness = full-text search for the topic name plus the topic's graph neighbors, grouped by directory. Backs up overwritten notes to Index/.bak-<date>/ first.
library_eval tool
Evaluate the knowledge graph as RAG-for-the-brain. Reports link relevancy (share of edges within one topic community), connectivity (largest connected component), and traversal-to-relevant recall: for each probe query, land on the top search hit and measure what fraction of the top-20 search-relevant notes is reachable within 1 and 2 hops, plus mean hop distance. Pass `queries`, or omit to probe with the Index/ topic names.
library_optimize tool
Autoresearch loop that optimizes the vault graph for retrieval (generic; works on any vault). Measures link relevancy (intra-community edge %) and traversal recall, then iteratively adds only intra-community edges via two graph-derived moves — community hub MOCs and same-community Related(auto) links — and re-measures the projected lift. Dry-run by default (reports projection + proposed actions); pass apply:true to write (backs up touched notes first).
What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 20 tool handlers traced
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 20 tool handlers traced
- Reads or writes any file path HIGH15 findings in library_import, library_index, library_list, library_metadata and more; 3 more to review
- Requests any addressNo tool sends a request to an address the caller supplies — 20 tool handlers traced
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 20 tool handlers traced
- Tools that start processes1 of 20 capabilities start processes; 19 more call code the scanner could not follow, where it may happen
- Tools that touch files19 of 20 capabilities touch files; 1 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 20 capabilities; 20 more call code the scanner could not follow, where it may happen
Where the code is: 20 handlers in 1 file at commit 5a008aa32d88
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: Cargo.toml
- Lockfiles checked against OSV1 file resolved and checked against the OSV database
- Known vulnerabilities in production dependencies HIGH4 production packages with known advisories
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionrmcp 1
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 20 capabilities; 20 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (4 in production)
rmcpcrates.io 1.3.0 HIGH 7 advisories 1.4.02.0.02.1.0+1 more
- HIGHGHSA-89vp-x53w-74fx CVE-2026-42559 GHSA-fvh2-gm75-j4j7 RUSTSEC-2026-0140 RUSTSEC-2026-0189rmcp Streamable HTTP server transport has a DNS rebinding vulnerability
- HIGHGHSA-33f5-2c5q-wgwj CVE-2026-63127RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery
- HIGHGHSA-9pj6-vhgr-3mwh CVE-2026-63128RMCP: Unauthenticated permanent session-table leak in rmcp Streamable HTTP server transport leads to remote denial-of-service
- MEDIUMRUSTSEC-2026-0189 CVE-2026-42559 GHSA-89vp-x53w-74fx GHSA-fvh2-gm75-j4j7 RUSTSEC-2026-0140DNS rebinding vulnerability in rmcp Streamable HTTP server transport
- MEDIUMRUSTSEC-2026-0462 GHSA-c9f9-cp8h-jcj5Unbounded response body buffering in Streamable HTTP clients
- MEDIUMGHSA-9g45-5xwm-f3wc CVE-2026-64684RMCP: Custom HTTP headers leak to cross-origin redirect targets
- MEDIUMGHSA-c9xm-49cp-xcr9rmcp OAuth client fetches server-controlled resource_metadata URLs
chronocrates.io 0.4.44 MEDIUM 1 advisory no fix yet
- MEDIUMRUSTSEC-2026-0543chrono is unmaintained
crossbeam-epochcrates.io 0.9.18 MEDIUM 1 advisory 0.9.20
- MEDIUMRUSTSEC-2026-0204Invalid pointer dereference in `fmt::Pointer` impl for `Atomic` and `Shared` when the underlying pointer is invalid
tokiocrates.io 1.51.1 MEDIUM 1 advisory 1.51.61.53.3
- MEDIUMRUSTSEC-2026-0386`AsyncFd::new` and related constructors violate I/O safety
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | not stated in the code the scanner read; most local servers talk over stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | rmcp 1 |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-09-18 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 1 catalog (github_search) |
|---|---|
| License | MIT |
| Created | 2026-04-11 |
| Topics | claude claude-code karpathy knowledge-graph knowledge-management llm-wiki markdown mcp mcp-server obsidian |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.