Overview
Use the Codex CLI to build a small local service that saves notes, reports and other files from coding agents as Markdown, indexes them, and exposes them back to agents through an MCP server.
Problem or Objective
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Codex CLI
- Prerequisites
- A computer that can run the Codex CLI, a ChatGPT plan that includes Codex, and the language runtime you choose.
How It Works
Decide what the store must hold: plans, reports, logs and notes that agents write during their work, saved as plain Markdown files in folders you choose. Install the Codex CLI and start it in an empty project folder. Ask it to propose a short design first: a local web API, Markdown files on disk, a small index for search and tags, per-agent tokens, and a stdio MCP server so agents can read and save notes. Review the plan, then build one piece per session, asking Codex to write tests and run them each time. Keep a short plan file in the repository that every new session reads first, and review each diff before you commit. The open-source backend linked here is a working example of this kind of service to compare against.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Codex CLI.
- Connect the toolsConnect the tools this workflow relies on: Codex CLI.
- Check the prerequisitesA computer that can run the Codex CLI, a ChatGPT plan that includes Codex, and the language runtime you choose.
- Gather your detailsCollect what the prompt asks for: Programming language, Where notes are saved, What to index for search, Part to build in this session.
- Run the starter promptPaste the starter prompt below into Codex CLI and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at github.com before you rely on it.
Practical Starter Prompt: Plan and build a local store for agent files
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
We are building a local service in [Programming language] that stores files written by coding agents as Markdown under [Where notes are saved]. It needs: a local REST API, a search index for [What to index for search], per-agent API tokens, and a stdio MCP server with tools to list, read and save notes. First write a short plan and wait for my review. Then build only [Part to build in this session], add tests, run them, and show me the diff before committing. Do not install global packages or touch files outside this project.Review the plan before building, and review each diff and test run before committing.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. OpenAI documents the Codex CLI as a coding agent that runs locally and says Codex is included on ChatGPT plans with usage limits. The linked example README describes a local service that stores notes as Markdown and offers an MCP server for agents, but it does not say how it was built, and the quality of what Codex produces for you depends on your review and tests.
Limitations and Considerations
Codex is included on ChatGPT plans, including Free and Go, with usage limits that vary by plan; a multi-session build can use a lot of that allowance. Agent tokens and the MCP server give agents write access to your notes, so keep the service on your own computer unless you add proper authentication. The example backend is licensed under GPL-3.0; check what that means before you copy code from it. Review every diff and run the tests yourself before you rely on the service. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
Original Implementation
The code published by the people behind this use case.
AI Agent Repository
Source code of the agent that does the work.
Related Videos
About openai/codex
Meet the New Codex CLI (opens in a new tab)
Published by the project’s official channel.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- openai/codex README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:59 UTC
What this source supports
- Codex CLI is a coding agent from OpenAI that runs locally on your computer.
- Using Codex with your ChatGPT plan | OpenAI Help Center (opens in a new tab)
Project documentation · help.openai.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Codex is included across ChatGPT plans, including Free and Go. Usage limits vary by plan.
- Mianotes/mianotes-web-service README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 27 Nov 2026, 00:12 UTC
What this source supports
- The service stores note text as Markdown on the filesystem and keeps users, folders, notes, tags and API tokens indexed in SQLite.
- It provides a stdio MCP server so compatible AI agents can use it as a local knowledge tool.
