fleet-mcp — Claude Code MCP server: what it does, how to install
MCP server connecting AI assistants to Fleet Device Management for live osquery checks, fleet audits, and policy compliance.
claude mcp add --env FLEET_SERVER_URL=<FLEET_SERVER_URL> --env FLEET_API_TOKEN=<FLEET_API_TOKEN> --env FLEET_READONLY=<FLEET_READONLY> --env FLEET_ALLOW_SELECT_QUERIES=<FLEET_ALLOW_SELECT_QUERIES> --env FLEET_VERIFY_SSL=<FLEET_VERIFY_SSL> --transport stdio fleet-mcp -- uvx fleet-mcpWhat fleet-mcp does
This server connects an AI client to an existing Fleet Device Management installation. It exposes tools to inspect enrolled endpoints, review audit logs, and search software inventories. The assistant can dispatch live osquery statements straight to managed machines to inspect system states.
Execution relies on uvx or a local Python setup. You need a reachable Fleet URL and a valid FLEET_API_TOKEN created via the Fleet web console or fleetctl. Passing FLEET_READONLY stops configuration changes, while FLEET_ALLOW_SELECT_QUERIES permits safe data inspection. Without valid credentials or a direct route to the Fleet host, the process fails on startup.
What it helps with
- run real-time osquery queries across enrolled endpoints
- audit software inventories and track vulnerability reports
- monitor compliance against device configuration policies
- inspect host telemetry directly inside AI conversations
Example prompts for the agent
- Run an osquery SELECT query on developer workstations to inspect disk encryption status
- Check policy compliance across all devices assigned to the infrastructure team
- List installed software packages and vulnerabilities detected on host
dev-mac-01
How to install fleet-mcp
Platform CLI
claude mcp add --env FLEET_SERVER_URL=<FLEET_SERVER_URL> --env FLEET_API_TOKEN=<FLEET_API_TOKEN> --env FLEET_READONLY=<FLEET_READONLY> --env FLEET_ALLOW_SELECT_QUERIES=<FLEET_ALLOW_SELECT_QUERIES> --env FLEET_VERIFY_SSL=<FLEET_VERIFY_SSL> --transport stdio fleet-mcp -- uvx fleet-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from fleet-mcp <command>
Platform CLI
codex mcp add fleet-mcp --env FLEET_SERVER_URL=<FLEET_SERVER_URL> --env FLEET_API_TOKEN=<FLEET_API_TOKEN> --env FLEET_READONLY=<FLEET_READONLY> --env FLEET_ALLOW_SELECT_QUERIES=<FLEET_ALLOW_SELECT_QUERIES> --env FLEET_VERIFY_SSL=<FLEET_VERIFY_SSL> -- uvx fleet-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from fleet-mcp <command>
Config file
{
"mcpServers": {
"fleet-mcp": {
"command": "uvx",
"args": [
"fleet-mcp"
],
"env": {
"FLEET_SERVER_URL": "<FLEET_SERVER_URL>",
"FLEET_API_TOKEN": "<FLEET_API_TOKEN>",
"FLEET_READONLY": "<FLEET_READONLY>",
"FLEET_ALLOW_SELECT_QUERIES": "<FLEET_ALLOW_SELECT_QUERIES>",
"FLEET_VERIFY_SSL": "<FLEET_VERIFY_SSL>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from fleet-mcp <command>
Config file
{
"servers": {
"fleet-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"fleet-mcp"
],
"env": {
"FLEET_SERVER_URL": "<FLEET_SERVER_URL>",
"FLEET_API_TOKEN": "<FLEET_API_TOKEN>",
"FLEET_READONLY": "<FLEET_READONLY>",
"FLEET_ALLOW_SELECT_QUERIES": "<FLEET_ALLOW_SELECT_QUERIES>",
"FLEET_VERIFY_SSL": "<FLEET_VERIFY_SSL>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from fleet-mcp <command>
Platform CLI
gemini mcp add -e FLEET_SERVER_URL=<FLEET_SERVER_URL> -e FLEET_API_TOKEN=<FLEET_API_TOKEN> -e FLEET_READONLY=<FLEET_READONLY> -e FLEET_ALLOW_SELECT_QUERIES=<FLEET_ALLOW_SELECT_QUERIES> -e FLEET_VERIFY_SSL=<FLEET_VERIFY_SSL> fleet-mcp uvx fleet-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from fleet-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about fleet-mcp
How to install fleet-mcp in Claude Code?
Run claude mcp add fleet-mcp -e FLEET_SERVER_URL=<FLEET_SERVER_URL> -e FLEET_API_TOKEN=<FLEET_API_TOKEN> -- uvx fleet-mcp. Replace <FLEET_SERVER_URL> and <FLEET_API_TOKEN> with your deployment details.
What does fleet-mcp do?
It bridges AI assistants with Fleet Device Management over the Model Context Protocol. It allows your model to audit hosts, track vulnerabilities, and run osquery live queries.
Can I lock fleet-mcp into read-only mode?
Yes, define FLEET_READONLY=true and FLEET_ALLOW_SELECT_QUERIES=true in the environment block. This blocks mutating operations while allowing read-only SELECT queries.