infranodus-mcp-server 1.8.4 → 1.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +24 -12
  2. package/dist/instructions.js +1 -1
  3. package/dist/schemas/index.d.ts +113 -0
  4. package/dist/schemas/index.d.ts.map +1 -1
  5. package/dist/schemas/index.js +28 -3
  6. package/dist/schemas/index.js.map +1 -1
  7. package/dist/tools/addMemory.d.ts +1 -0
  8. package/dist/tools/addMemory.d.ts.map +1 -1
  9. package/dist/tools/analyzeText.d.ts +1 -0
  10. package/dist/tools/analyzeText.d.ts.map +1 -1
  11. package/dist/tools/analyzeTextSignature.d.ts +38 -0
  12. package/dist/tools/analyzeTextSignature.d.ts.map +1 -0
  13. package/dist/tools/analyzeTextSignature.js +82 -0
  14. package/dist/tools/analyzeTextSignature.js.map +1 -0
  15. package/dist/tools/createKnowledgeGraph.d.ts +1 -0
  16. package/dist/tools/createKnowledgeGraph.d.ts.map +1 -1
  17. package/dist/tools/developConceptualBridges.d.ts +1 -0
  18. package/dist/tools/developConceptualBridges.d.ts.map +1 -1
  19. package/dist/tools/developLatentTopics.d.ts +1 -0
  20. package/dist/tools/developLatentTopics.d.ts.map +1 -1
  21. package/dist/tools/developTextTool.d.ts +1 -0
  22. package/dist/tools/developTextTool.d.ts.map +1 -1
  23. package/dist/tools/generateContentGaps.d.ts +1 -0
  24. package/dist/tools/generateContentGaps.d.ts.map +1 -1
  25. package/dist/tools/generateContextualHint.d.ts +1 -0
  26. package/dist/tools/generateContextualHint.d.ts.map +1 -1
  27. package/dist/tools/generateDifferenceGraphFromTexts.d.ts +1 -0
  28. package/dist/tools/generateDifferenceGraphFromTexts.d.ts.map +1 -1
  29. package/dist/tools/generateDifferenceGraphFromTexts.js +1 -1
  30. package/dist/tools/generateDifferenceGraphFromTexts.js.map +1 -1
  31. package/dist/tools/generateKnowledgeGraph.d.ts +1 -0
  32. package/dist/tools/generateKnowledgeGraph.d.ts.map +1 -1
  33. package/dist/tools/generateMergedGraphFromTexts.d.ts +1 -0
  34. package/dist/tools/generateMergedGraphFromTexts.d.ts.map +1 -1
  35. package/dist/tools/generateMergedGraphFromTexts.js +1 -1
  36. package/dist/tools/generateMergedGraphFromTexts.js.map +1 -1
  37. package/dist/tools/generateOverlapGraphFromTexts.d.ts +1 -0
  38. package/dist/tools/generateOverlapGraphFromTexts.d.ts.map +1 -1
  39. package/dist/tools/generateOverlapGraphFromTexts.js +1 -1
  40. package/dist/tools/generateOverlapGraphFromTexts.js.map +1 -1
  41. package/dist/tools/generateResearchIdeas.d.ts +1 -0
  42. package/dist/tools/generateResearchIdeas.d.ts.map +1 -1
  43. package/dist/tools/generateResearchQuestions.d.ts +1 -0
  44. package/dist/tools/generateResearchQuestions.d.ts.map +1 -1
  45. package/dist/tools/generateResponses.d.ts +1 -0
  46. package/dist/tools/generateResponses.d.ts.map +1 -1
  47. package/dist/tools/generateSEOGraphTool.d.ts +1 -0
  48. package/dist/tools/generateSEOGraphTool.d.ts.map +1 -1
  49. package/dist/tools/generateSEOGraphTool.js +1 -1
  50. package/dist/tools/generateSEOGraphTool.js.map +1 -1
  51. package/dist/tools/generateTopicalClusters.d.ts +1 -0
  52. package/dist/tools/generateTopicalClusters.d.ts.map +1 -1
  53. package/dist/tools/optimizeKnowledgeBase.d.ts +1 -0
  54. package/dist/tools/optimizeKnowledgeBase.d.ts.map +1 -1
  55. package/dist/tools/optimizeReasoning.d.ts +1 -0
  56. package/dist/tools/optimizeReasoning.d.ts.map +1 -1
  57. package/dist/tools/optimizeTextStructure.d.ts +1 -0
  58. package/dist/tools/optimizeTextStructure.d.ts.map +1 -1
  59. package/dist/utils/graphInput.d.ts +5 -1
  60. package/dist/utils/graphInput.d.ts.map +1 -1
  61. package/dist/utils/graphInput.js +4 -3
  62. package/dist/utils/graphInput.js.map +1 -1
  63. package/dist/utils/learnings.d.ts +4 -2
  64. package/dist/utils/learnings.d.ts.map +1 -1
  65. package/dist/utils/learnings.js +4 -2
  66. package/dist/utils/learnings.js.map +1 -1
  67. package/dist/utils/textSignature.d.ts +231 -0
  68. package/dist/utils/textSignature.d.ts.map +1 -0
  69. package/dist/utils/textSignature.js +738 -0
  70. package/dist/utils/textSignature.js.map +1 -0
  71. package/dist/utils/wikilinksMode.d.ts +12 -2
  72. package/dist/utils/wikilinksMode.d.ts.map +1 -1
  73. package/dist/utils/wikilinksMode.js +18 -5
  74. package/dist/utils/wikilinksMode.js.map +1 -1
  75. package/package.json +2 -1
