Skip to main content
Glama
ssu851009

Samsara Fleet MCP Server

by ssu851009
README.md
# Samsara Fleet MCP Server

Standalone **Model Context Protocol** server that exposes live Samsara fleet tools over **Streamable HTTP**.

`FormsAPI (MCP client) → this server → Samsara REST`

Nothing is persisted. The Samsara API token stays on this process only.

## Tools

| Tool | Purpose |
|------|---------|
| `search_assets` | Match vehicles/trailers by name, id, serial, VIN |
| `get_asset_location` | Latest GPS for a known `vehicle` or `trailer` id |

## Setup

```powershell
cd "C:\development\mcp\samsara mcp"
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .
copy .env.example .env
```

Edit `.env` and set `SAMSARA_API_TOKEN`.

## Run

```powershell
samsara-mcp
# or
python -m samsara_mcp
```

Endpoint (default): `http://127.0.0.1:8765/mcp`

Options:

```powershell
samsara-mcp --host 127.0.0.1 --port 8765
```

## FormsAPI

Point FormsAPI config at the MCP endpoint (no Samsara token in FormsAPI):

```json
"Samsara": {
  "Enabled": true,
  "McpEndpoint": "http://127.0.0.1:8765/mcp",
  "TimeoutSeconds": 60
}
```

## Out of scope

- Chat UI / OpenAI
- Writing to Samsara
- Azure Container Apps deploy (future)