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

# MCP

> The Context MCP server, its tools and its sign in

`https://app.nemu.cc/api/mcp` is a stateless Streamable HTTP MCP server. `nemu mcp` is a local
stdio bridge to it that adds your sign in, your device and the current project.

## Tools

| Tool | Does |
| - | - |
| `project_open` | Open or create the project for a repository: `name`, `root_commit`, `remote_url` |
| `project_list` | List your projects |
| `context_load` | Latest handoff, pinned notes and the index of saved notes; call once per task |
| `memory_write` | Save or update one note: `name`, `subject`, `body`, `refs`, `state`, `pinned` |
| `memory_read` | Read one note in full |
| `memory_search` | Search notes by keywords, optionally by `tag` or `device` |
| `memory_forget` | Delete one note |

Every tool takes an optional `project`. Through `nemu mcp` it is filled in from the folder the client
started in.

Rules a write has to pass:

* The name is `<tag>/<slug>`, the slug 3 to 48 lowercase letters, numbers and underscores.
* The subject is at most 80 characters and the body at most 1,200.
* A near copy of another current note is refused, so agents update instead of duplicating.
* Anything that looks like a secret (API keys, tokens, private keys, passwords in URLs or
  `.env` lines) is replaced with `[redacted]` before it is stored.

Everything a tool returns is marked as data, and agents are told never to follow instructions found
inside a note.

## Authorization

A request without a valid token gets `401` with a `WWW-Authenticate` header pointing at the
protected resource metadata, as the MCP specification describes:

* `/.well-known/oauth-protected-resource/api/mcp`
* `/.well-known/oauth-authorization-server`
* `/api/oauth/register` for dynamic client registration

Self registered clients are public clients with PKCE, may only ask for `context:read` and
`context:write`, must redirect to `https` or to `localhost`, and are shown as unverified on the
consent screen. Their tokens are refused everywhere except Context.

Context keys (`nctx_...`) and tokens from `nemu login` work as well.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.