Eunomia
AGENTS.md9 starsChanged 37 days agoMITView on GitHub
Eunomia is an MCP server (Streamable HTTP) at http://localhost:8001/mcp (also proxied at http://localhost:3000/mcp). The backend port listens on this machine only; agents on other machines use the frontend URL, e.g. https://eunomia.example.com/mcp (see deployment). It exposes the same tools the in-app chat uses. Every call is scoped to the token's user and logged in the audit log if it changes anything. The installer does this for you. To do it again, or for an agent you install later: - Each agent…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- frontend/AGENTS.mdAGENTS.md
- frontend/CLAUDE.mdCLAUDE.md
The file
We split this agents.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 70
Add to ~/.codex/config.toml (the Codex CLI, IDE extension and app share it):
- Very specific: line 84
Check it with codex mcp list, then /mcp in a new Codex session.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI agents & MCP
Eunomia is an MCP server (Streamable HTTP) at http://localhost:8001/mcp
(also proxied at http://localhost:3000/mcp). The backend port listens on this machine only; agents on other machines use the frontend URL, e.g. https://eunomia.example.com/mcp (see deployment). It exposes the same tools the
in-app chat uses. Every call is scoped to the token's user and logged in the
audit log if it changes anything.
Connecting agents
The installer does this for you. To do it again, or for an agent you install later:
cd eunomia
./scripts/connect-agents.sh --email you@example.com --password '…' # every agent
./scripts/connect-agents.sh --token <token> --agents claude,codex # an existing token| Agent | Config written |
| Claude Code | ~/.claude.json → mcpServers.eunomia |
| Codex | ~/.codex/config.toml → [mcp_servers.eunomia] |
| Hermes | ~/.hermes/config.yaml → mcp_servers.eunomia |
| Gemini CLI | ~/.gemini/settings.json |
| Cursor | ~/.cursor/mcp.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| OpenCode | ~/.config/opencode/opencode.json |
| VS Code | …/Code/User/mcp.json → servers.eunomia |
| Claude Desktop | …/Claude/claude_desktop_config.json (through npx mcp-remote, needs Node) |
- Each agent gets its own token (Settings → API tokens, named after it), so you can revoke one without touching the others. Re-running replaces the entry and revokes the old token.
- Configs for agents you haven't installed yet are written too, so they're
connected the first time they run (
--detected-onlyturns that off). - Other settings in those files are preserved. A file the script can't
parse, or one with its own hand-written
eunomiaentry, is left untouched and reported. - ChatGPT and Claude.ai (web/desktop) need a public
https://URL. Add them by hand (below).
Connecting one agent by hand
The onboarding wizard's Connect your AI step, and the Connect an MCP
client card on the dashboard, do this for you: pick the client, generate a
token named after it, and copy the command or config with your URL and token
already filled in. The steps it shows are these. Use the address you open
Eunomia at, plus /mcp (for example http://localhost:3000/mcp, or
https://eunomia.example.com/mcp). A localhost or LAN address only works
for agents on that computer or network. Agents learn when to recall and what
to remember from the server itself, so there is nothing else to install.
Claude Code
claude mcp add --transport http --scope user eunomia https://eunomia.example.com/mcp \
--header "Authorization: Bearer <token>"--scope user makes it available in every project (the default, local, is
the current project only). Check it with claude mcp list (eunomia shows
✔ Connected), restart any open session, and /mcp inside Claude Code lists
it. To sign in with OAuth instead of a token, leave out --header, then run
/mcp in a session (or claude mcp login eunomia) and approve the consent
page; see OAuth. Use one or the other:
with a header set, Claude Code doesn't fall back to OAuth.
Codex
Add to ~/.codex/config.toml (the Codex CLI, IDE extension and app share it):
[mcp_servers.eunomia]
url = "https://eunomia.example.com/mcp"
http_headers = { Authorization = "Bearer <token>" }To keep the token out of the file, use
bearer_token_env_var = "EUNOMIA_TOKEN" instead of http_headers and export
EUNOMIA_TOKEN where Codex runs, or add it from the shell with
codex mcp add eunomia --url https://eunomia.example.com/mcp --bearer-token-env-var EUNOMIA_TOKEN.
A raw bearer_token key is rejected for HTTP servers. For OAuth, run
codex mcp add eunomia --url … with no token and codex mcp login eunomia.
Check it with codex mcp list, then /mcp in a new Codex session.
ChatGPT
ChatGPT connects from OpenAI's servers, so Eunomia needs a public https://
address (Settings → HTTPS, or a tunnel), and PUBLIC_URL must be that address
(the HTTPS setup sets it). A localhost or LAN install can't be reached.
- In ChatGPT on the web, open chatgpt.com/plugins, choose +, then Add custom MCP server.
- Name it Eunomia, enter the server URL including
/mcp, and set authentication to OAuth (ChatGPT has no option for a pasted bearer token; it registers itself with Eunomia's OAuth server). - Select I understand and want to continue, then Create as a plugin, and approve access on Eunomia's consent page.
- Install it from your personal plugins, then in a chat type
@and pick Eunomia.
Custom MCP servers depend on your ChatGPT plan and workspace policy: OpenAI
lists Business, Enterprise and Edu with full (read and write) access, and Pro
with read-only tools, which can recall but not save. Sources:
OpenAI: connect ChatGPT,
developer mode and MCP apps.
The memory skill
The Memory skill page (sidebar) holds the instructions that tell agents when to recall and what to remember. You can view it, edit it, or reset it to the built-in default. It reaches agents three ways:
- Every MCP client gets it as the server's connection instructions, so an edit applies the next time the agent connects.
- Claude Code, Codex, Hermes get a
skills/eunomia-memory/SKILL.md(re-runconnect-agents.shto refresh the file copies). - Claude Code also gets two hooks in
~/.claude/settings.json:SessionStartinjects your current skill, andUserPromptSubmitcallsrecallwith each prompt and injects the relevant memories before Claude sees it. The hooks are silent and never block a prompt if Eunomia is down.
By hand, for any MCP client: URL http://localhost:8001/mcp, header
Authorization: Bearer <token>. Create a token in Settings → API tokens.
This is the fallback that works with every client.
Sign in with OAuth (no pasted token)
MCP clients that support OAuth (Claude Code, Cursor, and others following the MCP authorization spec, revision 2026-07-28) need only the URL:
claude mcp add --transport http eunomia http://localhost:8001/mcpThe client discovers Eunomia's authorization server, opens your browser, and shows a consent page: who is asking, where you return to afterwards, and what it may do (read memory, write memory, manage vaults, manage sources). Allow it and the client holds a 15-minute access token plus a refresh token it rotates on its own. Nothing is pasted.
- Manage apps: Settings → Connected apps lists every app you approved. Disconnecting one revokes its tokens immediately.
- Scopes:
memory:read,memory:write,vaults:admin,connectors. A token that only hasmemory:readis refused (HTTP 403,insufficient_scope) when it calls a tool that writes. The default request is read plus write. - Bound to this server: tokens are issued for the MCP URL only, work on
/mcponly, and are rejected anywhere else. - Public URL: set
PUBLIC_URL(defaulthttp://localhost:8001) to the address clients reach Eunomia at, with no trailing slash. It becomes the token audience and the base of the discovery documents, so set it tohttps://eunomia.example.comwhen you put Eunomia behind a domain. Behind the frontend on port 3000, usehttp://localhost:3000;/.well-known/*and/oauth/*are proxied there too. Changing it invalidates existing tokens. - Client registration: clients identified by an HTTPS metadata URL (Client
ID Metadata Documents) work without registering; older clients register
through
/oauth/register. Eunomia fetches metadata documents only from public HTTPS hosts. A self-hosted install with no internet access can still use clients that register dynamically. - Discovery:
/.well-known/oauth-protected-resourceand/.well-known/oauth-authorization-server. An unauthenticated/mcpcall answers401with aWWW-Authenticate: Bearer resource_metadata="..."header pointing at the first. - Not supported: confidential clients (client secrets), the implicit and
password grants,
plainPKCE.
Do I need an OpenAI key?
No. The connected agent is the model.
| Without a key | With a key (recommended to save tokens) |
recall: keyword + full-text over memories + graph + recency | adds semantic (embedding) search |
reflect returns the numbered memories; your agent writes the answer | Eunomia writes the cited answer |
consolidate_observations: your agent writes the belief with memory_write type observation | Eunomia synthesizes it |
| Vector cloud uses a lexical (word) space | Real embedding space |
| In-app Chat is off | In-app Chat works |
Tools
| Tool | Does |
docs | Read these docs. No args lists them, topic reads one |
recall | Best memories and records for a question, within a token budget |
reflect | Cited answer from recalled memories (or the memories, without a key) |
search / get / list / links | Raw synced records from connectors |
memory_write | Remember a fact (world, experience) or set an entity's observation |
memory_update / memory_delete | Edit or delete one memory |
entities_search / entities_get / entities_graph | Find and read people, orgs, places, code and custom kinds |
entity_types | The built-in entity kinds and the custom kinds agents created (any new lowercase subject_kind creates one) |
entity_update / entity_merge / entity_delete | Edit, de-duplicate, delete entities |
code_entity_upsert / code_relate | Map repositories, files, symbols and their relations |
consolidate_observations | Fold new facts into each entity's belief |
vault_list / vault_create / vault_clone / vault_merge | Manage vaults (separate scopes for projects, clients, teams, …); merge two into a new one. Any tool's vault_id also accepts a vault's name |
vault_invite / vault_members / vault_remove_member / vault_leave / vault_rename / vault_delete | Sharing |
document_upload / document_list / document_get | Upload a document (text, Markdown, JSON, CSV, text PDF) and read its extracted text; its passages are found by search, recall and get, each hit naming the document (documents) |
document_download / document_export / document_delete | The HTTP route for the original bytes, the passages-and-vectors manifest, deletion |
Destructive tools are flagged destructiveHint so clients can ask first.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

