Skip to main content Announcing Tool Policies: AI agent permissions down to the field Read the announcement
Live 51 Actions

Samsara MCP Server
for AI Agents

Connect your AI agent to StackOne's Samsara MCP server and give it 51 MCP tools out of the box. Auth, tool execution, and security all managed.

Samsara logo
Samsara MCP Server
Built by StackOne StackOne
DrataGPLocalyzeFlipMindtoolsScreenloop

Coverage

51 Agent Actions

Agents can read, write and delete in Samsara. Extend your agent's capabilities with custom actions.

Authentication

Agent Tool Authentication

Per-user OAuth in one call. Your Samsara MCP server gets session-scoped tokens with zero credentials stored on your infra.

Agent Auth →

Security

Agent Protection

Every Samsara tool response scanned for prompt injection in milliseconds, with 88.7% accuracy, all running on CPU.

Prompt Injection Defense →

Performance

Max Agent Context. Min Cost.

Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every Samsara call.

Tools Discovery →

What is the Samsara MCP Server?

A Samsara MCP server lets AI agents read and write Samsara data through the Model Context Protocol, Anthropic's open standard for connecting LLMs to external tools. StackOne's Samsara MCP server ships with 51 pre-built actions, fully extensible via the Connector Builder, plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.

All Samsara MCP Tools

Every StackOne action for Samsara, ready for your agent. Read, write and delete, scoped to exactly what you need.

An Address

  • Create An Address

    Creates a new address in the organization.

  • Retrieve An Address

    Retrieve an address in the connected Samsara organization (GET /addresses/{id})

  • Update An Address

    Update a specific address.

  • Delete An Address

    Delete a specific address.

A Drivers

  • Create A Driver

    Add a driver to the organization.

  • Retrieve A Driver

    Get information about a driver.

  • Update A Driver

    Update a specific driver's information.

API Generated Driver-vehicle Assignments

  • Update API Generated Driver-vehicle Assignments

    Update driver assignments that were created using the `POST fleet/driver-vehicle-assignments`.

  • Delete API Generated Driver-vehicle Assignments

    Delete driver assignments that were created using the `POST fleet/driver-vehicle-assignments` endpoint for the requested vehicle in the requested time range.

A Routes

  • Create A Route

    Create a route in the connected Samsara organization (POST /fleet/routes)

  • Update A Route

    Update a route in the connected Samsara organization (PATCH /fleet/routes/{id})

  • Delete A Route

    Delete a dispatch route and its associated stops.

A Tags

  • Create A Tag

    Create a new tag for the organization.

  • Retrieve A Tag

    Retrieve a tag in the connected Samsara organization (GET /tags/{id})

  • Update A Tag

    Partially update a tag, changing only the name, parent or member lists that are supplied

  • Delete A Tag

    Permanently deletes a tag.

A Users

  • Create A User

    Add a user to the organization.

  • Retrieve A User

    Get a specific user's information.

  • Update A User

    Update a specific user's information.

  • Delete A User

    Permanently remove a dashboard user from the Samsara organization by user ID

A Vehicles

  • Retrieve A Vehicle

    Get information about a specific vehicle.

  • Update A Vehicle

    Updates the given Vehicle object.

Other (29)

  • Create A New Driver-vehicle Assignment

    Create a new driver-vehicle assignment in the connected Samsara organization (POST /fleet/driver-vehicle-assignments)

  • Create A Hub Plan

    Create a new plan for a hub in the connected Samsara organization (POST /hub/plan)

  • List All Addresses

    Returns a list of all addresses in an organization.

  • List All Drivers

    Get all drivers in organization.

  • Get All Driver-vehicle Assignments

    Get all driver-vehicle assignments for the requested drivers or vehicles in the requested time range.

  • Get HOS Clocks

    Get the current HOS status for all drivers.

  • Get All Driver HOS Daily Logs

    Get summarized daily Hours of Service charts for the specified drivers.

  • Get HOS Logs

    Returns HOS logs between a given `startTime` and `endTime`.

  • Get All Driver HOS Violations

    Get active Hours of Service violations for the specified drivers.

  • Get Route Updates

    Subscribes to a feed of immutable, append-only updates for routes.

  • List Routes For A Specific Plan

    List routes for a specific plan in the connected Samsara organization (GET /hub/plan/routes)

  • List Hubs

    List all hubs (planners) in the connected Samsara organization (GET /hubs)

  • List Plans For A Specific Hub

    List all plans for a specific hub in the connected Samsara organization (GET /hub/plans)

  • List All Tags

    Return all of the tags for an organization.

  • Get Trips Stream

    This endpoint will return trips that have been collected for your organization based on the time parameters passed in.

  • List All User Roles

    Returns a list of all user roles in an organization.

  • List All Users

    Returns a list of all users in an organization.

  • List All Vehicles

    Returns a list of all vehicles.

  • Update The ShippingDocs Field Of An Existing Assignment

    Update the shippingDocs field of an existing assignment in the connected Samsara organization (PATCH /hos/daily-logs/log-meta-data)

  • Sign Out A Driver

    Sign out a driver from the Samsara Driver App. Requires the Samsara Platform Premier license

  • Fetch All Routes

    Fetch all routes in the connected Samsara organization (GET /fleet/routes)

  • Fetch A Route

    Retrieve a single dispatch route, including its stops and settings, by Samsara ID or external ID

  • Replace A Tag

    Update a tag with a new name and new members.

  • Locations Snapshot

    Locations snapshot in the connected Samsara organization (GET /fleet/vehicles/locations)

  • Locations Feed

    Locations feed in the connected Samsara organization (GET /fleet/vehicles/locations/feed)

  • Historical Locations

    Historical locations in the connected Samsara organization (GET /fleet/vehicles/locations/history)

  • Stats Snapshot

    Returns the last known stats of all vehicles at the given `time`.

  • Stats Feed

    Follow a feed of vehicle stats.

  • Historical Stats

    Returns vehicle stats during the given time range for all vehicles.

