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 | $0.01041 | $0.01041 |
| Sonnet 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 9d 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.
- 9d 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 3mo ago), licensed Apache-2.0. It adds 2,082 tokens to every session, about $0.0104 per session on Opus 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.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.