Borrowing it
Nothing to install: this file belongs to michabbb/graphiti-mcp-but-working. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/michabbb/graphiti-mcp-but-working/main/AGENTS.mdgit clone --depth 1 https://github.com/michabbb/graphiti-mcp-but-workingWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/michabbb/graphiti-mcp-but-working/agents-md)<a href="https://agentmods.dev/instructions/michabbb/graphiti-mcp-but-working/agents-md"><img src="https://agentmods.dev/badge/instructions/michabbb/graphiti-mcp-but-working/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/michabbb/graphiti-mcp-but-working/agents-md"><img src="https://agentmods.dev/badge/instructions/michabbb/graphiti-mcp-but-working/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02082 | $0.02082 |
| Opus 5.5 | $0.00833 | $0.00833 |
| Sonnet 5.5 | $0.00416 | $0.00416 |
| Haiku 4.5 | $0.00208 | $0.00208 |
Grade A, and why
graphiti-mcp-but-working AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Graphiti MCP Server - Codebase Guide for AI Agents
This document explains the modular structure of the Graphiti MCP Server codebase to help AI agents navigate and understand the code organization.
Overview
The Graphiti MCP Server exposes Graphiti (a knowledge graph memory service for AI agents) through the Model Context Protocol (MCP). The codebase has been refactored from a single monolithic file into a well-organized Python package with focused modules.
Entry Points
There are two ways to run the server:
# As a Python package (recommended)
python -m graphiti_mcp_server [options]
# Legacy wrapper script
python run_server.py [options]
Both entry points call graphiti_mcp_server.main:main().
Important: The wrapper script is named run_server.py (not graphiti_mcp_server.py) to avoid name conflicts with the package directory.
Package Structure
graphiti_mcp_server/
├── __init__.py # Package exports
├── __main__.py # Entry point for `python -m graphiti_mcp_server`
├── main.py # CLI parsing, server startup, signal handling
│
├── config/ # Configuration classes
│ ├── __init__.py # Exports all config classes
│ ├── settings.py # Global constants (DEFAULT_LLM_MODEL, SEMAPHORE_LIMIT, etc.)
│ ├── llm.py # GraphitiLLMConfig - LLM client configuration
│ ├── embedder.py # GraphitiEmbedderConfig - Embedding configuration
│ ├── neo4j.py # Neo4jConfig - Database connection settings
│ ├── redis.py # RedisConfig - Queue connection settings
│ └── graphiti.py # GraphitiConfig, MCPConfig - Main configuration classes
│
├── models/ # Data models and type definitions
│ ├── __init__.py # Exports all models
│ ├── entities.py # Pydantic models: Requirement, Preference, Procedure, ENTITY_TYPES
│ ├── responses.py # TypedDict definitions for API responses
│ └── queue.py # QueuedEpisode model for Redis queue
│
├── auth/ # Authentication and authorization
│ ├── __init__.py # Exports auth components
│ ├── nonce.py # Nonce token validation (ALLOWED_NONCE_TOKENS, is_nonce_valid)
│ ├── principal.py # Principal authentication (get_authenticated_principal)
│ └── middleware.py # AuthenticationMiddleware - ASGI middleware for auth
│
├── group_id/ # Group ID management
│ ├── __init__.py # Exports context functions
│ └── context.py # Context variable functions for group_id allowlisting
│ # (get_allowed_group_ids, get_effective_group_id, etc.)
│
├── queue/ # Redis-based episode queue
│ ├── __init__.py # Exports queue components
│ ├── state.py # Global state variables (redis_client, queue_manager, etc.)
│ ├── manager.py # RedisQueueManager class - queue operations
│ ├── worker.py # process_episode_queue - background worker
│ └── init.py # initialize_redis, shutdown_redis functions
│
├── client/ # Graphiti client management
│ ├── __init__.py # Exports client functions
│ └── graphiti.py # Graphiti client initialization and singleton access
│ # (get_graphiti_client, initialize_graphiti, etc.)
│
├── tools/ # MCP Tool implementations (11 tools)
│ ├── __init__.py # Exports all tools
│ ├── memory.py # add_memory - Add episodes to the knowledge graph
│ ├── search.py # search_memory_nodes, search_memory_facts
│ ├── episodes.py # get_episodes, delete_episode
│ ├── edges.py # get_entity_edge, delete_entity_edge
│ ├── groups.py # list_group_ids, delete_everything_by_group_id
│ ├── queue_status.py # get_queue_status - Monitor processing queues
│ └── admin.py # clear_graph - Administrative operations
│
├── resources/ # MCP Resources
│ ├── __init__.py # Exports resources
│ └── status.py # get_status - Server and Neo4j connection status
│
└── utils/ # Utility functions
├── __init__.py # Exports utilities
└── formatters.py # format_fact_result - Format EntityEdge for output
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 212 lines · 2,082 tokens per session scan A fea65cfc9139
graphiti-mcp-but-working AGENTS.md is an instructions file published in the GitHub repository michabbb/graphiti-mcp-but-working (10 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 2,082 tokens to every session, about $0.0083 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
graphiti-mcp-but-working AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| graphiti-mcp-but-working AGENTS.mdmichabbb/graphiti-mcp-but-working | Instructions file | 10 | 5mo ago | Apache-2.0 | A | 2,082 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| vscode ai-customization.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 1,907 | GitHub Copilot |