@fluxfiles/mcp 1.1.2 → 1.1.3
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 +8 -3
- package/dist/{chunk-ZAXBXZUW.js → chunk-VBW6C2BL.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/server.ts +1 -1
package/README.md
CHANGED
|
@@ -25,15 +25,20 @@ permissions, its quota. No storage credentials are involved.
|
|
|
25
25
|
|
|
26
26
|
## Setup
|
|
27
27
|
|
|
28
|
-
1. Mint a **narrow** token for the agent — a dedicated prefix,
|
|
29
|
-
you really want writes, and a TTL
|
|
28
|
+
1. Mint a **narrow, short-lived** token for the agent — a dedicated prefix,
|
|
29
|
+
read-only unless you really want writes, and a TTL of hours, not weeks:
|
|
30
30
|
|
|
31
31
|
```js
|
|
32
32
|
import { createToken } from '@fluxfiles/node';
|
|
33
33
|
const token = createToken({ userId: 'ai-agent', perms: ['read'], disks: ['local'],
|
|
34
|
-
prefix: 'shared/knowledge-base', ttl:
|
|
34
|
+
prefix: 'shared/knowledge-base', ttl: 8 * 3600 }); // 8 h; secret: FLUXFILES_SECRET env
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
Core does not cap `exp`, and a token can't be revoked before it expires except by
|
|
38
|
+
rotating `FLUXFILES_SECRET` (which invalidates every token). So keep the TTL short
|
|
39
|
+
and re-mint the token (and restart the MCP server) when it runs out, e.g. from a
|
|
40
|
+
daily script, rather than minting one that lives for a month.
|
|
41
|
+
|
|
37
42
|
2. Add the server to your MCP client. Claude Desktop (`claude_desktop_config.json`):
|
|
38
43
|
|
|
39
44
|
```json
|
|
@@ -239,7 +239,7 @@ function buildTools(client, opts) {
|
|
|
239
239
|
|
|
240
240
|
// src/server.ts
|
|
241
241
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
242
|
-
var VERSION = "1.1.
|
|
242
|
+
var VERSION = "1.1.3";
|
|
243
243
|
function createServer(cfg) {
|
|
244
244
|
const client = new FluxFilesClient({ baseUrl: cfg.baseUrl, token: cfg.token, fetch: cfg.fetch, allowInsecureHttp: cfg.allowInsecureHttp });
|
|
245
245
|
const server = new McpServer({ name: "fluxfiles", version: VERSION });
|
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ interface ServerConfig extends Partial<ToolOptions> {
|
|
|
61
61
|
fetch?: typeof fetch;
|
|
62
62
|
allowInsecureHttp?: boolean;
|
|
63
63
|
}
|
|
64
|
-
declare const VERSION = "1.1.
|
|
64
|
+
declare const VERSION = "1.1.3";
|
|
65
65
|
declare function createServer(cfg: ServerConfig): McpServer;
|
|
66
66
|
|
|
67
67
|
export { FluxFilesClient, FluxFilesError, VERSION, assertSafeBaseUrl, buildTools, createServer };
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluxfiles/mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Model Context Protocol server for FluxFiles — let AI agents browse, search and read (and optionally write) files through a scoped FluxFiles JWT",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/server.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface ServerConfig extends Partial<ToolOptions> {
|
|
|
9
9
|
allowInsecureHttp?: boolean;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export const VERSION = '1.1.
|
|
12
|
+
export const VERSION = '1.1.3';
|
|
13
13
|
|
|
14
14
|
export function createServer(cfg: ServerConfig): McpServer {
|
|
15
15
|
const client = new FluxFilesClient({ baseUrl: cfg.baseUrl, token: cfg.token, fetch: cfg.fetch, allowInsecureHttp: cfg.allowInsecureHttp });
|