# Cognee MCP MCP

> Cognee builds structured knowledge graphs from messy, unstructured data. Ingest documents and text, automatically extract relationships between concepts, and query your entire dataset using graph-aware AI reasoning, going far beyond simple keyword search.

## Overview
- **Category:** ai-frontier
- **Price:** Free
- **Tags:** knowledge-graph, unstructured-data, graph-database, ai-reasoning, data-ingestion, semantic-search

## Description

Your agent can connect to Cognee to turn raw documents and research papers into a truly organized knowledge base. Instead of just spitting back chunks of text, this MCP figures out how ideas relate to each other—who worked with whom, what concepts are foundational to others, or which events influenced subsequent findings. You first feed the system your unstructured data; then, it processes that raw material into a structured graph, mapping out every entity and relationship automatically. Once built, you can ask questions and get answers that trace connections across disparate sources. This capability is critical for deep research work, making Vinkius the central point where complex knowledge pipelines run.

## Tools

### cognee_add_data
Loads raw text or documents into the Cognee knowledge base, preparing them for graph construction.

### cognee_cognify
Processes ingested data by extracting entities and relationships to build a structured, searchable knowledge graph.

### cognee_get_insights
Retrieves specific, structured entity relationship sets to map out how concepts connect across the entire knowledge base.

### cognee_search
Answers natural language questions by querying the graph structure and combining that with semantic search results.

## Prompt Examples

**Prompt:** 
```
Add this research data to my knowledge base: 'Transformer models were introduced by Vaswani et al. in 2017 in the paper Attention Is All You Need. They use self-attention mechanisms and have become the foundation for models like GPT, BERT, and T5.'
```

**Response:** 
```
Data ingested successfully!

**[ingested]** | Dataset: default
> Transformer models were introduced by Vaswani et al. in 2017...

📎 Data added to dataset 'default'. Run cognify to process into knowledge graph.
```

**Prompt:** 
```
Process my data into a knowledge graph.
```

**Response:** 
```
Knowledge graph processing started!

**[cognify]** | Dataset: default
> Extracted entities: Transformer, Vaswani, GPT, BERT, T5, self-attention
> Relationships: introduced_by, foundation_for, uses_mechanism
> Status: processing
```

**Prompt:** 
```
What is the relationship between Transformers and GPT?
```

**Response:** 
```
Graph-aware answer:

> Transformers are the foundational architecture for GPT models. Introduced by Vaswani et al. in 2017, the Transformer architecture uses self-attention mechanisms. GPT (Generative Pre-trained Transformer) builds upon this architecture for autoregressive language modeling.

Relationships found:
- Transformer → foundation_for → GPT
- Transformer → uses → self-attention
- Transformer → introduced_by → Vaswani et al.
```

## Capabilities

### Ingest raw text
Loads documents, articles, or data streams into the MCP's knowledge storage.

### Build relationship maps
Analyzes stored data to automatically extract entities and map the connections between them.

### Query connected concepts
Retrieves answers by traversing the graph structure, showing how multiple facts relate in a single query response.

### Identify hidden links
Pulls out structured relationship sets to visualize connections across your entire knowledge pool.

### Perform advanced search
Answers natural language questions using a hybrid approach that combines graph traversal with semantic vector matching.

## Use Cases

### Analyzing historical research papers
A historian uploads several decades of academic articles. Instead of manually cross-referencing authors and theories, the agent runs `cognee_cognify` to map all relationships. The user then uses `cognee_get_insights` to discover that three seemingly unrelated concepts were actually introduced by the same person thirty years apart.

### Onboarding new technical staff
A company uploads all its internal documentation, specs, and client reports. The agent uses `cognee_add_data` followed by processing to build a single knowledge graph. New hires can then ask complex questions via the MCP, letting the system retrieve context-aware answers using `cognee_search`.

### Debugging data pipelines
An ML engineer feeds the MCP raw log files and database schemas. The agent uses `cognee_cognify` to map dependencies, allowing the engineer to pinpoint exactly which upstream data failure caused a downstream pipeline error.

## Benefits

- The `cognee_cognify` tool builds a graph that understands *how* facts connect, not just what they say. This means your agent sees the foundational links between concepts automatically.
- When you query using the `cognee_search` function, you get context-aware answers from graph traversal and semantic search combined. It’s way smarter than standard document retrieval.
- Need to see how different topics relate? Use `cognee_get_insights`. This pulls out structured entity relationships, letting you visualize hidden connections across your knowledge pool.
- The process starts simply: use the initial tool to load raw text and documents into the system. You don't have to manually clean or structure anything first.
- It tracks time too. The MCP has temporal awareness, so it can reason over facts based on when they were added or discovered.

## How It Works

The bottom line is you move from having scattered documents to having an active map of knowledge that your agent can navigate.

1. First, use the tool to ingest your raw documents or text into the knowledge base.
2. Next, run the processing step. This builds the structured graph by extracting entities and defining relationships from the ingested data.
3. Finally, query the system using a natural language question; the MCP returns context-aware answers based on traversing those defined connections.

## Frequently Asked Questions

**How do I start with cognee_add_data?**
You use `cognee_add_data` to ingest your raw files or text first. This is just the storage step; it loads the data but doesn't build any relationships yet.

**Is cognee_cognify better than standard embedding?**
Yes. Standard embeddings only capture similarity of words, while `cognee_cognify` explicitly extracts and maps entities and their defined relationships, giving you a deeper understanding of the data.

**What does cognee_search actually do?**
`cognee_search` takes your natural language question and runs it against the full graph. It doesn't just find keywords; it follows the established relationships to build a fully context-aware answer.

**Can I use cognee_get_insights on data I added yesterday?**
Yes, as long as you have already run `cognee_cognify` since adding that data. The MCP needs the relationships built into the graph before it can retrieve insights.

**What data formats can I pass to cognee_add_data?**
It handles multiple file types including raw text, PDFs, and structured documents. The tool processes the input, so you don't need to worry about manual parsing or cleaning before ingestion.

**If my data has ambiguous relationships, what does cognee_cognify do?**
It uses advanced reasoning to infer likely connections and build a draft graph. For critical or complex relationships, you should review the generated structure in the knowledge view for confirmation.

**Is the data accessed by cognee_get_insights secure and private to my account?**
Absolutely. All insights are strictly limited to the datasets associated with your API key. Your access remains isolated from other users' knowledge graphs.

**Does the search time for cognee_search increase dramatically as my graph grows?**
No, it doesn't. Because the tool combines vector similarity with targeted graph traversal, query performance stays consistent even when searching across massive, complex knowledge bases.