# MCP Server (/docs/ai/mcp)



Trackee includes a local Model Context Protocol (MCP) server. It communicates with an AI client through standard input and standard output.

## Current tool [#current-tool]

| Tool         | Purpose                                   | Authentication |
| ------------ | ----------------------------------------- | -------------- |
| `api_health` | Check whether the Trackee API is healthy. | None           |

The tool calls `GET /health`. It does not read or change organization data.

## Start Trackee [#start-trackee]

Start the API:

```bash
pnpm --filter @trackee/api dev
```

In a second terminal, start the MCP server:

```bash
TRACKEE_API_URL=http://localhost:3001 \
  pnpm --filter @trackee/mcp dev
```

## Connect an AI client [#connect-an-ai-client]

Build the MCP package:

```bash
pnpm --filter @trackee/mcp build
```

Add this stdio server entry to the AI client's MCP configuration. Replace the example repository path with the absolute path on your computer.

```json title="MCP client configuration"
{
  "mcpServers": {
    "trackee": {
      "command": "node",
      "args": ["/absolute/path/to/trackee/apps/mcp/dist/index.js"],
      "env": {
        "TRACKEE_API_URL": "http://localhost:3001"
      }
    }
  }
}
```

Restart the AI client after you save the configuration.

## Test the connection [#test-the-connection]

Ask the AI client:

> Check whether the Trackee API is healthy.

A healthy response contains:

```json
{
  "service": "api",
  "status": "ok"
}
```