package/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  A Model Context Protocol (MCP) server that integrates InfraNodus knowledge graph and text network analysis capabilities into LLM workflows and AI assistants like Claude Desktop.
4
4
 
5
+ [![npm version](https://img.shields.io/npm/v/infranodus-mcp-server.svg)](https://www.npmjs.com/package/infranodus-mcp-server)
6
+
7
+ Available on npm: [https://www.npmjs.com/package/infranodus-mcp-server](https://www.npmjs.com/package/infranodus-mcp-server)
8
+
5
9
  ## Overview
6
10
 
7
11
  InfraNodus MCP Server enables LLM workflows and AI assistants to analyze text using advanced network science algorithms, generate knowledge graphs, detect content gaps, and identify key topics and concepts. It transforms unstructured text into structured insights using graph theory and network analysis.
@@ -108,6 +112,7 @@ InfraNodus MCP Server enables LLM workflows and AI assistants to analyze text us
108
112
  15. **create_knowledge_graph**
109
113
  - Create a knowledge graph in InfraNodus from text and provide a link to it
110
114
  - Use it to create a knowledge graph in InfraNodus from text
115
+ - Also accepts `statements` (discrete items) with parallel `categories` and `timestamps`. Categories are stored as metadata on each statement (filter, group, delete, or relabel by them) and stay out of the graph unless `categoriesAsNodes: true`, which turns each label into a `[[label]]` node — meant for large knowledge bases and Obsidian vaults where the connections between pages are the point. The parent modes of `wikilinksMode` (`obsidianStyle`, `parentAndConcepts`) always make the parent page a node
111
116
 
112
117
  16. **generate_ontology_graph**
113
118
  - Use AI to generate a reasoning ontology graph (entities and the relations between them) from one of three sources: a `prompt` (a topic — e.g. "build an ontology on AI attention mechanisms"), a `text` (a long document or a structural digest of a project, chunked server-side), or a `sourceGraphName` (an existing graph — e.g. a fully ingested repo or corpus — whose statements are read back, chunked, and condensed into an ontology)
@@ -180,59 +185,63 @@ InfraNodus MCP Server enables LLM workflows and AI assistants to analyze text us
180
185
  - Optionally retrieve the full graph, statements, or extended analysis
181
186
  - Ideal for augmenting LLM responses with domain-specific knowledge
182
187
 
183
- 29. **search**
188
+ 29. **list_graphs**
189
+ - List all the graphs in your InfraNodus account, with optional filters by name, type, date, language, or favorite status
190
+ - Use it to discover which graphs exist before analyzing, searching, or retrieving from them
191
+
192
+ 30. **search**
184
193
  - Search through existing InfraNodus graphs
185
194
  - Also use it to search through the public graphs of a specific user
186
195
  - Compatible with ChatGPT Deep Research mode via Developer Mode > Connectors
187
196
 
188
- 30. **fetch**
197
+ 31. **fetch**
189
198
  - Fetch a specific search result for a graph
190
199
  - Can be used in ChatGPT Deep Research mode via Developer Mode > Connectors
191
200
 
192
- 31. **enable_project_learnings**
201
+ 32. **enable_project_learnings**
193
202
  - Create the opt-in, per-project, append-only learnings graph (`learn-<project>`) in your account — the place where the assistant saves what it learned about operating in a project
194
203
  - Called only when you explicitly ask to start saving learnings for a project; idempotent, so calling it again just returns the existing graph
195
204
  - The assistant tells you first what will be stored (project knowledge only, never anything about you), where (a private graph you can delete at any time), and that batches are shown before saving
196
205
 
197
- 32. **add_project_learnings**
206
+ 33. **add_project_learnings**
198
207
  - Save learnings about a project — where things live, traps, conventions, decisions, workflows, and a self-assessment of what worked well and what should be done differently next time — as statements with a `type` category each, for later sessions on any client
199
208
  - Refuses (without error) when the project has not been enabled and never creates the graph itself
200
209
  - Dry run by default: returns what would be written, marking near-duplicates as `reinforced`; writes only with `confirm: true` — or in the same call when your client supports MCP elicitation and you approve the form
201
210
  - Rejects statements with secret-like content server-side (indices only, never the content)
202
211
 
203
- 33. **get_project_learnings**
212
+ 34. **get_project_learnings**
204
213
  - Retrieve learnings for a project: by `prompt` (GraphRAG — most relevant statements plus an overview of what is known), by `entity` (a file path, module, or concept), or a structural overview with neither
205
214
  - Call with no `project` to list the projects that have learnings in your account
206
215
  - Returns `enabled: false` with an empty list when a project has no learnings graph — not an error
207
216
 
208
217
  _Also available as the `save-learnings` prompt in clients that expose MCP prompts. Set `INFRANODUS_LEARNINGS=0` to remove these three tools from the server entirely (see [Project learnings](#project-learnings))._
209
218
 
210
- 34. **optimize_knowledge_base**
219
+ 35. **optimize_knowledge_base**
211
220
  - Structural feedback on a whole code base, document vault, or body of procedural knowledge (rules, frameworks, principles) from its digest graph (`repo-<project>-digest` / `vault-<project>-digest`) — or from a digest you write and pass as text, saved with `saveAs`
212
221
  - Diagnoses the structure (biased / focused / diversified / dispersed) and reads it for the chosen `focus` (`codebase`, `vault`, `procedural`, `general`): what dominates, which areas are under-developed (with latent-topic ideas), which clusters never connect — missing integrations, missing bridge notes, missing hand-offs between frameworks — plus AI suggestions for what to develop next
213
222
  - `compareWith` up to two other layers of the same project (e.g. digest vs structure map, docs vs code) and get what each has that the other lacks: rules without code, code without documentation, features described but not built
214
223
  - Two ways to get the digest: the assistant reads the project and writes it (the infranodus skill's **digest** build mode, or `text` + `saveAs` here), or `generate_ontology_graph` with `ontologyMode: 'procedural'` writes it server-side from an uploaded docs/structure graph
215
224
  - Pairs with the infranodus skill's build modes: full ingestion, digest, structure map, ontology
216
225
 
217
- 35. **submit_workflow_feedback**
226
+ 36. **submit_workflow_feedback**
218
227
  - Internal telemetry: after a workflow of InfraNodus calls, the assistant reports what it actually did with the output — how much it used, whether it contained anything new, whether it was the right tool, how many calls it took, concrete defects — as observations rather than a score; a rating is derived from them server-side
219
228
  - Autonomous: it never asks you anything and never surfaces in the conversation
220
229
  - The report contains short paraphrases of what you were working on (capped at 200 characters), the same policy as the prompts InfraNodus already logs; `MCPCAT_ANONYMOUS=1` skips the per-user log entirely
221
230
  - Set `INFRANODUS_FEEDBACK=0` to remove the tool (and the one-line nudge appended to workflow-ending results) from the server
222
231
 
223
- 36. **delete_statements**
232
+ 37. **delete_statements**
224
233
  - Delete statements from a graph in your own account by a filter the server resolves — exactly one of `categories` (everything uploaded under a source label: a file path, a page name, a `[[label]]` parent), `statements` (exact text), `query` (substring or `/regex/`), `before`/`after` (ISO 8601 window), `deleteAll` (empties the graph but keeps its name, URL, and settings), or `statementIds`
225
234
  - Dry run by default: returns the matched count, a sample of the statements, and a per-category breakdown; nothing is removed until the same filter is sent again with `confirm: true` — or, on clients with MCP elicitation, until you accept the form in the same call. A filter that matches nothing returns `deleted: 0` without asking
226
235
  - The per-source replace path: `delete_statements` with the source's category, then `create_knowledge_graph` to the same graph name. `deleteAll` then `create_knowledge_graph` rebuilds a graph in place
227
236
  - Irreversible, own-account only (no `userName`), never creates a graph, and the assistant is instructed never to call it on its own initiative. Set `INFRANODUS_DELETE=0` to remove the tool from the server
228
237
 
229
- 37. **update_statements**
238
+ 38. **update_statements**
230
239
  - Edit statements of a graph in your own account **in place** — content, categories, or timestamp — keeping each statement's id, date, and position (unlike deleting and re-creating it)
231
240
  - Two modes: `edits` rewrites specific statements, each named by its exact current text (`match`, e.g. from `analyze_existing_graph_by_name` with `includeStatements`) or `statementId`; or one selector (the same as `delete_statements`, with `all` instead of `deleteAll`) plus `set` (`addCategories`, `removeCategories`, `categories`, `timestamp`) and/or `replace` (`{ pattern, with }`, substring or `/regex/flags`) for bulk relabelling or a find-and-replace across the graph — renaming a `[[concept]]` or a source path everywhere
232
241
  - Dry run by default: returns the matched count and the before → after of every change; nothing is written until the same arguments are sent again with `confirm: true` — or, on clients with MCP elicitation, until you accept the form in the same call. A request that matches nothing returns `updated: 0` without asking
233
242
  - New content is capped at 1000 characters; for longer text use `delete_statements` then `create_knowledge_graph`. Irreversible (the old text survives only in the dry-run output), own-account only, never creates a graph, and the assistant is instructed never to call it on its own initiative. `INFRANODUS_DELETE=0` removes it together with `delete_statements`
234
243
 
235
- 38. **delete_graph**
244
+ 39. **delete_graph**
236
245
  - Delete one graph from your own account entirely — its statements, revisions, settings, and URL; the name becomes free again. `delete_statements` with `deleteAll` is the alternative that keeps the graph for a rebuild in place
237
246
  - Dry run by default: confirms the graph exists and reports its URL and whether it is a live graph; nothing is removed until the same `graphName` is sent again with `confirm: true`. Clients that support elicitation ask you directly and delete in the same call
238
247
  - Irreversible, own-account only (no `userName`; the graph is resolved from your API key's own graph list and the backend scopes the delete to the same user), and the assistant is instructed never to call it on its own initiative. `INFRANODUS_DELETE=0` removes it together with the other two mutation tools
@@ -572,9 +581,12 @@ Analyzes text and generates a knowledge graph.
572
581
 
573
582
  **Parameters:**
574
583
 
575
- - `text` (string, required): The text to analyze
584
+ - `text` (string): The text to analyze. Provide this, `url`, or `statements`
585
+ - `statements` (string[]): Already-separated statements, with optional parallel `categories` (string[][]) and `timestamps` (ISO 8601 strings)
586
+ - `categoriesAsNodes` (boolean, default false): Show category labels as `[[label]]` nodes. Only for large knowledge bases and Obsidian vaults where the connections between pages matter; otherwise the labels stay metadata
587
+ - `wikilinksMode` (string): How `[[wikilinks]]` become nodes — "default", "wikilinksOnly", "obsidianStyle", "parentAndConcepts", or "plainText"
576
588
  - `includeStatements` (boolean): Include original statements in response
577
- - `modifyAnalyzedText` (string): Text modification options ("none", "entities", "lemmatize")
589
+ - `modifyAnalyzedText` (string): Entity detection — "none", "detectEntities", or "extractEntitiesOnly"
578
590
 
579
591
  ### analyze_existing_graph_by_name
580
592
 
@@ -10,7 +10,7 @@
10
10
  import { brand } from "./config/brand.js";
11
11
  export const serverInstructions = `${brand.name} MCP server for knowledge graph generation and text network analysis using graph theory algorithms.
12
12
 
13
- INPUT TYPES: All analysis tools accept text (string), url (webpage or YouTube video URL — automatically transcribed), or graphName (existing ${brand.name} graph). Provide exactly one input type per call. Every tool that takes text also takes statements (array of short discrete statements — notes, records, memory items, relations) with two optional parallel arrays: categories (metadata labels, each becoming a [[label]] node on that statement) and timestamps (ISO 8601 dates for time filters and dynamic graphs). Use text/url for prose and long documents. The comparison tools take the same fields per item of their contexts array, where metadata applies only if every context uses statements.
13
+ INPUT TYPES: All analysis tools accept text (string), url (webpage or YouTube video URL — automatically transcribed), or graphName (existing ${brand.name} graph). Provide exactly one input type per call. Every tool that takes text also takes statements (array of short discrete statements — notes, records, memory items, relations) with two optional parallel arrays: categories (metadata labels stored on that statement for filtering, grouping, and later delete/update by label; they become [[label]] nodes only with categoriesAsNodes: true, which is meant for large knowledge bases and Obsidian vaults where the connections between pages are the point) and timestamps (ISO 8601 dates for time filters and dynamic graphs). Use text/url for prose and long documents. The comparison tools take the same fields per item of their contexts array, where metadata applies only if every context uses statements.
14
14
 
15
15
  ENTITY DETECTION MODES: Use modifyAnalyzedText parameter — 'none' (default, word co-occurrence graph), 'detectEntities' (mix entities and words), 'extractEntitiesOnly' (entity-only graph, best for ontologies and knowledge graphs).
16
16