core-agent-ide/codex-rs/core
Gabriel Peal 40fba1bb4c
[MCP] Add support for resources (#5239)
This PR adds support for [MCP
resources](https://modelcontextprotocol.io/specification/2025-06-18/server/resources)
by adding three new tools for the model:
1. `list_resources`
2. `list_resource_templates`
3. `read_resource`

These 3 tools correspond to the [three primary MCP resource protocol
messages](https://modelcontextprotocol.io/specification/2025-06-18/server/resources#protocol-messages).

Example of listing and reading a GitHub resource tempalte
<img width="2984" height="804" alt="CleanShot 2025-10-15 at 17 31 10"
src="https://github.com/user-attachments/assets/89b7f215-2e2a-41c5-90dd-b932ac84a585"
/>

`/mcp` with Figma configured
<img width="2984" height="442" alt="CleanShot 2025-10-15 at 18 29 35"
src="https://github.com/user-attachments/assets/a7578080-2ed2-4c59-b9b4-d8461f90d8ee"
/>

Fixes #4956
2025-10-17 01:05:15 -04:00
..
src [MCP] Add support for resources (#5239) 2025-10-17 01:05:15 -04:00
templates/compact feat: context compaction (#3446) 2025-09-12 13:07:10 -07:00
tests [MCP] Add support for resources (#5239) 2025-10-17 01:05:15 -04:00
Cargo.toml Simplify parallel (#4829) 2025-10-07 10:12:38 -07:00
gpt_5_codex_prompt.md feat: instruct model to use apply_patch + avoid destructive changes (#4742) 2025-10-04 12:49:50 -07:00
prompt.md Add file reference guidelines to gpt-5 prompt (#3651) 2025-09-15 08:35:30 -07:00
README.md add codex sandbox {linux|macos} (#4782) 2025-10-05 15:51:57 -07:00
review_prompt.md Review Mode (Core) (#3401) 2025-09-12 23:25:10 +00:00

codex-core

This crate implements the business logic for Codex. It is designed to be used by the various Codex UIs written in Rust.

Dependencies

Note that codex-core makes some assumptions about certain helper utilities being available in the environment. Currently, this

macOS

Expects /usr/bin/sandbox-exec to be present.

Linux

Expects the binary containing codex-core to run the equivalent of codex sandbox linux (legacy alias: codex debug landlock) when arg0 is codex-linux-sandbox. See the codex-arg0 crate for details.

All Platforms

Expects the binary containing codex-core to simulate the virtual apply_patch CLI when arg1 is --codex-run-as-apply-patch. See the codex-arg0 crate for details.