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.
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
{
"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>"
]
}
}
}Platform Resources
Comparing BM25, TF-IDF, and Hybrid Search for MCP Tool Discovery
Benchmarking BM25, TF-IDF, and hybrid search for MCP tool discovery across 916 tools. The 80/20 TF-IDF/BM25 hybrid hits 21% Top-1 accuracy in under 1ms.
10 min
Indirect Prompt Injection Defense for MCP Tools: A Technical Guide
MCP tools that read emails, CRM records, and tickets are indirect prompt injection vectors. Here's how we built a two-tier defense that scans tool results in ~11ms.
12 min
MCP vs A2A: Architecture, Security, and When to Use Each
MCP vs A2A: what each protocol standardizes, how they differ, their shared security risks including indirect prompt injection, and when to use one, both, or a hybrid architecture.
12 min
MCP vs API: What Hundreds of Connector Builds Taught Us
MCP wraps APIs, it doesn't replace them. After building hundreds of connectors that serve both, here's when each approach wins.
14 min read
Samsara MCP Server FAQ
Does StackOne have a Samsara MCP server?
Samsara MCP server vs direct API integration: what's the difference?
How does Samsara authentication work for AI agents?
origin_owner_id.Are Samsara MCP tools vulnerable to prompt injection?
What is the context bloat of a Samsara agent and how do I avoid it?
Can I limit which actions my Samsara agent can access?
Can I create custom agent actions for my Samsara MCP server?
When should I NOT use a Samsara MCP server?
What AI frameworks and AI clients does the StackOne Samsara MCP server support?
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.