Skip to main content
The Aigmented MCP server lets you search, navigate, and pull content from your knowledge base directly inside Claude Desktop, Cursor, LibreChat, or any MCP-compatible client. As of this release, the MCP server exposes the same data primitives that Aigmented’s internal auto-wiki uses to build content — so your external agent (Claude, Cursor, etc.) can explore the knowledge graph, pull topic-scoped card sets, and synthesize its own documents, briefs, or training materials.
The MCP package @aigmented/mcp is not yet published to npm. For now, use the source build from the repository.

Setup for Claude Desktop

Add to your claude_desktop_config.json:

Setup for Cursor

Add to Cursor’s MCP settings:

Environment variables

Available tools

Thirteen tools are exposed by the MCP server, split into four groups.

Discovery & Q&A

list_collections

List all available knowledge collections. No parameters.

search_knowledge

Semantic search over the knowledge base.

ask_question

Ask a question and get an AI-generated answer with citations.

get_card_details

Fetch full contents of a card with complete source provenance. Use this when you need to cite where information came from. Response includes:
  • card_id, title, statement, knowledge_type, importance_score
  • source_documents — array of {id, name} for every document the card was generated from
  • page_numbers — flat array of all source page numbers (across all docs; the schema doesn’t track per-doc page mapping)
  • section_context — section path inside the source document (e.g. "Chapter 3 / Vacations")
  • related_header — nearest header in the source document
  • verbatim_content — exact quote from the source, when applicable (forms, templates, legal text)
  • source_card_ids — Phase 2 intermediate cards (deeper traceability)
  • related_card_ids — up to 5 graph-derived neighbors (empty if no graph)
  • created_at, updated_at
Also kept for backwards compatibility: source_document (the first entry of source_documents plus a page_range like "12-14").

Knowledge graph navigation

These tools require that the collection has a built knowledge graph. Collections without a graph will return a 409 error with a guiding message — use retrieve_for_topic or search_knowledge instead.

describe_collection

Returns collection statistics, graph-built flag, and a preview of top clusters. Call this first to understand what’s available before running more expensive tools. Returns: { total_cards, has_graph, total_clusters, total_entities, top_clusters }.

list_clusters

Lists all knowledge graph clusters (topics / communities) in a collection. Each cluster contains: id, llm_name, llm_description, card_count, and up to 5 top_entities. Use this to get a structured view of “what topics exist in this collection”.

get_cluster

Full detail of a single cluster: cards (with 200-character previews), entities, and related clusters.

list_entities

Top entities (people, organizations, concepts) in the collection, with card counts.

get_gaps

Knowledge gaps: isolated entities (appearing in only one card with few relations) and undersized clusters. Useful for identifying coverage problems before generating content.

Content retrieval

retrieve_for_topic

The key tool for content creation. Runs the same retrieval pipeline that Aigmented’s auto-wiki uses internally: embedding search → importance filter → deduplication → Cohere reranking. Returns the most relevant cards for a given topic, ready to feed into your agent’s synthesis step. Returns cards as { card_id, title, statement, importance_score, knowledge_type }.

Card-level browsing

Use these when you want to enumerate, bulk-fetch, or explore semantic neighborhoods of individual cards — without going through the retrieval pipeline.

list_collection_cards

Flat paginated browse of all cards in a collection. No query needed. Useful for “show me what’s in this collection” overviews. Returns: { cards: [{card_id, title, statement, knowledge_type, importance_score}], total_count, offset, limit, has_more }. Statement truncated to 200 chars — call get_card_details for full content.

get_cards_batch

Fetch full details of multiple cards in one call (up to 25 IDs). Use after search_knowledge / retrieve_for_topic when you need full content of several cards — avoids N round-trips. Returns: { cards: [...], not_found: [ids] }. Find cards semantically similar to a given card. Use to build topical clusters around a single card (e.g. for quiz generation: “5 cards most related to card X”). Returns: { source_card_id, related: [{card_id, title, statement, similarity_score}] }. Does not require a graph.

Building content with MCP — a cookbook

The new tools let your agent replicate what Aigmented’s auto-wiki does internally — navigating the graph and pulling topic-scoped sources — while keeping synthesis in your agent’s hands. Some common patterns:

1. “Summarize what we know about X”

No graph needed. Works on any collection with search enabled.

2. “Generate a training section on onboarding”

3. “What people appear in our knowledge base?“

4. “Where are our knowledge gaps?“

5. “Build a quiz around this specific card”

6. “Browse all cards in a collection and pick what’s relevant”

This is the flow for an admin building a learning program — see what’s available, cherry-pick sources, assemble content.

Tips

  • Always start with describe_collection on a fresh collection. It tells your agent whether graph tools are available and gives an at-a-glance map of topics.
  • Prefer retrieve_for_topic over search_knowledge for content generation — it runs the fuller pipeline (importance filter + dedup + rerank) that produces cleaner source sets.
  • get_card_details is cheap — once your agent has a card_id from any other tool, pulling the full card is lightweight.
  • Cost note: retrieve_for_topic uses Cohere embedding + reranking (paid). Default top_k=25 is a good balance. Setting rerank=false skips the rerank if you’re cost-sensitive.

HTTP mode (LibreChat)

For LibreChat or other HTTP-based MCP clients, run the HTTP server:
This starts an HTTP server on port 3002 (configurable via MCP_PORT) with the MCP Streamable HTTP transport at /mcp.

Errors and degradation