@einlogic/mcp-fitbit 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/build/config.js +3 -8
- package/build/index.js +1 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,8 +23,7 @@ the Google Health API and returns its raw JSON.
|
|
|
23
23
|
## ⚠️ Breaking changes from the Fitbit version
|
|
24
24
|
|
|
25
25
|
- You must create a **Google Cloud** OAuth client (see below) and re-authorize. Old Fitbit tokens cannot be reused.
|
|
26
|
-
- Credentials are now `GOOGLE_HEALTH_CLIENT_ID` / `GOOGLE_HEALTH_CLIENT_SECRET` (the old `
|
|
27
|
-
- The token file is now `.google-health-token.json` (the old `.fitbit-token.json` is ignored and can be deleted).
|
|
26
|
+
- Credentials are now `GOOGLE_HEALTH_CLIENT_ID` / `GOOGLE_HEALTH_CLIENT_SECRET`.- The token file is now `.google-health-token.json` (the old `.fitbit-token.json` is ignored and can be deleted).
|
|
28
27
|
- Responses are the Google Health API's JSON, not Fitbit's. Fitbit-style `period` (`1d`, `7d`, ...) parameters are gone: tools take explicit start/end times, as the API does.
|
|
29
28
|
- `get_activity_goals` was removed: the Google Health API has no goals endpoint.
|
|
30
29
|
- New tools: `get_identity`, `get_settings`, `list_paired_devices`, `list_data_points`, `reconcile_data_points`.
|
package/build/config.js
CHANGED
|
@@ -20,16 +20,11 @@ export const GOOGLE_OAUTH_CONFIG = {
|
|
|
20
20
|
`${SCOPE_PREFIX}.settings.readonly`,
|
|
21
21
|
].join(' '),
|
|
22
22
|
};
|
|
23
|
-
/**
|
|
24
|
-
* Resolves OAuth client credentials from the environment.
|
|
25
|
-
* GOOGLE_HEALTH_* is preferred; the legacy FITBIT_* names are accepted as a fallback.
|
|
26
|
-
*/
|
|
23
|
+
/** Resolves the Google OAuth client credentials from GOOGLE_HEALTH_CLIENT_ID / _SECRET. */
|
|
27
24
|
export function resolveClientCredentials() {
|
|
28
25
|
return {
|
|
29
|
-
id: process.env.GOOGLE_HEALTH_CLIENT_ID ||
|
|
30
|
-
secret: process.env.GOOGLE_HEALTH_CLIENT_SECRET ||
|
|
31
|
-
process.env.FITBIT_CLIENT_SECRET ||
|
|
32
|
-
'',
|
|
26
|
+
id: process.env.GOOGLE_HEALTH_CLIENT_ID || '',
|
|
27
|
+
secret: process.env.GOOGLE_HEALTH_CLIENT_SECRET || '',
|
|
33
28
|
};
|
|
34
29
|
}
|
|
35
30
|
export function resolveOutputMode() {
|
package/build/index.js
CHANGED
|
@@ -33,7 +33,6 @@ const envPath = path.resolve(__dirname, '..', '.env');
|
|
|
33
33
|
dotenv.config({ path: envPath });
|
|
34
34
|
// Validate required environment variables
|
|
35
35
|
function validateEnvironment() {
|
|
36
|
-
// GOOGLE_HEALTH_* is preferred; legacy FITBIT_* names are accepted as a fallback
|
|
37
36
|
const credentials = resolveClientCredentials();
|
|
38
37
|
const requiredVars = {
|
|
39
38
|
GOOGLE_HEALTH_CLIENT_ID: credentials.id,
|
|
@@ -59,7 +58,7 @@ console.error('✅ Environment variables loaded successfully');
|
|
|
59
58
|
// Create the main MCP server instance
|
|
60
59
|
const server = new McpServer({
|
|
61
60
|
name: 'google-health',
|
|
62
|
-
version: '2.
|
|
61
|
+
version: '2.2.0',
|
|
63
62
|
capabilities: {
|
|
64
63
|
resources: {},
|
|
65
64
|
tools: {}, // Tools are registered dynamically below
|