---
title: "af mcp"
description: "Serve the forge's agent tools over MCP on standard input and output"
---

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

# af mcp

<!-- Generated by tools/gen-reference.mjs from `af mcp --help`. Change the help text in crates/atoll-forge-cli/src/main.rs, then run `npm run gen:reference`. -->

Runs a Model Context Protocol server for an AI agent. It acts as the credential's actor, with the agent's workspace in WORKSPACE.

## Usage

```text
af mcp [OPTIONS] <WORKSPACE>
```

## Arguments

- `<WORKSPACE>`

  Directory for the agent's workspace; created if missing

  The workspace's files are kept in its `files` subdirectory, next to its state.

## Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## Examples

```sh
af mcp ~/agent-workspace
```

Source: https://docs.forge.workreef.dev/reference/af/mcp/index.mdx
