# REST and CLI

> Calling tools without MCP, authentication, project selection and the endpoints that exist.

URL: https://mcp-docs.opennomos.com/docs/reference/rest-and-cli

The REST API and MCP are two front doors to the same tool implementations: same parameters, same results, same errors.

## Authentication

Send a bearer token on every request:

```http
Authorization: Bearer on_live_…
```

Create keys in the console (`https://tools.opennomos.com/console/keys`). The full key is shown **once** and only its hash is stored. OAuth access tokens from MCP clients work the same way. Select a project with `"project"` in the body, or the `X-OpenNomos-Project` header.

## Endpoints

Base URL: `https://service.opennomos.com`

| Method and path | Purpose |
| --- | --- |
| `GET /v1/tools` | Tools enabled for this workspace, with name, description and JSON Schema. |
| `GET /v1/tools/:name` | One tool's contract. |
| `POST /v1/tools/:name` | Call a tool with the JSON arguments as the body. Returns `{ "result": … }`. |
| `GET /v1/projects`, `POST /v1/projects` | List and create projects. |
| `GET /v1/projects/:project`, `PATCH /v1/projects/:project` | Read and update a project card. |
| `GET/POST /v1/projects/:project/memories` | List and add memories. |
| `PATCH /v1/memories/:id`, `DELETE /v1/memories/:id` | Update and forget a memory. |
| `GET /SKILL.md`, `GET /skills/growth/SKILL.md`, `GET /llms.txt` | Public, no auth: agent setup and the optional growth skill. |
| `GET /health` | Liveness. |

```sh
curl https://service.opennomos.com/v1/tools/discover_tools -X POST \
  -H "Authorization: Bearer $OPENNOMOS_API_KEY" -H "content-type: application/json" -d '{}'
```

## MCP

`POST https://mcp.opennomos.com/mcp` is stateless Streamable HTTP with JSON responses; `GET` and `DELETE` return 405 with `Allow: POST`. Discovery documents are at `/.well-known/oauth-protected-resource/mcp` and `/.well-known/oauth-authorization-server`. Existing 2025-protocol clients are supported.

## CLI

The service repository includes a small CLI (`nomos`). It reads `NOMOS_URL` and `NOMOS_API_KEY`:

```sh
nomos tools
nomos call search_signals --json '{"query":"alternatives to Notion"}'
```

<Callout type="info">
The CLI is part of the service source today and is not published as a package; TODO: publish and document installation when it is.
</Callout>

## The growth skill

An optional, separate skill at `https://service.opennomos.com/skills/growth/SKILL.md` offers exploration ideas. It never changes tool inputs or imposes a workflow. Load it only when it helps.
