Overview
The Model Context Protocol (MCP) lets AI applications securely connect to external APIs. In IoT projects, that means your AI application can automatically decide whether it needs to call Ubidots API in order to reply to a user prompt.
Examples:
“Which devices are offline?”
“Show the last values of
temperature
for deviceaws810
.”"What was the average
temperature
yesterday ofMachine ABC
"
In this tutorial we’ll use Claude Desktop as the MCP client, but the Ubidots MCP Server works with any MCP-compatible client.
Prerequisites
A Ubidots account and Ubidots API token (scoped for the org you want to use).
Claude Desktop installed (macOS/Windows/Linux).
Step-by-Step Guide
Open Claude Desktop Settings
Launch Claude Desktop → Settings → Developer.Edit Config
Click Edit config to openclaude_desktop_config.json
.Add the Ubidots MCP server entry
Paste the snippet below into the JSON (merge with your existingmcpServers
if present).
Replace<YOUR UBIDOTS TOKEN>
with your actual token.{
"mcpServers":
{
"ubidots":
{
"command": "npx",
"args": [ "mcp-remote", "https://mcp.ubidots.com/mcp", "--header", "x-auth-token: <YOUR UBIDOTS TOKEN>"
]
}
}
}Notes
If
mcpServers
already exists, add only the"ubidots"
block inside it.Keep JSON syntax valid (commas, braces).
Save & Reload Claude
Save the file and restart Claude Desktop (or use “Reload” if available).Verify the connection
In a new Claude chat, make sure the MCP is enabled and try this:“Which devices are online?"
If configured correctly, Claude should confirm the MCP tool is available and return live data from Ubidots.
Security & Best Practices
Token scope: Use the least-privileged token needed for your tasks.
Rotation: Rotate tokens periodically; update the header in the config when you do.
Storage: Your token lives in the local Claude config. Treat that file like a secret.
Org boundaries: If you work across multiple organizations, consider separate tokens.
Troubleshooting
Claude doesn’t show the Ubidots tool
Restart Claude after editing the config.
Check JSON validity (use an online JSON linter if needed).
Ensure
npx
is available in your system PATH.
401 / Unauthorized
Verify the header is exactly:
x-auth-token: <YOUR UBIDOTS TOKEN>
.Check the token hasn’t expired or been revoked.
Network errors
Confirm you’re online and not behind a proxy/firewall blocking outbound HTTPS.
Try again later in case of transient network issues.
Multiple MCP servers configured
Make sure there are no duplicate keys named
ubidots
.If you renamed the server, remember the name you’ll see inside Claude will match that key.
Updating or Removing the Integration
Update token: Open
claude_desktop_config.json
, replace the token in the header, save, and reload Claude.Disable: Remove or comment out the
"ubidots"
block undermcpServers
, save, and reload Claude.
FAQ
Does this work with other MCP clients?
Yes. Any MCP-compatible client can connect to https://mcp.ubidots.com/mcp
using the same x-auth-token
header.
Is the server local?
No. The Ubidots MCP Server is cloud-hosted; saving you the need to run it locally, and enabling applications such as Whatsapp AI bots.
Can I use multiple Ubidots accounts?
Yes—create separate entries (e.g., ubidots-prod
, ubidots-staging
) with different tokens.
Example Prompts to Get You Started
“List organizations and show device counts for each.”
“For device
aws810
, list variables and show last timestamps and values.”
If you run into issues or have feature requests for the Ubidots MCP Server, let us know what client you’re using, your OS, and a redacted copy of your mcpServers
config so we can help faster.