Sensor Bio MCP Server

Sensor Bio MCP Server

Connects Sensor Bio wearable data to AI assistants via the Model Context Protocol, enabling queries about sleep, heart rate, activity, and other biometrics.

Category
访问服务器

README

Sensor Bio MCP Server

CI Python 3.11+ License: MIT

Connect your Sensor Bio wearable data to Claude, ChatGPT, and other AI assistants using the Model Context Protocol (MCP).

Ask your AI assistant things like "How did I sleep last week?", "What's my resting heart rate trend?", or "Show me my recovery scores for the past month" and get answers pulled directly from your Sensor Bio data.


Quick Start

1. Get your API token

Log in to your Sensor Bio developer portal and grab your Organization API Token.

2. Install uv

This server uses uv to run. Install it with one command:

Mac / Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

3. Add to Claude Desktop

Open your Claude Desktop config file:

OS Path
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json

Add (or merge into) the mcpServers section:

{
  "mcpServers": {
    "sensorbio": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/GetSensr-io/sensorbio-mcp-server",
        "sensorbio-mcp-server"
      ],
      "env": {
        "SENSR_ORG_TOKEN": "paste-your-token-here"
      }
    }
  }
}

4. Restart Claude Desktop

Quit and reopen Claude Desktop. You should see "sensorbio" in the MCP tools list (look for the hammer icon).

5. Try it out

Ask Claude something like:

"Show me my sleep data from the past week"

"How many calories did I burn yesterday?"

"List all users in my organization"


Other MCP Clients

Cursor / Windsurf

These editors support MCP servers natively. Use the same config format above in their respective MCP settings.

OpenAI (ChatGPT)

MCP support in ChatGPT is rolling out. When available, the same server and config pattern will work.

Any MCP Client

Any application that supports the Model Context Protocol can connect using this server. Just point it at:

uvx --from git+https://github.com/GetSensr-io/sensorbio-mcp-server sensorbio-mcp-server

Authentication

Method Env Vars Best For
API Token SENSR_ORG_TOKEN or SENSR_API_KEY Most users (recommended)
OAuth2 SENSR_CLIENT_ID + SENSR_CLIENT_SECRET Programmatic / advanced use

The server checks for SENSR_ORG_TOKEN first, then SENSR_API_KEY as a fallback. If neither is set, it tries OAuth2 client credentials.

OAuth2 Config (advanced)

{
  "mcpServers": {
    "sensorbio": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/GetSensr-io/sensorbio-mcp-server",
        "sensorbio-mcp-server"
      ],
      "env": {
        "SENSR_CLIENT_ID": "your-client-id",
        "SENSR_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

What You Can Ask

Once connected, your AI assistant has access to these tools:

Tool What it does Example question
list_users List all users in your organization "Show me all users"
get_user_ids Get all user IDs "How many users are in the org?"
get_user_by_email Find a user by their email address "Look up john@example.com"
get_user_profile Get a specific user's full profile "Show me Bryan's profile"
search_user Search users by name or email "Find users named Sarah"
get_sleep Sleep data: duration, score, stages "How did I sleep last week?"
get_scores Recovery, sleep, and activity scores "What's my recovery score today?"
get_activities Workouts and activity sessions "What workouts did I do this week?"
get_biometrics Heart rate, HRV, SpO2, respiratory rate "What's my resting heart rate?"
get_calories Calorie burn details "How many calories did I burn today?"
get_org_sleep_summary Sleep overview across your whole org "How did the team sleep last night?"
get_org_scores_summary Score overview across your whole org "Show me the team's recovery scores"
debug_request Raw API request (for troubleshooting) Usually not needed directly

Most tools support flexible date ranges. You can say things like "last 7 days", "March 1st to March 10th", or "yesterday" and the AI will figure out the right parameters.


Environment Variables

Variable Required Description
SENSR_ORG_TOKEN * Organization API token (recommended)
SENSR_API_KEY * Alias for SENSR_ORG_TOKEN
SENSR_CLIENT_ID ** OAuth2 client ID
SENSR_CLIENT_SECRET ** OAuth2 client secret
SENSR_SCOPE OAuth2 scope (optional)
SENSR_BASE_URL Override API base URL (default: https://api.sensorbio.com)
SENSR_TZ Timezone for "today" calculations (default: America/Chicago)

* Set one of SENSR_ORG_TOKEN or SENSR_API_KEY for token auth. ** Set both for OAuth2 auth. Token auth takes precedence if both are configured.


Troubleshooting

"Server not connecting"

  • Make sure uv is installed: run uv --version in your terminal
  • Check that your config file path is correct (see table above)
  • Make sure you restarted Claude Desktop after editing the config

"Authentication error" or "Invalid API Key"

  • Double-check your token. Copy it fresh from the developer portal.
  • Make sure there are no extra spaces or line breaks in the token
  • Tokens can expire. Generate a new one if yours is old.

"No data showing"

  • Your Sensor Bio device needs to have synced recently
  • Check that the user ID exists in your organization
  • Try asking for a specific date: "Show my sleep for March 10th"

"Tool not found"

  • Make sure the MCP server name in your config is exactly sensorbio
  • Check Claude Desktop's MCP tools list for connection status

Development

Want to contribute or run locally?

# Clone the repo
git clone https://github.com/GetSensr-io/sensorbio-mcp-server.git
cd sensorbio-mcp-server

# Install dependencies
uv sync --dev

# Run tests
uv run pytest -v

# Lint
uv run ruff check .

# Run the server locally
SENSR_ORG_TOKEN=your-token uvx --from . sensorbio-mcp-server

# Smoke test (needs a valid token)
SENSR_ORG_TOKEN=your-token uv run python scripts/smoke_test.py

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选