Ubidots MCP Server
MCP server that exposes Ubidots IoT data, entities, and aggregations for AI assistants.
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
temperaturefor deviceaws810”. - "What was the average
temperatureyesterday ofMachine ABC". - "What is the mean value of the variable
temperaturein the deviceaws810".
In this article we explore using Ubidots MCP from:
- Claude Desktop
- Anthropic API
Using Ubidots MCP server from Claude Desktop
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
- 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 existingmcpServersif present).
Replace<YOUR UBIDOTS TOKEN>with your actual token.
{
"mcpServers": {
"ubidots": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.ubidots.com/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env":{
"AUTH_HEADER": "Bearer "
}
}
}
}
Notes- If
mcpServersalready exists, add only the"ubidots"block inside it. - Keep JSON syntax valid (commas, braces).
- If
- 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.
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
npxis 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.
Using Ubidots MCP server with Anthropic API
While Claude Desktop is great for testing, it does not resemble real world scenarios, where users will want to interact with an AI agent through Slack, Whatsapp, or a web-based chat box within your Ubidots-powered application.
In such scenarios, using an AI API such as OpenAI API or Anthropic API will enable you to add the required layer of intelligence to your use case.
Here's a sample request you'd use from such an application in order to interact with both your user queries, and Ubidots MCP:
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "content-type: application/json" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: mcp-client-2025-04-04" \
-d '{
"model": "claude-3-5-sonnet-20240620",
"max_tokens": 500,
"system": "You're smart IoT assistant. If you need device data, use the attached MCP.",
"messages": [
{"role": "user", "content": "List my devices"}
],
"mcp_servers": [
{
"type": "url",
"name": "ubidots",
"url": "https://mcp.ubidots.com/mcp",
"authorization_token": "YOUR_UBIDOTS_TOKEN"
}
}
]
}'
To learn more about Anthropic MCP connector, please visit their official documentation.
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.
MCP Tools
The Ubidots MCP server provides read access to your account data and supports querying information across the following entities:
- Devices
Includes associated variables and device type.
- Variables
Access variable metadata and values.
- Device Types
Includes associated devices and organization.
- Device Groups
Includes devices, and for each device its variables and device type.
- Organizations
Read organization-level metadata.
List of statistical aggregate functions that can be queried using the MCP server
The MCP server can compute aggregated results over user variables using the following operations:
- First
- Last
- Min
- Max
- Count
- Sum
- Mean
- Standard deviation
- Percentile 25
- Percentile 50
- Percentile 75
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.” - "What’s the average temperature at which the AC is running on each floor?"
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.
Related Articles
Simulate data in Ubidots using Python
Plugins: Connect Helium with Ubidots
Plugins: Connect The Things Stack to Ubidots
Events: Manage downlink messages with LORIOT and Ubidots
Connect Teltonika TRB140 Modbus IoT Gateway to Ubidots using HTTP
相关服务器
Chronosphere
Fetch logs, metrics, traces, and events from the Chronosphere observability platform.
AWS MCP
Interact with your AWS environment using natural language to query and manage resources. Requires local AWS credentials.
Deloc
Deploy static sites and dashboards from your AI tool with one command. Get a shareable URL in seconds.
Ipify MCP Server
A remote MCP server example deployable on Cloudflare Workers that returns the client's IP address.
KYC Verification
A server for comprehensive KYC verification using the SurePass API, supporting document verification, OCR, and face verification.
Google Sheets MCP
MCP server for Google Sheets — read, write, append, and clear data in any spreadsheet using OAuth. Works with Claude Desktop and any MCP client.
Gemini Cloud Assist
An MCP Server that connects to Gemini Cloud Assist APIs, enabling you to manage and troubleshoot your Google Cloud environment using natural language.
Terrakube MCP Server
Manage Terrakube workspaces, variables, modules, and organizations.
Alpha Vantage
Access real-time and historical stock market data from the Alpha Vantage API.
Chain.Love MCP
Hosted MCP gateway that enables AI agents to discover and compare Web3 infra services (RPCs, indexing, oracles, storage, compute, dev tools, and more) across 20+ networks via a single endpoint