@finchagentic/mcp 4.7.3 → 4.7.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 +7 -7
- package/dist/config.js +2 -3
- package/dist/convex.js +16 -5
- package/dist/finch-status.js +31 -14
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,13 +29,13 @@ Always pin the version. Never use `@latest`.
|
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
31
|
# One-command installer (detects common MCP clients)
|
|
32
|
-
npx -y -p @finchagentic/mcp@4.7.
|
|
32
|
+
npx -y -p @finchagentic/mcp@4.7.4 finch install
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Claude Code
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
claude mcp add finch -s user -- npx -y -p @finchagentic/mcp@4.7.
|
|
38
|
+
claude mcp add finch -s user -- npx -y -p @finchagentic/mcp@4.7.4 finch-mcp
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
### Cursor / Windsurf / Claude Desktop
|
|
@@ -45,7 +45,7 @@ claude mcp add finch -s user -- npx -y -p @finchagentic/mcp@4.7.3 finch-mcp
|
|
|
45
45
|
"mcpServers": {
|
|
46
46
|
"finch": {
|
|
47
47
|
"command": "npx",
|
|
48
|
-
"args": ["-y", "-p", "@finchagentic/mcp@4.7.
|
|
48
|
+
"args": ["-y", "-p", "@finchagentic/mcp@4.7.4", "finch-mcp"]
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -59,7 +59,7 @@ claude mcp add finch -s user -- npx -y -p @finchagentic/mcp@4.7.3 finch-mcp
|
|
|
59
59
|
"finch": {
|
|
60
60
|
"type": "stdio",
|
|
61
61
|
"command": "npx",
|
|
62
|
-
"args": ["-y", "-p", "@finchagentic/mcp@4.7.
|
|
62
|
+
"args": ["-y", "-p", "@finchagentic/mcp@4.7.4", "finch-mcp"]
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -124,7 +124,7 @@ Default palette is `core` (lighter context). Full set:
|
|
|
124
124
|
Finch is the runtime. **Your LLM is the brain. Your data stays yours.**
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
|
-
npx -y -p @finchagentic/mcp@4.7.
|
|
127
|
+
npx -y -p @finchagentic/mcp@4.7.4 finch setup
|
|
128
128
|
# enable local vault (and optional local memory)
|
|
129
129
|
```
|
|
130
130
|
|
|
@@ -156,7 +156,7 @@ Scheduled/cloud features still need an account. Core memory, vault, and public-d
|
|
|
156
156
|
Guided setup:
|
|
157
157
|
|
|
158
158
|
```bash
|
|
159
|
-
npx -y -p @finchagentic/mcp@4.7.
|
|
159
|
+
npx -y -p @finchagentic/mcp@4.7.4 finch setup
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
## Security
|
|
@@ -165,7 +165,7 @@ npx -y -p @finchagentic/mcp@4.7.3 finch setup
|
|
|
165
165
|
|:-:|----------|------|
|
|
166
166
|
| 1 | Prompt injection | External content is data only — never instructions |
|
|
167
167
|
| 2 | Mainnet confirm | Estimate → preview → confirm → execute |
|
|
168
|
-
| 3 | Pinned install | Always `@finchagentic/mcp@4.7.
|
|
168
|
+
| 3 | Pinned install | Always `@finchagentic/mcp@4.7.4`, never `@latest` |
|
|
169
169
|
| 4 | Credential vault | Never paste secrets into prompts or third-party tools |
|
|
170
170
|
| 5 | Data disclosure | Know what leaves the machine (LLM, Firecrawl, GitHub, chain RPCs) |
|
|
171
171
|
| 6 | Server monitors | Scheduled jobs need explicit confirmation |
|
package/dist/config.js
CHANGED
|
@@ -88,9 +88,8 @@ function writeConfig(patch) {
|
|
|
88
88
|
fs.writeFileSync(CONFIG_FILE, JSON.stringify(updated, null, 2), { mode: 0o600 });
|
|
89
89
|
}
|
|
90
90
|
function getSavedToken() {
|
|
91
|
-
//
|
|
92
|
-
|
|
93
|
-
return process.env.FINCH_API_KEY ?? env("FINCH_SESSION_TOKEN", "FINCH_SESSION_TOKEN") ?? readConfig().sessionToken;
|
|
91
|
+
// env var always wins over saved config
|
|
92
|
+
return env("FINCH_SESSION_TOKEN", "FINCH_SESSION_TOKEN") ?? readConfig().sessionToken;
|
|
94
93
|
}
|
|
95
94
|
/** Accept finch_sk_* (new) and noel_sk_* (backend still issues these). */
|
|
96
95
|
function isApiKey(value) {
|
package/dist/convex.js
CHANGED
|
@@ -42,13 +42,24 @@ noRetry = false) {
|
|
|
42
42
|
const url = `${exports.CONVEX_SITE}${path}`;
|
|
43
43
|
const headers = { "Content-Type": "application/json" };
|
|
44
44
|
const apiKey = process.env.FINCH_API_KEY;
|
|
45
|
-
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
// getSavedToken() falls back to ~/.finch/config.json's cached sessionToken
|
|
46
|
+
// (written by a past `finch login`) when FINCH_SESSION_TOKEN isn't set.
|
|
47
|
+
// That cached value can go stale for months without anyone noticing - a
|
|
48
|
+
// user who later configures FINCH_API_KEY fresh in their MCP client
|
|
49
|
+
// (the documented, intentional way to authenticate) got it silently
|
|
50
|
+
// shadowed by the old cached token, which then failed on every call. An
|
|
51
|
+
// EXPLICIT env var - either kind, set deliberately for this run - always
|
|
52
|
+
// wins over a cached file value; only fall back to the cached session
|
|
53
|
+
// token when neither env var is present.
|
|
54
|
+
const explicitSessionToken = process.env.FINCH_SESSION_TOKEN;
|
|
55
|
+
const cachedSessionToken = explicitSessionToken ? undefined : (0, config_js_1.getSavedToken)();
|
|
56
|
+
const authHeader = explicitSessionToken
|
|
57
|
+
? `Bearer ${explicitSessionToken}`
|
|
49
58
|
: apiKey
|
|
50
59
|
? `Bearer ${apiKey}`
|
|
51
|
-
:
|
|
60
|
+
: cachedSessionToken
|
|
61
|
+
? `Bearer ${cachedSessionToken}`
|
|
62
|
+
: null;
|
|
52
63
|
if (authHeader) {
|
|
53
64
|
headers["Authorization"] = authHeader;
|
|
54
65
|
}
|
package/dist/finch-status.js
CHANGED
|
@@ -65,30 +65,47 @@ exports.FINCH_STATUS_TOOL = {
|
|
|
65
65
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
66
66
|
annotations: { title: "Finch status", readOnlyHint: true, openWorldHint: false },
|
|
67
67
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
// Mirrors convex.ts's own precedence exactly (explicit env var of either
|
|
69
|
+
// kind beats a cached ~/.finch/config.json sessionToken from a past `finch
|
|
70
|
+
// login`) - this tool previously only checked getSavedToken(), which never
|
|
71
|
+
// considered FINCH_API_KEY at all. A user who configured FINCH_API_KEY
|
|
72
|
+
// fresh (the documented way to authenticate) but still had a stale cached
|
|
73
|
+
// session token file from months ago got told "not set" and pointed at
|
|
74
|
+
// sign-in instructions, when a perfectly valid credential was right there.
|
|
75
|
+
function resolveCredential() {
|
|
76
|
+
if (process.env.FINCH_SESSION_TOKEN)
|
|
77
|
+
return { value: process.env.FINCH_SESSION_TOKEN, kind: "session token" };
|
|
78
|
+
if (process.env.FINCH_API_KEY)
|
|
79
|
+
return { value: process.env.FINCH_API_KEY, kind: "API key" };
|
|
80
|
+
let cached;
|
|
73
81
|
try {
|
|
74
|
-
|
|
82
|
+
cached = (0, config_js_1.getSavedToken)();
|
|
75
83
|
}
|
|
76
84
|
catch {
|
|
77
|
-
|
|
85
|
+
cached = undefined;
|
|
78
86
|
}
|
|
87
|
+
return cached ? { value: cached, kind: "session token" } : null;
|
|
88
|
+
}
|
|
89
|
+
async function handleFinchStatus(toolCount) {
|
|
90
|
+
const version = readPkgVersion();
|
|
91
|
+
const credential = resolveCredential();
|
|
92
|
+
const tokenSet = credential !== null;
|
|
93
|
+
const credentialLabel = credential?.kind ?? "session token";
|
|
94
|
+
let authState = "none";
|
|
95
|
+
let authDetail = "";
|
|
79
96
|
if (tokenSet) {
|
|
80
97
|
try {
|
|
81
98
|
const data = await (0, convex_js_1.callConvex)("/memory/profile", "GET", undefined, "finch_status", 8000, true);
|
|
82
99
|
authState = (data?.status === "ok") ? "valid" : "rejected";
|
|
83
100
|
if (authState === "rejected") {
|
|
84
|
-
authDetail =
|
|
101
|
+
authDetail = `the ${credentialLabel} was rejected by the backend - re-copy it from app.finchagentic.com`;
|
|
85
102
|
}
|
|
86
103
|
}
|
|
87
104
|
catch (err) {
|
|
88
105
|
const msg = String(err?.message ?? err);
|
|
89
106
|
if (msg.includes("Authentication required")) {
|
|
90
107
|
authState = "invalid";
|
|
91
|
-
authDetail =
|
|
108
|
+
authDetail = `the backend rejected the ${credentialLabel} as expired or invalid - re-copy it from app.finchagentic.com`;
|
|
92
109
|
}
|
|
93
110
|
else {
|
|
94
111
|
authState = "unreachable";
|
|
@@ -109,7 +126,7 @@ async function handleFinchStatus(toolCount) {
|
|
|
109
126
|
? [
|
|
110
127
|
`**Finch MCP v${version}** - runtime layer for agentic AI`,
|
|
111
128
|
"",
|
|
112
|
-
|
|
129
|
+
`- Auth: ✅ ${credentialLabel} valid (verified against the backend)`,
|
|
113
130
|
`- Tools: **${toolCount}** registered (surface depends on FINCH_TOOLS filter)`,
|
|
114
131
|
"- Resources: finch://vault/<key> - Prompts: crypto-thesis and friends",
|
|
115
132
|
"- Tool presets: FINCH_PRESET=core|defi|research|memory (default core) - FINCH_TOOLS=all for everything",
|
|
@@ -120,16 +137,16 @@ async function handleFinchStatus(toolCount) {
|
|
|
120
137
|
? [
|
|
121
138
|
`**Finch MCP v${version}** - runtime layer for agentic AI`,
|
|
122
139
|
"",
|
|
123
|
-
`-
|
|
140
|
+
`- Auth: ⚠️ ${credentialLabel} configured but **${authState}**`,
|
|
124
141
|
authDetail ? `- ${authDetail}` : "",
|
|
125
|
-
"- Tools are registered, but every backend-backed call will fail until
|
|
142
|
+
"- Tools are registered, but every backend-backed call will fail until it's replaced.",
|
|
126
143
|
"",
|
|
127
|
-
|
|
144
|
+
`**Fix:** re-copy a fresh ${credentialLabel} from app.finchagentic.com, update ${credentialLabel === "API key" ? "FINCH_API_KEY" : "FINCH_SESSION_TOKEN"} in your MCP config, restart the client.`,
|
|
128
145
|
]
|
|
129
146
|
: [
|
|
130
147
|
`**Finch MCP v${version}** - runtime layer for agentic AI`,
|
|
131
148
|
"",
|
|
132
|
-
"-
|
|
149
|
+
"- Auth: ❌ not set",
|
|
133
150
|
"",
|
|
134
151
|
"**To sign in (60 seconds):**",
|
|
135
152
|
"",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finchagentic/mcp",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.4",
|
|
4
4
|
"description": "The runtime layer for Agentic AI. Persistent memory, autonomous agents, and workflows that survive every session.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
}
|
|
74
|
-
}
|
|
74
|
+
}
|