Set Up Your Samsara MCP Server in Minutes

One endpoint. Any framework. Your agent is talking to Samsara in under 10 lines of code.

Agent Frameworks

Claude Desktop
{
  "mcpServers": {
    "stackone": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.stackone.com/mcp?x-account-id=<account_id>",
        "--header",
        "Authorization: Basic <YOUR_BASE64_TOKEN>"
      ]
    }
  }
}

Samsara MCP Server FAQ

Does StackOne have a Samsara MCP server?
Yes. StackOne offers a hosted Samsara MCP server with 51 pre-built actions, and every action is tested and QA'd by StackOne. Connect it to Claude, Cursor, and any other MCP client, or to any agent framework through the AI Action SDK. It ships with managed agent authentication, prompt injection defense, and tool discovery with server-side execution that preserve your agent's context window and keep reasoning performance.
Samsara MCP server vs direct API integration: what's the difference?
A Samsara MCP server and direct API integration serve different use cases. Direct API integration is for software-to-software work, where backend code calls Samsara. A Samsara MCP server is for AI agents that discover and call Samsara at runtime, such as MCP clients like Claude and Cursor, plus framework agents built with OpenAI, LangChain, or Vercel AI. StackOne provides both.
How does Samsara authentication work for AI agents?
Samsara authentication for AI agents works through a StackOne Connect Session. Create one via the dashboard or the SDK to get an auth link and ready-to-paste config for Claude Desktop, Cursor, and other MCP clients. Your user authenticates their own Samsara account; StackOne handles token exchange, storage, and refresh. Credentials never reach the LLM, and each user is isolated via origin_owner_id.
Are Samsara MCP tools vulnerable to prompt injection?
Yes. Samsara MCP tools can be vulnerable to indirect prompt injection. Any tool that reads user-written content, such as documents, messages, tickets, records, or free-text fields, is a potential vector. StackOne Defender scans every tool response before it enters the agent's context. It runs regex patterns in ~1ms, then a MiniLM classifier in ~4ms. Accuracy is 88.7%, and it runs entirely on CPU.
What is the context bloat of a Samsara agent and how do I avoid it?
Context bloat happens when Samsara tool schemas and API responses eat your Samsara agent's memory, preventing it from reasoning effectively. A single Samsara query can return a massive JSON response, and connecting multiple tools compounds the problem. Tools Discovery reduces it by loading only the tools relevant to each query.
Can I limit which actions my Samsara agent can access?
Yes. You can limit which actions your Samsara agent can access directly from the StackOne dashboard. Toggle actions on or off, or restrict them to specific accounts, with no code changes to your agent. Session tokens can be scoped to exact actions so if one leaks, exposure stays contained.
Can I create custom agent actions for my Samsara MCP server?
Yes. You can create custom agent actions for your Samsara MCP server using Connector Builder. It's an integration agent your coding assistant (Claude Code, Cursor, or Copilot) can invoke to research Samsara's API, generate production-ready connector YAML, test against the live API, and validate before you ship.
When should I NOT use a Samsara MCP server?
Skip a Samsara MCP server if your integration is purely software-to-software, because direct Samsara API integration is simpler when no AI agent is involved. For deterministic, compliance-critical operations (financial transactions, regulatory reporting), direct API gives you predictable behavior without agent-driven decision-making. MCP shines when AI agents need to dynamically discover and call Samsara actions at runtime.
What AI frameworks and AI clients does the StackOne Samsara MCP server support?
The StackOne Samsara MCP server supports both. MCP clients (paste-and-go apps): Claude Desktop, Claude Code, Cursor, VS Code, Goose. Agent frameworks (code SDKs you build with): OpenAI Agents SDK, Anthropic, Vercel AI, Google ADK, CrewAI, Pydantic AI, LangChain, LangGraph, Azure AI Foundry.

Put your AI agents to work

All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.