# MCP Server

> Give AI agents Elide's build, run and Insights tools over the Model Context Protocol.

```bash
elide mcp
elide mcp --mode http --host localhost --port 8125
```

`--mode` is `stdio` (default) or `http` (default address `localhost:8125`). Start it in a project directory, or pass
`--project PATH`.

## Client config

```json
{
  "mcpServers": {
    "elide": { "command": "elide", "args": ["mcp"] }
  }
}
```

## Tools

| Tool | Does |
| --- | --- |
| `build/inspect` | List the project's build tasks and their options without running them. |
| `build/run` | Start a build in the background and return a `buildId`. |
| `build/status` | Report the state of a build by `buildId`. |
| `build/cancel` | Cancel a running build. |
| `run/file` | Run a file in any supported language. |
| `run/snippet` | Run inline code in any supported language. |
| `insight/run` | Run a script with an [Insights](https://elide.help/docs/api-insight) script attached and return its events. |
| `elide` | Run any `elide` command. |

## Resources

| URI | Contains |
| --- | --- |
| `elide://advice/builtin` | Common commands and behavior. |
| `elide://insights/api` | TypeScript definitions for the Insights API. |
| The project's `elide.pkl` | The project manifest. |
