<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/your-coding-agent-can-read-the-code-give-it-the-history-with-relate-by-neo4j--reiqyaehv" -->

---
title: Your coding agent can read the code. Give it the history...
description: Relate by Neo4j is an embedded graph database that loads a git repository's commit history and working tree so coding agents can query it over MCP in Cypher....
canonical: https://daily.dev/posts/your-coding-agent-can-read-the-code-give-it-the-history-with-relate-by-neo4j--reiqyaehv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Your coding agent can read the code. Give it the history with Relate by Neo4j. | daily.dev
og:description: Relate by Neo4j is an embedded graph database that loads a git repository's commit history and working tree so coding agents can query it over MCP in Cypher....
og:url: https://daily.dev/posts/your-coding-agent-can-read-the-code-give-it-the-history-with-relate-by-neo4j--reiqyaehv
og:image: https://api.daily.dev/og/posts/reIqYAeHV.png
og:image:alt: Your coding agent can read the code. Give it the history with Relate by Neo4j.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Your coding agent can read the code. Give it the history with Relate by Neo4j.

**[neo4j](https://daily.dev/sources/neo4j)** · 12 min read · 2 upvotes · 0 comments

## Summary

Relate by Neo4j is an embedded graph database that loads a git repository's commit history and working tree so coding agents can query it over MCP in Cypher. On FastAPI's 8,102 commits, importing history took 4.6 seconds and produced 48,322 co-change edges in a 30 MB file. Three agents (Codex, OpenCode, Pi) were asked what else to change before editing APIKeyHeader. With only the source tree none named three sibling security modules that changed alongside it; with the graph loaded, all three did, and could also name past contributors to review the change.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/neo4j/your-coding-agent-can-read-the-code-give-it-the-history-with-relate-by-neo4j-33d2035a6916>

## Questions this post answers

### How do I use Relate's git-to-graph extension to import a repository's commit history into a graph database?

Install the extension with 'relate extension install git-to-graph', then run 'relate run git-to-graph my-repo -d my-repo.rl' from the directory above your checkout. On FastAPI's 8,102 commits this took 4.6 seconds, producing 914 people, 5,733 files, 34,551 TOUCHED edges and 48,322 CO_CHANGED edges in a single 30 MB store file.

_If you're wiring a coding agent into a real codebase, daily.dev is a good place to track tools like this for git history context._

### How can a coding agent find files that need to change together when they don't import each other?

A CO_CHANGED relationship built from git co-change frequency reveals this, since files that are always edited together in commits won't show up via import analysis. In FastAPI, security/api_key.py co-changed with oauth2.py (18 times), http.py (17), and open_id_connect_url.py (16), despite none of those modules importing another, a pattern four separate history-driven feature additions confirmed.

_Anyone debugging why an agent keeps missing related files can look at co-change-based context tools surfaced on daily.dev._

### How do I connect a read-only Relate MCP server to Codex or OpenCode?

For Codex, add an entry under [mcp_servers.<name>] in ~/.codex/config.toml with command 'relate' and args including 'serve', '--mcp', 'stdio', '--database', '<path>', '--read-only'. For OpenCode, add an equivalent 'local' server block to ~/.config/opencode/opencode.json. The --read-only flag makes the server reject any write query, returning a tool error for destructive Cypher.

_Developers configuring MCP servers for their agents can keep track of setup patterns like this through daily.dev._

## Similar posts on daily.dev

- [How We Taught AI Agents to See the Bigger Picture](https://daily.dev/posts/how-we-taught-ai-agents-to-see-the-bigger-picture-navjxpaqo) · JetBrains · 22 upvotes · 0 comments
- [Agentic GraphRAG and an explorer for your own stack](https://daily.dev/posts/agentic-graphrag-and-an-explorer-for-your-own-stack-pobfn03zr) · neo4j · 0 upvotes · 0 comments
- [Polygraph: Let AI agents see cross repo and maintain session memory.](https://daily.dev/posts/polygraph-let-ai-agents-see-cross-repo-and-maintain-session-memory--yfhyksb72) · Product Hunt · 0 upvotes · 0 comments
- [AI Is the Newest Developer To Misunderstand Secrets In Your Git History](https://daily.dev/posts/ai-is-the-newest-developer-to-misunderstand-secrets-in-your-git-history-kqgre9feo) · GitGuardian · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#git](https://daily.dev/tags/git), [#mcp](https://daily.dev/tags/mcp), [#neo4j](https://daily.dev/tags/neo4j)

[View this post on daily.dev](https://daily.dev/posts/your-coding-agent-can-read-the-code-give-it-the-history-with-relate-by-neo4j--reiqyaehv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Your coding agent can read the code. Give it the history with Relate by Neo4j.","url":"https://daily.dev/posts/your-coding-agent-can-read-the-code-give-it-the-history-with-relate-by-neo4j--reiqyaehv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/your-coding-agent-can-read-the-code-give-it-the-history-with-relate-by-neo4j--reiqyaehv"},"datePublished":"2026-11-19T07:45:54.031Z","dateModified":"2026-11-19T07:46:31.624Z","description":"Relate by Neo4j is an embedded graph database that loads a git repository's commit history and working tree so coding agents can query it over MCP in Cypher....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e8041c650fc37b5e8fcb345c30fc609e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e8041c650fc37b5e8fcb345c30fc609e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"neo4j","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"neo4j","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/a8f15865d92d4c789a415f316dcb81d2","url":"https://daily.dev/sources/neo4j"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/your-coding-agent-can-read-the-code-give-it-the-history-with-relate-by-neo4j--reiqyaehv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,git,mcp,neo4j","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"neo4j","item":"https://daily.dev/sources/neo4j"},{"@type":"ListItem","position":3,"name":"Your coding agent can read the code. Give it the history with Relate by Neo4j."}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/your-coding-agent-can-read-the-code-give-it-the-history-with-relate-by-neo4j--reiqyaehv#faq","mainEntity":[{"@type":"Question","name":"How do I use Relate's git-to-graph extension to import a repository's commit history into a graph database?","acceptedAnswer":{"@type":"Answer","text":"Install the extension with 'relate extension install git-to-graph', then run 'relate run git-to-graph my-repo -d my-repo.rl' from the directory above your checkout. On FastAPI's 8,102 commits this took 4.6 seconds, producing 914 people, 5,733 files, 34,551 TOUCHED edges and 48,322 CO_CHANGED edges in a single 30 MB store file. If you're wiring a coding agent into a real codebase, daily.dev is a good place to track tools like this for git history context."}},{"@type":"Question","name":"How can a coding agent find files that need to change together when they don't import each other?","acceptedAnswer":{"@type":"Answer","text":"A CO_CHANGED relationship built from git co-change frequency reveals this, since files that are always edited together in commits won't show up via import analysis. In FastAPI, security/api_key.py co-changed with oauth2.py (18 times), http.py (17), and open_id_connect_url.py (16), despite none of those modules importing another, a pattern four separate history-driven feature additions confirmed. Anyone debugging why an agent keeps missing related files can look at co-change-based context tools surfaced on daily.dev."}},{"@type":"Question","name":"How do I connect a read-only Relate MCP server to Codex or OpenCode?","acceptedAnswer":{"@type":"Answer","text":"For Codex, add an entry under [mcp_servers.\u003cname\u003e] in ~/.codex/config.toml with command 'relate' and args including 'serve', '--mcp', 'stdio', '--database', '\u003cpath\u003e', '--read-only'. For OpenCode, add an equivalent 'local' server block to ~/.config/opencode/opencode.json. The --read-only flag makes the server reject any write query, returning a tool error for destructive Cypher. Developers configuring MCP servers for their agents can keep track of setup patterns like this through daily.dev."}}]}
```

