---
title: memhtml serve mcp
description: "Run the `memhtml-mcp` stdio server: 15 tools and 3 resources over this same repo."
---

## 1. Synopsis

Run the `memhtml-mcp` stdio server: 15 tools and 3 resources over this same repo.

```sh
memhtml serve mcp
```

## 2. Arguments

This command takes no positional arguments.

## 3. Flags

This command takes no flags of its own.

Every command also accepts the [global flags](/reference/global-flags/).

## 4. Response

On success the command writes one JSON envelope to stdout, and its `type` is `serve.exit`.

On failure it writes the failure envelope, whose `code` comes from [error codes](/reference/error-codes/).

[The JSON envelope](/reference/envelope/) gives the fields both shapes carry. [Response types](/reference/response-types/) lists every value `type` takes across the binary.

## 5. Further reading

The guide blocks that name this command:

* [`write-surfaces`](/reference/guide/write-surfaces/)
* [`when-to-batch`](/reference/guide/when-to-batch/)

## 6. Provenance

A loader generates this page from `apps/cli/src/commands.ts` while the site builds, so no file in the repository holds it: the `COMMANDS` array there is the one source of argument parsing, of `memhtml manifest`, and of `AGENTS.md`. Change the registry and this page changes with it.