> Graphify: shared context of codebase for agents and developers. Canonical: https://graphify.com/blog/how-to-give-codex-context-on-a-large-codebase · Full index: https://graphify.com/llms-full.txt

# How to give Codex context on a large codebase

*November 20, 2026 · Syed Fahad*

To give Codex context on a large codebase, connect it to Graphify. Install the official Graphify plugin from `/plugins` in Codex, sign in with OAuth, and ask about a repository you indexed in Graphify. Codex then calls Graphify's tools to find code, follow callers and dependencies, and check what a change reaches, instead of reading the repository file by file.

That last part is what matters on a big repository. Codex is good at reading files. The hard part is knowing which files to read, who calls the function you are about to change, and which tests cover it. Graphify answers those questions from a [code graph](/blog/what-is-a-code-graph) of your repository, so Codex starts from structure rather than from a search through folders.

## What does Codex need to know about a large codebase?

On a small project Codex can open most of the files that matter. On a large one it has to choose, and it usually chooses by name and text search. That works for finding a string. It works less well for questions about structure:

- Where does a request enter the system, and what does it pass through on the way to the database?
- Which functions call the one I am changing, and which of those live in other packages?
- Which tests exercise this code?

`AGENTS.md` is still the right place for conventions, build commands and team rules. [OpenAI's AGENTS.md guide](https://developers.openai.com/codex/guides/agents-md) covers how Codex reads it. Structure is different. It changes with every merge, so it belongs in a graph that rebuilds when you push to the default branch, not in a file someone has to keep up to date by hand.

Graphify is shared codebase context for coding agents and the people who work with them: a code graph, a Wiki, Memory and pull request reviews, with the graph underneath powering the rest. Codex reaches it through Graphify's MCP server at `https://api.graphify.com/mcp`.

## How do you connect Codex to Graphify?

You need a Graphify account and at least one repository with the status **Indexed**. Connect GitHub at [app.graphify.com](https://app.graphify.com) and indexing starts on its own.

### Install the Graphify plugin

Open `/plugins` in Codex and search for **Graphify**. Install the official plugin by Graphify Labs, select **Connect**, and finish the browser sign in. You can also open the [Graphify listing](https://chatgpt.com/plugins/plugin_asdk_app_6abe89f7f5d88191b9422522bb8562a4) and select **Install plugin**. The same plugin works in ChatGPT.

The server uses Streamable HTTP and OAuth, so there is no API key to paste and no local process to run.

### Or add the server by hand

If you prefer to keep the setup in your own config, add the server from a terminal:

```bash
codex mcp add graphify --url https://api.graphify.com/mcp
codex mcp login graphify
```

The second command opens the browser sign in. Without it the connection is unauthenticated and Graphify rejects it.

You can also put the server in `~/.codex/config.toml` for your user, or in `.codex/config.toml` for one project:

```toml
[mcp_servers.graphify]
url = "https://api.graphify.com/mcp"
auth = "oauth"
```

Then run `codex mcp login graphify`. Pick one path. Two connections show every Graphify tool twice. For more on how Codex handles MCP servers in general, see [how to add an MCP server to Codex](/blog/how-to-add-an-mcp-server-to-codex).

### Check the connection

Open a new Codex session and run `/mcp` to check that `graphify` is listed. Then paste:

```text
Use Graphify's list_repositories tool and show the repositories I can access. If the tool fails, report the error instead of guessing.
```

If you mostly work in one repository, add `?repo=owner/name` to the endpoint, for example `https://api.graphify.com/mcp?repo=Graphify-Labs/graphify`. Graphify uses that repository whenever a tool call names none.

## How do you get Codex to understand a large codebase?

Start with a map. This is the first prompt from the [Graphify for Codex](https://docs.graphify.com/integrations/codex) docs:

```text
Use Graphify to give me a map of owner/name: the main areas, how requests reach the billing service, and the files I should read first. Cite the files for each point.
```

Swap in your repository and the area you care about. Behind that prompt, Codex can reach for a few Graphify tools:

| Tool | What it gives Codex |
| --- | --- |
| `graphify_rank_files` | Indexed files ranked by relevance to a plain language question |
| `search` | Definitions whose names match a term, such as `webhook` or `ChargeHandler` |
| `graphify_find` | Where a function, class or symbol is defined across the repository |
| `graphify_node` | A symbol's definition plus its immediate neighbors in the graph |
| `graph_stats` | Node and edge counts and languages, a quick check that a repository is indexed |

A good habit is to go from broad to narrow. Ask which files matter for a question, then ask about a symbol by name:

```text
Use Graphify to rank the files in owner/name that handle webhook retries. Then show me the definition of the retry handler and what it connects to.
```

`search` and `graphify_find` match names, so give them a fragment like `charge` or `Webhook`, not a whole question. For questions in plain words, `graphify_rank_files` is the better starting point.

## How do you find the blast radius of a change in Codex?

Before you change a function, ask Codex what else it touches. The docs prompt for this is:

```text
Use Graphify's impact tool on the function that validates session tokens in owner/name. List the callers and files that could break if I change its signature.
```

These are the tools that answer it:

| Tool | What it gives Codex |
| --- | --- |
| `graphify_impact` | The callers and callees directly connected to a symbol, as a first pass at the scope of a change |
| `graphify_callers` | The indexed callers of a symbol |
| `graphify_tests_for` | Tests linked to a symbol or file in the graph |
| `graphify_trace` | Call paths from one symbol to another |

A fuller version of the prompt pulls all three steps together:

```text
I want to change parse_manifest in owner/name. Use Graphify's impact tool on it, list its callers, and find the tests linked to it. Then tell me which files to update and which tests to run.
```

`graphify_impact` can also rank the hotspot files by linked test coverage when you ask for risk, which helps decide where to look first. When you want to know how one piece of code reaches another, ask for a trace:

```text
Use Graphify to trace the call path from the checkout API handler to the function that writes the order to the database in owner/name.
```

This is the same idea as [change impact analysis with a code graph](/blog/change-impact-analysis-with-a-code-graph), run from inside Codex.

## How do you check a pull request against other repositories?

Changes rarely stay in one repository. A shared library change can reach services that live elsewhere. To ask about that, Graphify needs a [combined graph](https://docs.graphify.com/platform/graphify-mcp#query-a-repository-group) that includes those repositories. In the Graphify app, open **Graphs**, choose **Combine graphs** and pick the repositories. Then use a prompt like the one in the docs:

```text
For pull request 123 in owner/name, list the symbols it changes. Then use Graphify's impact tool on each one against our combined graph, and tell me which other repositories call them.
```

Codex works out the changed symbols, then runs `graphify_impact` on each one against the combined graph.

Graphify also reviews pull requests on its own when they are opened, reopened or marked ready for review. To read that review from Codex, ask it to run `review_status`:

```text
Use Graphify's review_status tool for pull request 123 in owner/name and summarize the top findings.
```

`review_status` reads the review's status, gate result and top findings. It does not start a new review. Commenting `@graphify review` on the pull request runs one again after new commits. [How to set up Codex code review with Graphify](/blog/codex-code-review) covers Codex's own GitHub review next to Graphify's. The [reviews docs](https://docs.graphify.com/platform/reviews) cover the rest.

## Tips for better answers

- **Name the repository.** Write `owner/name` in the prompt, or set `?repo=` on the endpoint.
- **Name the symbol.** "The function that validates session tokens" works. `validate_session_token` works better.
- **Ask for citations.** "Cite the files for each point" keeps answers tied to real source lines you can open.
- **Read each tool request.** Some Graphify tools, such as `remember`, write to workspace Memory. Approve those when you mean to.

## Can you use Graphify in Codex without the hosted app?

Yes. The open-source Graphify CLI builds a graph on your machine and adds a skill to Codex:

```bash
uv tool install graphifyy
graphify install --platform codex
```

Then select the Graphify skill from the `$` picker in Codex and enter:

```text
$graphify map the current repository
```

The graph lives in `graphify-out/` in your repository. The [Graphify skill guide](/blog/graphify-skill) walks through it. The hosted app is the better fit when a team wants the same context for every agent, along with the Wiki, Memory and pull request reviews.

## Try it

Connect a repository at [app.graphify.com](https://app.graphify.com), install the Graphify plugin from `/plugins` in Codex, and start with the map prompt above. The [Graphify for Codex](https://docs.graphify.com/integrations/codex) docs page has the full setup and troubleshooting, and the [Codex integration page](https://graphify.com/integrations/codex) has the overview.

Related reading: [what is a code graph](/blog/what-is-a-code-graph), [how to add an MCP server to Codex](/blog/how-to-add-an-mcp-server-to-codex) and [what is the Graphify skill](/blog/graphify-skill).

## FAQ

### How do I give Codex context on a large codebase?

Connect Codex to Graphify. Install the official Graphify plugin from /plugins in Codex, sign in with OAuth, and ask about a repository you indexed in Graphify. Codex then calls Graphify's tools to find code, follow callers and dependencies, and check what a change reaches, instead of reading the repository file by file.

### How do I find the blast radius of a change in Codex?

Ask Codex to run Graphify's impact tool on the symbol you plan to change. graphify_impact returns the callers and callees directly connected to it, graphify_callers lists who calls it, and graphify_tests_for finds the tests linked to it in the graph.

### Can I add Graphify to Codex without the plugin?

Yes. Run codex mcp add graphify --url https://api.graphify.com/mcp, then codex mcp login graphify to sign in. You can also add an mcp_servers.graphify table to config.toml. Use one path, because two connections show every Graphify tool twice.

### Can Codex check a pull request against other repositories with Graphify?

Yes, with a combined graph. Ask Codex to list the symbols the pull request changes and run Graphify's impact tool on each one against the combined graph. To read Graphify's own review of that pull request, ask Codex to run review_status.

### Do I need an API key to use Graphify in Codex?

No. Graphify's MCP server uses OAuth, so you sign in once in the browser and there is no key to paste.

### Can I use Graphify in Codex without the hosted app?

Yes. Install the open-source Graphify CLI with uv tool install graphifyy, run graphify install --platform codex, then select the skill in Codex and enter $graphify map the current repository. The graph stays on your machine.
