MCP server
What it is
The Gear MCP server lets an AI assistant (Claude, ChatGPT, Cursor, VS Code or any other MCP client) read a Gear Studio account: sites, devices and their status, live values, history and alarms. Ask it "which freezers in the Madrid warehouse have been offline since yesterday?" and the assistant finds out on its own.
It is open source (MIT license) and published as the npm package @cloudstudioiot/gear-mcp. The code is at github.com/CloudStudioIoT/gear-mcp, and the server is listed in the official MCP Registry as io.github.CloudStudioIoT/gear-mcp.
What the assistant can see
Every call to Gear carries the user's own access token. The assistant sees exactly what that user sees in Gear and nothing else: if the user only has access to one client, so does the assistant.
By default the server only reads. No tool claims devices, sends commands or changes configuration.
Tools
| Tool | What it answers |
|---|---|
list_facilities | Which sites do I have? |
list_devices | Which devices are in a site, and which are offline, silent or alarmed? |
get_device | What is a device reading right now: values with units, battery, open alarms and time of last data. |
get_endpoint_history | How a value changed between two dates: points plus min, max and average, up to 5,000. |
list_alarms | Open, closed or all alarms of a client, site, device or endpoint. |
find_devices | Where a device is, by its name, address or serial number. |
Write tools, off by default
Two more tools only appear if whoever starts the server switches them on on purpose:
| Tool | Switched on by | What it does |
|---|---|---|
claim_device | GEAR_MCP_ALLOW_CLAIM=1 | Claims a device from its manufacturer's inventory into a site, with its serial number and claim code. |
send_command | GEAR_MCP_ALLOW_COMMANDS=1 | Turns an output on, off or toggles it, or sends a custom command of the device model. It acts on real equipment. |
Even when they are on, Gear checks on every call whether the user is allowed to do it. The assistant asks for confirmation before using them.
What to ask your Gear administrator for
- An application with these API permissions: Accounts.Login, Accounts.Read, Facilities.Read, Facilities.ReadAlarms, Devices.Read and Endpoints.Read (Manager → Global → Applications).
- A user limited to the client the assistant should see.
With both you get an access token, through AdminService.LoginWithExpiration or a persistent access token.
Install
You need Node.js 20 or newer. The package runs with npx; there is nothing to install by hand. Every setup takes two variables: GEAR_URL (the address of your instance, for example https://gear.cloud.studio) and GEAR_TOKEN (the user's token).
Claude Code
claude mcp add gear \
--env GEAR_URL=https://gear.cloud.studio \
--env GEAR_TOKEN=<access token> \
-- npx -y @cloudstudioiot/gear-mcpClaude Desktop
In Settings → Developer → Edit Config, add to claude_desktop_config.json:
{
"mcpServers": {
"gear": {
"command": "npx",
"args": ["-y", "@cloudstudioiot/gear-mcp"],
"env": {
"GEAR_URL": "https://gear.cloud.studio",
"GEAR_TOKEN": "<access token>"
}
}
}
}Then restart Claude Desktop.
Cursor
The same mcpServers block as Claude Desktop, in ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project).
VS Code
In .vscode/mcp.json. VS Code asks for the token once and keeps it out of the file:
{
"inputs": [
{ "type": "promptString", "id": "gear-token", "description": "Gear access token", "password": true }
],
"servers": {
"gear": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cloudstudioiot/gear-mcp"],
"env": { "GEAR_URL": "https://gear.cloud.studio", "GEAR_TOKEN": "${input:gear-token}" }
}
}
}Other clients
Any client that starts a local MCP server over stdio works: the command is npx -y @cloudstudioiot/gear-mcp with GEAR_URL and GEAR_TOKEN in its environment.
As a shared server
A team can host one server instead of one per laptop:
GEAR_URL=https://gear.cloud.studio npx -y @cloudstudioiot/gear-mcp --http --port 3333 --host 127.0.0.1Each request carries its user's token (Authorization: Bearer <token>) and the server keeps no sessions or tokens, so two users of the same server never see each other's data. To reach it from outside the machine, put it behind HTTPS.
Cloud Studio does not host a public instance of this server.
More
- Code, changes and security reports: github.com/CloudStudioIoT/gear-mcp.
- To build your own integration on the API without an assistant: the Gear API skill and the Data Extraction APIs.
Last updated on