---
title: reed mcp generate
description: Generate an MCP server from a configured OpenAPI spec.
---

```sh
reed mcp generate [--dir <path>] [--spec <name>] [--out <path>]
```

Generates a bare-HTTP MCP server source tree from one of your configured API specs.

**Prerequisites:** an `mcp.<spec>` block in `docs.json`. See
[API and generation](/docs/reference/docs-json/api).

## Options

<ParamField name="--dir" type="path">
  Project root. Defaults to the current directory.
</ParamField>

<ParamField name="--spec" type="string">
  Generate for one configured spec. Omit to generate every configured `mcp.<spec>` entry.
</ParamField>

<ParamField name="--out" type="path">
  Overrides the configured `output` directory.
</ParamField>

`generate` is the only subcommand; anything else is rejected with a message naming what
was expected.

## The output is yours

The generated server is written **into your repository**, as source you own, commit and
deploy on your own terms. Reed does not host an MCP endpoint on your behalf, and the built
documentation site contains no link to a live endpoint — there is no such endpoint in
Reed's architecture to link to.

This is the same principle as the static site: the artifact is yours, and it keeps working
independently of Reed.

## Relationship to the site

`mcp` config affects generation only. Adding it changes nothing about the rendered
documentation, and running `generate` does not require a build.
