home / mcp / bi-temporal knowledge graph mcp server

Bi-Temporal Knowledge Graph MCP Server

Provides bi-temporal memory and time-travel queries for AI agents via a persistent knowledge graph and extensible automation tools.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "connectimtiazh-graphiti-knowledge-mcp-server-starter": {
      "url": "http://localhost:8080/sse"
    }
  }
}

You use this Bi-Temporal Knowledge Graph MCP Server to give your AI agents a persistent, time-aware memory. It tracks when facts were created and when they became true, supports historical queries, and lets you extend memory with custom automation tools. Everything runs in a single-file memory server with robust temporal storage and easy tool integration for automations and webhooks.

How to use

You connect to the MCP server from your client and start asking questions about facts and histories. The server stores facts with bi-temporal attributes and lets you perform time-travel queries like “Where did John live in 2023?” or “What was John’s job in January 2024?” You can add facts manually or extract entities from natural language input, then drive automations via custom tools mounted into the server.

How to install

Prerequisites: Docker and Docker Compose installed on your machine. You also need Python if you plan to run the local server directly, and optionally an API key for OpenAI if you enable AI entity extraction.

# Option A: Run with Docker Compose (recommended)
# 1. Start the stack
docker-compose up -d

# 2. Verify the MCP server is responding
curl http://localhost:8080/health

# 3. Connect to the API at the provided endpoint (e.g., http://localhost:8080/sse)
```

```bash
# Option B: Run locally with Python (single-file server)
# 1. Ensure Python 3.8+ is installed
# 2. Install dependencies
pip install -r requirements.txt

# 3. Start the server
python main.py
```

```bash
# Option C: One-click deployment (if you prefer a hosted environment)
# Follow the provided one-click deployment workflow to provision a local MCP-enabled instance

Configuration and access

HTTP access is available via a remote MCP URL when you run the server. A typical local run exposes the service at http://localhost:8080/sse. You can also run a local Docker Compose setup to manage FalkorDB and the MCP server together.

If you start the server with Docker Compose, you can check health and then point your MCP client at the exposed URL. If you run locally with Python, connect your client to the local endpoint once the process is up.

API Reference - Memory Tools

The server provides a set of memory-management tools to build and query a bi-temporal knowledge graph. Key operations include adding facts, extracting entities from messages, querying current and historical data, and managing sessions.

Tools you can use with the MCP server

- add_fact: Add a new bi-temporal fact to the knowledge graph, with automatic invalidation of previous related facts when appropriate.

- add_message: Add a natural language message and automatically extract entities and relationships, returning the extracted facts.

- query_facts: Retrieve facts from the knowledge graph with optional filtering and pagination.

- query_at_time: Time-travel query to fetch facts valid at a specific timestamp.

- get_episodes: Retrieve recent conversation sessions or episodes.

- clear_graph: Remove all data for specified groups (permanent deletion).

- get_status: Get server status and statistics.

- force_cleanup: Trigger cleanup of expired sessions and idle connections.

Use cases

Personal Knowledge Management: track life events and relationships with full history and quick recalls.

Customer Relationship Management: automatic conflict resolution and historical insights for client data.

AI Agent Memory: give agents persistent, queryable memory for better context across interactions.

Workflow Automation: trigger automations when facts change and coordinate actions across systems.

Troubleshooting and notes

If you run into issues starting the server, check that Docker or Python dependencies are installed correctly, verify that the endpoint URL matches your environment, and ensure you have the necessary environment keys if you enable AI-based extraction.

Security and privacy

All data stays in your environment. External services are only used if you explicitly enable features like OpenAI entity extraction or webhooks for automations.

Changelog

Initial release with bi-temporal tracking, AI-assisted entity extraction, and extensible automation tools. Future updates may include expanded temporal operators, enhanced prompts, and broader deployment options.

Available tools

add_fact

Add a new bi-temporal fact to the knowledge graph with created_at, valid_at, and optional invalid_at timestamps. Automatically invalidates previous facts of the same type when appropriate.

add_message

Add a natural language message and automatically extract entities and relationships using AI, returning the extracted facts.

query_facts

Query facts from the knowledge graph with optional filters such as entity name, group, and whether to include invalidated facts.

query_at_time

Time-travel query to fetch facts valid at a specific timestamp, enabling historical lookups.

get_episodes

Retrieve recent conversation sessions or episodes for context continuity.

clear_graph

Clear all data for specified groups with a permanent deletion warning.

get_status

Return comprehensive server status, statistics, and health indicators.

force_cleanup

Manually trigger cleanup of expired sessions and idle connections.