creditkarma-mcp 2.0.2 → 2.0.4
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 +3 -3
- package/SKILL.md +3 -3
- package/dist/bundle.js +13 -4
- package/dist/index.js +22 -4
- package/package.json +4 -2
- package/server.json +29 -0
package/README.md
CHANGED
|
@@ -85,11 +85,11 @@ Credit Karma uses short-lived JWTs. This server handles automatic token refresh
|
|
|
85
85
|
#### Option A — scripted (recommended)
|
|
86
86
|
|
|
87
87
|
```bash
|
|
88
|
-
npm run auth # prints the
|
|
89
|
-
npm run auth -- .env # writes CK_COOKIES=<
|
|
88
|
+
npm run auth # prints the CKAT value to the console
|
|
89
|
+
npm run auth -- .env # writes CK_COOKIES=<ckat> to .env
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
Launches Chrome with a dedicated profile at `~/.creditkarma-mcp/chrome-profile`, waits for you to sign in at creditkarma.com, then captures the
|
|
92
|
+
Launches Chrome with a dedicated profile at `~/.creditkarma-mcp/chrome-profile`, waits for you to sign in at creditkarma.com, then captures the `CKAT` cookie (the URL-encoded bundle of access + refresh JWTs). Either prints it (for pasting into Claude Desktop / MCPB) or writes it to the env file you pass. Requires Google Chrome installed locally; the script installs `puppeteer-core` on first run (~1 MB).
|
|
93
93
|
|
|
94
94
|
#### Option B — manual (DevTools)
|
|
95
95
|
|
package/SKILL.md
CHANGED
|
@@ -60,11 +60,11 @@ Or use a `.env` file in the project directory with `CK_COOKIES=<value>`.
|
|
|
60
60
|
|
|
61
61
|
**Scripted (recommended — source install):**
|
|
62
62
|
```bash
|
|
63
|
-
npm run auth # prints the
|
|
64
|
-
npm run auth -- .env # writes CK_COOKIES=<
|
|
63
|
+
npm run auth # prints the CKAT value to the console
|
|
64
|
+
npm run auth -- .env # writes CK_COOKIES=<ckat> to .env
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Launches Chrome with a dedicated profile, waits for sign-in at creditkarma.com, then captures the
|
|
67
|
+
Launches Chrome with a dedicated profile, waits for sign-in at creditkarma.com, then captures the `CKAT` cookie (the URL-encoded bundle of access + refresh JWTs). Use the printed value with Claude Desktop / MCPB, or the `.env` form when running from source.
|
|
68
68
|
|
|
69
69
|
**Manual (DevTools):**
|
|
70
70
|
1. Log in to [creditkarma.com](https://www.creditkarma.com) in Chrome
|
package/dist/bundle.js
CHANGED
|
@@ -30831,10 +30831,19 @@ function registerSqlTools(server, ctx) {
|
|
|
30831
30831
|
}
|
|
30832
30832
|
|
|
30833
30833
|
// src/index.ts
|
|
30834
|
+
function readVar(key) {
|
|
30835
|
+
const raw = process.env[key];
|
|
30836
|
+
if (typeof raw !== "string") return void 0;
|
|
30837
|
+
const trimmed = raw.trim();
|
|
30838
|
+
if (trimmed.length === 0) return void 0;
|
|
30839
|
+
if (trimmed === "undefined" || trimmed === "null") return void 0;
|
|
30840
|
+
if (/^\$\{[^}]*\}$/.test(trimmed)) return void 0;
|
|
30841
|
+
return trimmed;
|
|
30842
|
+
}
|
|
30834
30843
|
var __dirname = dirname4(fileURLToPath2(import.meta.url));
|
|
30835
30844
|
try {
|
|
30836
30845
|
const { config: config2 } = await import("dotenv");
|
|
30837
|
-
config2({ path: join3(__dirname, "..", ".env"), override: false });
|
|
30846
|
+
config2({ path: join3(__dirname, "..", ".env"), override: false, quiet: true });
|
|
30838
30847
|
} catch {
|
|
30839
30848
|
}
|
|
30840
30849
|
function extractCookieValue3(cookieString, name) {
|
|
@@ -30842,9 +30851,9 @@ function extractCookieValue3(cookieString, name) {
|
|
|
30842
30851
|
return match ? match[1] : void 0;
|
|
30843
30852
|
}
|
|
30844
30853
|
async function main() {
|
|
30845
|
-
const dbPath =
|
|
30854
|
+
const dbPath = readVar("CK_DB_PATH") || join3(homedir(), ".creditkarma-mcp", "transactions.db");
|
|
30846
30855
|
const mcpJsonPath = join3(__dirname, "..", ".mcp.json");
|
|
30847
|
-
const cookies =
|
|
30856
|
+
const cookies = readVar("CK_COOKIES") || void 0;
|
|
30848
30857
|
let token;
|
|
30849
30858
|
let refreshToken;
|
|
30850
30859
|
if (cookies) {
|
|
@@ -30859,7 +30868,7 @@ async function main() {
|
|
|
30859
30868
|
mcpJsonPath
|
|
30860
30869
|
};
|
|
30861
30870
|
const server = new McpServer(
|
|
30862
|
-
{ name: "creditkarma-mcp", version: "2.0.
|
|
30871
|
+
{ name: "creditkarma-mcp", version: "2.0.4" }
|
|
30863
30872
|
);
|
|
30864
30873
|
registerAuthTools(server, ctx);
|
|
30865
30874
|
registerSyncTools(server, ctx);
|
package/dist/index.js
CHANGED
|
@@ -9,11 +9,29 @@ import { registerAuthTools } from './tools/auth.js';
|
|
|
9
9
|
import { registerSyncTools } from './tools/sync.js';
|
|
10
10
|
import { registerQueryTools } from './tools/query.js';
|
|
11
11
|
import { registerSqlTools } from './tools/sql.js';
|
|
12
|
+
/**
|
|
13
|
+
* Read an env var, trim whitespace, and treat as unset if blank or if the value
|
|
14
|
+
* looks like an unsubstituted shell placeholder (e.g. `${FOO}`) — defends
|
|
15
|
+
* against MCP hosts that pass .mcp.json env blocks through unexpanded.
|
|
16
|
+
*/
|
|
17
|
+
function readVar(key) {
|
|
18
|
+
const raw = process.env[key];
|
|
19
|
+
if (typeof raw !== 'string')
|
|
20
|
+
return undefined;
|
|
21
|
+
const trimmed = raw.trim();
|
|
22
|
+
if (trimmed.length === 0)
|
|
23
|
+
return undefined;
|
|
24
|
+
if (trimmed === 'undefined' || trimmed === 'null')
|
|
25
|
+
return undefined;
|
|
26
|
+
if (/^\$\{[^}]*\}$/.test(trimmed))
|
|
27
|
+
return undefined;
|
|
28
|
+
return trimmed;
|
|
29
|
+
}
|
|
12
30
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
13
31
|
// Load .env for local dev; silently skip if dotenv is unavailable (e.g. mcpb bundle)
|
|
14
32
|
try {
|
|
15
33
|
const { config } = await import('dotenv');
|
|
16
|
-
config({ path: join(__dirname, '..', '.env'), override: false });
|
|
34
|
+
config({ path: join(__dirname, '..', '.env'), override: false, quiet: true });
|
|
17
35
|
}
|
|
18
36
|
catch {
|
|
19
37
|
// not available — rely on process.env (mcpb sets credentials via mcp_config.env)
|
|
@@ -23,9 +41,9 @@ function extractCookieValue(cookieString, name) {
|
|
|
23
41
|
return match ? match[1] : undefined;
|
|
24
42
|
}
|
|
25
43
|
async function main() {
|
|
26
|
-
const dbPath =
|
|
44
|
+
const dbPath = readVar('CK_DB_PATH') || join(homedir(), '.creditkarma-mcp', 'transactions.db');
|
|
27
45
|
const mcpJsonPath = join(__dirname, '..', '.mcp.json');
|
|
28
|
-
const cookies =
|
|
46
|
+
const cookies = readVar('CK_COOKIES') || undefined;
|
|
29
47
|
// Bootstrap tokens from CK_COOKIES: accepts raw CKAT, CKAT=<value>, or full cookie string
|
|
30
48
|
let token;
|
|
31
49
|
let refreshToken;
|
|
@@ -40,7 +58,7 @@ async function main() {
|
|
|
40
58
|
db: initDb(dbPath),
|
|
41
59
|
mcpJsonPath
|
|
42
60
|
};
|
|
43
|
-
const server = new McpServer({ name: 'creditkarma-mcp', version: '2.0.
|
|
61
|
+
const server = new McpServer({ name: 'creditkarma-mcp', version: '2.0.4' });
|
|
44
62
|
registerAuthTools(server, ctx);
|
|
45
63
|
registerSyncTools(server, ctx);
|
|
46
64
|
registerQueryTools(server, ctx);
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "creditkarma-mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
|
+
"mcpName": "io.github.chrischall/creditkarma-mcp",
|
|
4
5
|
"description": "MCP server for Credit Karma — natural-language access to your transactions, spending, and accounts",
|
|
5
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
|
6
7
|
"repository": {
|
|
@@ -28,7 +29,8 @@
|
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
30
31
|
"dist",
|
|
31
|
-
"SKILL.md"
|
|
32
|
+
"SKILL.md",
|
|
33
|
+
"server.json"
|
|
32
34
|
],
|
|
33
35
|
"scripts": {
|
|
34
36
|
"build": "tsc && cp src/transaction.graphql dist/ && npm run bundle",
|
package/server.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.chrischall/creditkarma-mcp",
|
|
4
|
+
"description": "Credit Karma transactions for Claude — spending by category, merchant, and account summary",
|
|
5
|
+
"repository": {
|
|
6
|
+
"url": "https://github.com/chrischall/creditkarma-mcp",
|
|
7
|
+
"source": "github"
|
|
8
|
+
},
|
|
9
|
+
"version": "2.0.4",
|
|
10
|
+
"packages": [
|
|
11
|
+
{
|
|
12
|
+
"registryType": "npm",
|
|
13
|
+
"identifier": "creditkarma-mcp",
|
|
14
|
+
"version": "2.0.4",
|
|
15
|
+
"transport": {
|
|
16
|
+
"type": "stdio"
|
|
17
|
+
},
|
|
18
|
+
"environmentVariables": [
|
|
19
|
+
{
|
|
20
|
+
"name": "CK_COOKIES",
|
|
21
|
+
"description": "Your Credit Karma Cookie header (run `npm run auth` to capture via browser login, or copy CKAT from DevTools)",
|
|
22
|
+
"isRequired": false,
|
|
23
|
+
"format": "string",
|
|
24
|
+
"isSecret": true
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|