# aspire agent init command

## Name

`aspire agent init` - Initialize <abbr title="Model Context Protocol" data-tooltip-placement="top">MCP</abbr> server configuration for detected agent environments.

## Synopsis

```bash title="Aspire CLI"
aspire agent init [options]
```

<AsciinemaPlayer src="/casts/agent-init.cast" poster="npt:0:02" rows={15} loop={false} />

## Description

The `aspire agent init` command initializes the MCP (Model Context Protocol) server configuration for your development environment. It detects agent environments (such as VS Code with GitHub Copilot, or other MCP-compatible tools) and creates the necessary configuration files to enable MCP integration.

The command performs the following:

- Detects supported agent environments in the current workspace
- Creates or updates MCP configuration files for each detected environment
- Sets up the connection between the agent and the Aspire MCP server

## Options

The following options are available:

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-log-level.md" />

- <Include relativePath="reference/cli/includes/option-non-interactive.md" />

- <Include relativePath="reference/cli/includes/option-nologo.md" />

- <Include relativePath="reference/cli/includes/option-banner.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- Initialize MCP configuration for detected agent environments:

  ```bash title="Aspire CLI"
  aspire agent init
  ```

## See also

- [aspire agent command](../aspire-agent/)
- [aspire agent mcp command](../aspire-agent-mcp/)