claude-faf-mcp 5.6.2 → 5.7.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/CHANGELOG.md +27 -1
- package/CLAUDE.md +4 -4
- package/README.md +9 -9
- package/dist/src/handlers/tools.js +15 -46
- package/dist/src/index.js +0 -0
- package/dist/src/server.d.ts +2 -4
- package/dist/src/server.js +7 -90
- package/dist/src/utils/sanitize-output.d.ts +7 -0
- package/dist/src/utils/sanitize-output.js +37 -0
- package/manifest.json +2 -2
- package/package.json +3 -7
- package/dist/api/index.d.ts +0 -2
- package/dist/api/index.js +0 -364
- package/dist/src/compiler/index.d.ts +0 -7
- package/dist/src/compiler/index.js +0 -24
- package/dist/src/compiler/scorer.d.ts +0 -53
- package/dist/src/compiler/scorer.js +0 -189
- package/dist/src/compiler/slot-validator.d.ts +0 -32
- package/dist/src/compiler/slot-validator.js +0 -293
- package/dist/src/compiler/type-detector.d.ts +0 -62
- package/dist/src/compiler/type-detector.js +0 -388
- package/dist/src/handlers/behavioral-instruction.d.ts +0 -16
- package/dist/src/handlers/behavioral-instruction.js +0 -43
- package/dist/src/handlers/championship-tools.d.ts +0 -116
- package/dist/src/handlers/championship-tools.js +0 -2307
- package/dist/src/test-all-functions.d.ts +0 -15
- package/dist/src/test-all-functions.js +0 -163
- package/dist/src/types/project-types.d.ts +0 -22
- package/dist/src/types/project-types.js +0 -85
- package/dist/src/types/slots.d.ts +0 -39
- package/dist/src/types/slots.js +0 -162
- package/dist/src/utils/display-protocol.d.ts +0 -57
- package/dist/src/utils/display-protocol.js +0 -131
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- faf: claude-faf-mcp | TypeScript | mcp-server | FAF MCP server for Claude Desktop — persistent project context, 32 tools -->
|
|
2
|
-
<!-- faf: doc=changelog | latest=v5.
|
|
2
|
+
<!-- faf: doc=changelog | latest=v5.7.0 | canonical=project.faf | family=FAF -->
|
|
3
3
|
|
|
4
4
|
# Changelog
|
|
5
5
|
|
|
@@ -9,6 +9,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
9
9
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
## [5.7.0] - 2026-06-09 — The Canonical Edition
|
|
13
|
+
|
|
14
|
+
The original FAF MCP, made canonical: the registry remote now hits the live
|
|
15
|
+
Cloudflare edge directly (no Vercel/SSE redirect), the redundant `faf_chat` shim
|
|
16
|
+
is retired (the host is your chat) — consolidated into 32 must-have tools.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **`server.json` `remotes`** — `sse → claude-faf-mcp.vercel.app/sse` →
|
|
21
|
+
`streamable-http → https://mcpaas.live/claude/mcp/v1`. The Vercel/SSE URL only
|
|
22
|
+
308-redirected to the edge; strict SSE health-checks could choke on the
|
|
23
|
+
redirect-to-streamable-http. Now points at the canonical edge directly (same
|
|
24
|
+
fix grok-faf-mcp carried in 1.5.1).
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **`faf_chat` retired** (was a stranded branch) — un-advertised from `tools/list`;
|
|
29
|
+
the host (Claude Desktop / Claude Code) *is* the chat, and the old body shelled
|
|
30
|
+
`faf chat` which faf-cli no longer ships. Kept as a deprecation **stub** (still
|
|
31
|
+
callable → clear "retired" notice, never "unknown tool"). **Tool count 33 → 32.**
|
|
32
|
+
Mirrors grok-faf-mcp's fleet retire.
|
|
33
|
+
- **CI: `faf-taf-git` → v2.2.0** (was a stranded branch) — dropped the bun→jest
|
|
34
|
+
shim in `.github/workflows/ci.yml`.
|
|
35
|
+
|
|
36
|
+
No breaking changes; `faf_chat` callers get a graceful deprecation notice.
|
|
37
|
+
|
|
12
38
|
## [5.6.2] - 2026-06-08
|
|
13
39
|
|
|
14
40
|
MCP capability completeness — the stdio server now answers every capability it
|
package/CLAUDE.md
CHANGED
|
@@ -11,7 +11,7 @@ Universal FAF MCP Server for Claude Desktop - AI Context Intelligence
|
|
|
11
11
|
|
|
12
12
|
- **Language:** TypeScript
|
|
13
13
|
- **Backend:** MCP SDK (TS)
|
|
14
|
-
- **Api Type:** MCP (stdio
|
|
14
|
+
- **Api Type:** MCP (stdio + Streamable HTTP)
|
|
15
15
|
- **Runtime:** Node.js
|
|
16
16
|
- **Hosting:** npm/Claude Desktop
|
|
17
17
|
- **Build:** esbuild
|
|
@@ -20,12 +20,12 @@ Universal FAF MCP Server for Claude Desktop - AI Context Intelligence
|
|
|
20
20
|
## Context
|
|
21
21
|
|
|
22
22
|
- **Who:** Claude Desktop users who want persistent AI project context
|
|
23
|
-
- **What:** MCP server —
|
|
23
|
+
- **What:** MCP server — 32 FAF tools for project DNA, scoring, and context sync
|
|
24
24
|
- **Why:** Zero project re-explaining across AI sessions — define once, remember forever
|
|
25
25
|
- **Where:** npm, Claude Desktop, MCP Registry (io.github.Wolfe-Jam/claude-faf-mcp)
|
|
26
|
-
- **When:** v5.
|
|
26
|
+
- **When:** v5.7.0 (The Canonical Edition), June 2026
|
|
27
27
|
- **How:** npm install -g claude-faf-mcp
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
*STATUS: BI-SYNC ACTIVE — 2026-
|
|
31
|
+
*STATUS: BI-SYNC ACTIVE — 2026-06-09T12:52:07.994Z*
|
package/README.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<!-- faf: claude-faf-mcp | TypeScript | mcp-server | FAF MCP server for Claude — persistent project context,
|
|
1
|
+
<!-- faf: claude-faf-mcp | TypeScript | mcp-server | FAF MCP server for Claude — persistent project context, 32 tools -->
|
|
2
2
|
<!-- faf: doc=readme | canonical=project.faf | score=100 | family=FAF -->
|
|
3
3
|
|
|
4
|
-
# claude-faf-mcp
|
|
4
|
+
# claude-faf-mcp — The Canonical Edition
|
|
5
5
|
|
|
6
|
+
[](https://www.npmjs.com/package/claude-faf-mcp)
|
|
6
7
|
[](https://faf.one)
|
|
7
8
|
[](https://www.iana.org/assignments/media-types/application/vnd.faf+yaml)[](https://www.iana.org/assignments/media-types/application/vnd.fafm+yaml)
|
|
8
9
|
[](https://doi.org/10.5281/zenodo.18251362)[](https://doi.org/10.5281/zenodo.20348942)
|
|
9
10
|
|
|
10
11
|
**Home:** [faf.one/mcp](https://faf.one/mcp)
|
|
11
|
-
**Live demo:** [claude
|
|
12
|
+
**Live demo:** [claude.faf.one](https://claude.faf.one)
|
|
12
13
|
|
|
13
14
|
**Persistent Project Context for Claude. 30 seconds. 🐘 Nelly Never Forgets.**
|
|
14
15
|
|
|
15
16
|
[](https://builder.faf.one)
|
|
16
17
|
[](https://github.com/modelcontextprotocol/servers/pull/2759)
|
|
17
18
|
[](https://github.com/Wolfe-Jam/claude-faf-mcp/actions/workflows/ci.yml)
|
|
18
|
-
[](https://www.npmjs.com/package/claude-faf-mcp)
|
|
19
19
|
[](https://www.npmjs.com/package/claude-faf-mcp)
|
|
20
20
|
[](https://opensource.org/licenses/MIT)
|
|
21
21
|
[](https://faf-voice.vercel.app/agent)
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
|
|
27
27
|
> ⚡ **New: `/faf` prompt** — type `/faf` in Claude Desktop. It checks your project, scores it, drives it to 100%, and syncs. Relentlessly. One command.
|
|
28
28
|
|
|
29
|
-
> 🏆 **v5.
|
|
29
|
+
> 🏆 **v5.7.0 — The Canonical Edition.** The original FAF MCP, made canonical: the registry remote now hits the live Cloudflare edge directly (no Vercel/SSE redirect), the redundant `faf_chat` shim is retired (the host is your chat) — consolidated into 32 must-have tools.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
32 MCP tools. IANA-registered formats (`application/vnd.faf+yaml` · `application/vnd.fafm+yaml`). 2,538 test executions per push.
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
@@ -84,7 +84,7 @@ Same `.faf`, every surface — Claude, Gemini, Grok, Cursor. **[faf-cli on npm
|
|
|
84
84
|
|
|
85
85
|
[**⬇ Download `claude-faf-mcp-5.5.2.mcpb`**](https://github.com/Wolfe-Jam/claude-faf-mcp/releases/latest/download/claude-faf-mcp-5.5.2.mcpb)
|
|
86
86
|
|
|
87
|
-
Double-click. **No terminal. No JSON config.
|
|
87
|
+
Double-click. **No terminal. No JSON config. 32 tools live in 10 seconds.**
|
|
88
88
|
|
|
89
89
|
**Copy** — paste-prompt to Claude
|
|
90
90
|
|
|
@@ -146,7 +146,7 @@ At 55%, AI guesses half the time. At 100%, AI knows your project. Same compiler
|
|
|
146
146
|
|
|
147
147
|
---
|
|
148
148
|
|
|
149
|
-
##
|
|
149
|
+
## 32 MCP Tools
|
|
150
150
|
|
|
151
151
|
All tools run standalone — zero CLI dependencies, 19ms average execution.
|
|
152
152
|
|
|
@@ -246,7 +246,7 @@ Same `project.faf`. Same scoring. Same result. Different execution layer.
|
|
|
246
246
|
|
|
247
247
|
## Quality
|
|
248
248
|
|
|
249
|
-
|
|
249
|
+
423 tests · 13 suites · 6 platforms (ubuntu/macos/windows × Node 18/20)
|
|
250
250
|
|
|
251
251
|
**[CI Dashboard →](https://github.com/Wolfe-Jam/claude-faf-mcp/actions/workflows/ci.yml)**
|
|
252
252
|
|
|
@@ -359,21 +359,9 @@ class FafToolHandler {
|
|
|
359
359
|
additionalProperties: false
|
|
360
360
|
}
|
|
361
361
|
},
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
annotations: {
|
|
366
|
-
title: 'Chat about FAF',
|
|
367
|
-
readOnlyHint: true,
|
|
368
|
-
destructiveHint: false,
|
|
369
|
-
openWorldHint: false
|
|
370
|
-
},
|
|
371
|
-
inputSchema: {
|
|
372
|
-
type: 'object',
|
|
373
|
-
properties: {},
|
|
374
|
-
additionalProperties: false
|
|
375
|
-
}
|
|
376
|
-
},
|
|
362
|
+
// faf_chat — DEPRECATED, un-advertised. The host IS the chat (Claude Desktop /
|
|
363
|
+
// Claude Code); a chat-shim tool is redundant. Dispatch keeps a deprecation
|
|
364
|
+
// stub (below). Fleet sweep — mirrors grok-faf-mcp's retire.
|
|
377
365
|
{
|
|
378
366
|
name: 'faf_friday',
|
|
379
367
|
description: '🎉 Friday Features - Chrome Extension detection, fuzzy matching & more! 🧡⚡️',
|
|
@@ -1359,37 +1347,18 @@ ${debugInfo.permissions.fafError ? ` FAF Error: ${debugInfo.permissions.fafErr
|
|
|
1359
1347
|
}
|
|
1360
1348
|
}
|
|
1361
1349
|
async handleFafChat(_args) {
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
const responseText = typeof result.data === 'string'
|
|
1375
|
-
? result.data
|
|
1376
|
-
: result.data?.output || JSON.stringify(result.data, null, 2);
|
|
1377
|
-
return {
|
|
1378
|
-
content: [{
|
|
1379
|
-
type: 'text',
|
|
1380
|
-
text: responseText
|
|
1381
|
-
}]
|
|
1382
|
-
};
|
|
1383
|
-
}
|
|
1384
|
-
catch (error) {
|
|
1385
|
-
return {
|
|
1386
|
-
content: [{
|
|
1387
|
-
type: 'text',
|
|
1388
|
-
text: `Error running faf chat: ${error instanceof Error ? error.message : String(error)}`
|
|
1389
|
-
}],
|
|
1390
|
-
isError: true
|
|
1391
|
-
};
|
|
1392
|
-
}
|
|
1350
|
+
// DEPRECATED: the host (Claude Desktop / Claude Code) IS the chat — a chat-shim
|
|
1351
|
+
// MCP tool is redundant. Un-advertised in listTools; this stub stays so anyone
|
|
1352
|
+
// still wired gets a clear signal, not a crash. The old body shelled `faf chat`
|
|
1353
|
+
// via the engine subprocess (a command faf-cli no longer ships) — removing it
|
|
1354
|
+
// ends that dead shell too.
|
|
1355
|
+
return {
|
|
1356
|
+
content: [{
|
|
1357
|
+
type: 'text',
|
|
1358
|
+
text: 'faf_chat is retired — the host is your chat, just talk here. ' +
|
|
1359
|
+
'For FAF: faf_init / faf_score / faf_sync, or "ask questions" to build context.',
|
|
1360
|
+
}],
|
|
1361
|
+
};
|
|
1393
1362
|
}
|
|
1394
1363
|
async handleFafFriday(args) {
|
|
1395
1364
|
const { test } = args || {};
|
package/dist/src/index.js
CHANGED
|
File without changes
|
package/dist/src/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
2
|
export interface ClaudeFafMcpServerConfig {
|
|
3
|
-
transport: 'stdio'
|
|
3
|
+
transport: 'stdio';
|
|
4
4
|
port?: number;
|
|
5
5
|
fafEnginePath: string;
|
|
6
6
|
debug?: boolean;
|
|
@@ -13,18 +13,16 @@ export declare class ClaudeFafMcpServer {
|
|
|
13
13
|
private toolHandler;
|
|
14
14
|
private promptHandler;
|
|
15
15
|
private config;
|
|
16
|
-
private httpServer?;
|
|
17
16
|
constructor(config: ClaudeFafMcpServerConfig);
|
|
18
17
|
/** Expose the raw MCP Server instance (used by Smithery sandbox scanning) */
|
|
19
18
|
getServer(): Server;
|
|
20
19
|
private setupHandlers;
|
|
21
|
-
private createHttpApp;
|
|
22
20
|
start(): Promise<void>;
|
|
23
21
|
stop(): Promise<void>;
|
|
24
22
|
getServerInfo(): {
|
|
25
23
|
name: string;
|
|
26
24
|
version: string;
|
|
27
|
-
transport: "stdio"
|
|
25
|
+
transport: "stdio";
|
|
28
26
|
port: number | undefined;
|
|
29
27
|
host: string | undefined;
|
|
30
28
|
championship: string;
|
package/dist/src/server.js
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ClaudeFafMcpServer = void 0;
|
|
7
4
|
const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
8
5
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
9
|
-
const sse_js_1 = require("@modelcontextprotocol/sdk/server/sse.js");
|
|
10
6
|
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
11
7
|
const resources_1 = require("./handlers/resources");
|
|
12
8
|
const tools_1 = require("./handlers/tools");
|
|
13
9
|
const prompts_1 = require("./handlers/prompts");
|
|
14
10
|
const engine_adapter_1 = require("./handlers/engine-adapter");
|
|
15
|
-
const express_1 = __importDefault(require("express"));
|
|
16
|
-
const cors_1 = __importDefault(require("cors"));
|
|
17
11
|
const type_guards_js_1 = require("./utils/type-guards.js");
|
|
12
|
+
const sanitize_output_js_1 = require("./utils/sanitize-output.js");
|
|
18
13
|
const version_1 = require("./version");
|
|
19
14
|
class ClaudeFafMcpServer {
|
|
20
15
|
server;
|
|
@@ -22,7 +17,6 @@ class ClaudeFafMcpServer {
|
|
|
22
17
|
toolHandler;
|
|
23
18
|
promptHandler;
|
|
24
19
|
config;
|
|
25
|
-
httpServer;
|
|
26
20
|
constructor(config) {
|
|
27
21
|
this.config = {
|
|
28
22
|
port: 3001,
|
|
@@ -93,7 +87,7 @@ class ClaudeFafMcpServer {
|
|
|
93
87
|
const duration = Date.now() - startTime;
|
|
94
88
|
console.error(`Tool ${request.params.name} executed in ${duration}ms`);
|
|
95
89
|
}
|
|
96
|
-
return result;
|
|
90
|
+
return (0, sanitize_output_js_1.sanitizeToolResult)(result);
|
|
97
91
|
}
|
|
98
92
|
catch (error) {
|
|
99
93
|
const errorMessage = (0, type_guards_js_1.isError)(error) ? error.message : 'Unknown error';
|
|
@@ -102,92 +96,15 @@ class ClaudeFafMcpServer {
|
|
|
102
96
|
}
|
|
103
97
|
});
|
|
104
98
|
}
|
|
105
|
-
createHttpApp() {
|
|
106
|
-
const app = (0, express_1.default)();
|
|
107
|
-
// Enable CORS if requested
|
|
108
|
-
if (this.config.cors) {
|
|
109
|
-
app.use((0, cors_1.default)({
|
|
110
|
-
origin: true,
|
|
111
|
-
credentials: true,
|
|
112
|
-
methods: ['GET', 'POST', 'OPTIONS'],
|
|
113
|
-
allowedHeaders: ['Content-Type', 'Authorization', 'Accept']
|
|
114
|
-
}));
|
|
115
|
-
}
|
|
116
|
-
// Health check endpoint
|
|
117
|
-
app.get('/health', (_req, res) => {
|
|
118
|
-
res.json({
|
|
119
|
-
status: 'healthy',
|
|
120
|
-
server: 'claude-faf-mcp',
|
|
121
|
-
version: version_1.VERSION,
|
|
122
|
-
transport: 'http-sse',
|
|
123
|
-
timestamp: new Date().toISOString(),
|
|
124
|
-
championship: '32 tools, zero shell execution'
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
// Server info endpoint
|
|
128
|
-
app.get('/info', (_req, res) => {
|
|
129
|
-
res.json({
|
|
130
|
-
name: 'claude-faf-mcp',
|
|
131
|
-
version: version_1.VERSION,
|
|
132
|
-
description: 'Universal FAF MCP Server for Claude - AI Context Intelligence & Project Enhancement',
|
|
133
|
-
transport: 'http-sse',
|
|
134
|
-
capabilities: {
|
|
135
|
-
resources: { listChanged: true },
|
|
136
|
-
tools: { listChanged: true }
|
|
137
|
-
},
|
|
138
|
-
tools: [
|
|
139
|
-
'faf_status', 'faf_score', 'faf_init', 'faf_trust',
|
|
140
|
-
'faf_sync', 'faf_enhance', 'faf_bi_sync', 'faf_clear', 'faf_debug'
|
|
141
|
-
]
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
return app;
|
|
145
|
-
}
|
|
146
99
|
async start() {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
console.error('Claude FAF MCP Server started with stdio transport');
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
else if (this.config.transport === 'http-sse') {
|
|
155
|
-
const app = this.createHttpApp();
|
|
156
|
-
// Create SSE transport
|
|
157
|
-
const transport = new sse_js_1.SSEServerTransport('/sse', app);
|
|
158
|
-
await this.server.connect(transport);
|
|
159
|
-
// Start HTTP server (ensure port and host are defined)
|
|
160
|
-
const port = this.config.port ?? 3001;
|
|
161
|
-
const host = this.config.host ?? '0.0.0.0';
|
|
162
|
-
this.httpServer = app.listen(port, host, () => {
|
|
163
|
-
if (this.config.debug) {
|
|
164
|
-
console.error(`Claude FAF MCP Server started with HTTP/SSE transport on ${host}:${port}`);
|
|
165
|
-
console.error(`SSE endpoint: http://${host}:${port}/sse`);
|
|
166
|
-
console.error(`Health check: http://${host}:${port}/health`);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
// Handle server errors
|
|
170
|
-
this.httpServer.on('error', (error) => {
|
|
171
|
-
const errorMessage = (0, type_guards_js_1.isError)(error) ? error.message : 'Unknown HTTP server error';
|
|
172
|
-
console.error('HTTP server error:', errorMessage);
|
|
173
|
-
throw error;
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
throw new Error(`Unsupported transport: ${this.config.transport}`);
|
|
100
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
101
|
+
await this.server.connect(transport);
|
|
102
|
+
if (this.config.debug) {
|
|
103
|
+
console.error('Claude FAF MCP Server started with stdio transport');
|
|
178
104
|
}
|
|
179
105
|
}
|
|
180
106
|
async stop() {
|
|
181
|
-
|
|
182
|
-
return new Promise((resolve) => {
|
|
183
|
-
this.httpServer.close(() => {
|
|
184
|
-
if (this.config.debug) {
|
|
185
|
-
console.error('Claude FAF MCP Server HTTP/SSE transport stopped');
|
|
186
|
-
}
|
|
187
|
-
resolve();
|
|
188
|
-
});
|
|
189
|
-
});
|
|
190
|
-
}
|
|
107
|
+
// stdio transport requires no teardown beyond process exit.
|
|
191
108
|
}
|
|
192
109
|
getServerInfo() {
|
|
193
110
|
return {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
export declare function stripAnsi(text: string): string;
|
|
3
|
+
/**
|
|
4
|
+
* Sanitise a CallToolResult in place: strip ANSI from every text content block.
|
|
5
|
+
* Returns the same object for convenient inline use at the return boundary.
|
|
6
|
+
*/
|
|
7
|
+
export declare function sanitizeToolResult(result: CallToolResult): CallToolResult;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stripAnsi = stripAnsi;
|
|
4
|
+
exports.sanitizeToolResult = sanitizeToolResult;
|
|
5
|
+
/**
|
|
6
|
+
* Strip ANSI escape sequences (SGR colour codes, cursor moves, etc.) from text.
|
|
7
|
+
*
|
|
8
|
+
* Terminal colour codes are meaningless over MCP — Claude Desktop and other
|
|
9
|
+
* GUI clients render them as raw escape bytes (e.g. `[36m`), which looks
|
|
10
|
+
* like garbage. Tool output must be clean text. This is the single place we
|
|
11
|
+
* guarantee that, applied to every tool result before it leaves the server.
|
|
12
|
+
*/
|
|
13
|
+
const ESC = String.fromCharCode(27); // 0x1B, the ANSI escape lead byte
|
|
14
|
+
const ANSI_PATTERN = new RegExp(ESC + '\\[[0-9;?]*[ -/]*[@-~]', 'g');
|
|
15
|
+
function stripAnsi(text) {
|
|
16
|
+
// 1) Remove well-formed CSI sequences (ESC[...final), e.g. colour codes.
|
|
17
|
+
// 2) Remove any remaining lone ESC bytes — some subprocess output (e.g. the
|
|
18
|
+
// faf CLI's colourised stdout) emits bare 0x1B that isn't a valid CSI.
|
|
19
|
+
// A raw ESC is never legitimate content over MCP, so strip it outright.
|
|
20
|
+
return text.replace(ANSI_PATTERN, '').split(ESC).join('');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Sanitise a CallToolResult in place: strip ANSI from every text content block.
|
|
24
|
+
* Returns the same object for convenient inline use at the return boundary.
|
|
25
|
+
*/
|
|
26
|
+
function sanitizeToolResult(result) {
|
|
27
|
+
if (!result || !Array.isArray(result.content))
|
|
28
|
+
return result;
|
|
29
|
+
for (const item of result.content) {
|
|
30
|
+
if (item && item.type === 'text'
|
|
31
|
+
&& typeof item.text === 'string') {
|
|
32
|
+
item.text = stripAnsi(item.text);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=sanitize-output.js.map
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "claude-faf-mcp",
|
|
4
4
|
"display_name": "FAF - Persistent Project Context for AI",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.7.0",
|
|
6
6
|
"description": "Persistent project context that survives sessions, works across AI tools, and eliminates re-explaining. IANA-registered format. 32 MCP tools. Desktop Extension.",
|
|
7
7
|
"long_description": "Persistent project context for AI. Tell Claude what you're building, who it's for, and why it matters. 30 seconds. It never forgets.\n\n**What it does:**\n- Scores your project's AI-readiness (0-100%)\n- Creates project.faf — persistent context that survives every session\n- Bi-syncs with CLAUDE.md, AGENTS.md, .cursorrules, GEMINI.md\n- Auto-detects your stack, frameworks, and architecture\n- Extracts context from README or any GitHub repo\n\n**No terminal required.** Tell Claude about your project and FAF handles the rest.\n\n**Example prompts:**\n- \"Set up project context for this codebase\" → creates project.faf, scores AI-readiness\n- \"What's my AI-readiness score?\" → calculates 0-100% with tier (Bronze/Silver/Gold/Trophy)\n- \"Sync my .faf with CLAUDE.md\" → bi-directional sync in 8ms\n- \"Generate a .faf from this GitHub repo: https://github.com/user/repo\" → instant context from any public repo\n- \"Improve my score to Gold\" → guided interview, adds missing context, re-scores\n\n**IANA-registered format (application/vnd.faf+yaml). Merged in Anthropic MCP ecosystem (PR #2759). 36,000+ downloads.**",
|
|
8
8
|
"author": {
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"tools": [
|
|
46
|
+
{ "name": "faf", "description": "Type faf to start — scores, drives to 100%, syncs everything" },
|
|
46
47
|
{ "name": "faf_about", "description": "Learn what .faf format is" },
|
|
47
48
|
{ "name": "faf_status", "description": "Check if project has project.faf" },
|
|
48
49
|
{ "name": "faf_score", "description": "Calculate AI-readiness score (0-100%)" },
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
{ "name": "faf_read", "description": "Read file content" },
|
|
57
58
|
{ "name": "faf_write", "description": "Write file content" },
|
|
58
59
|
{ "name": "faf_list", "description": "List and discover .faf projects" },
|
|
59
|
-
{ "name": "faf_chat", "description": "Natural language .faf generation" },
|
|
60
60
|
{ "name": "faf_friday", "description": "Fun features and fuzzy matching" },
|
|
61
61
|
{ "name": "faf_guide", "description": "FAF MCP usage guide" },
|
|
62
62
|
{ "name": "faf_readme", "description": "Extract context from README.md" },
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-faf-mcp",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"mcpName": "io.github.Wolfe-Jam/claude-faf-mcp",
|
|
5
|
-
"description": "Persistent Project Context for Claude. IANA-registered .faf format,
|
|
5
|
+
"description": "Persistent Project Context for Claude. IANA-registered .faf format, 32 MCP tools, 423 tests.",
|
|
6
6
|
"icon": "./assets/icons/faf-icon-256.png",
|
|
7
7
|
"logo": "./assets/icons/faf-icon-256.png",
|
|
8
8
|
"displayName": ".faf 🐘",
|
|
@@ -127,18 +127,14 @@
|
|
|
127
127
|
"access": "public"
|
|
128
128
|
},
|
|
129
129
|
"dependencies": {
|
|
130
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
130
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
131
131
|
"@upstash/redis": "^1.37.0",
|
|
132
|
-
"cors": "^2.8.5",
|
|
133
132
|
"esbuild": "^0.27.3",
|
|
134
|
-
"express": "^4.21.0",
|
|
135
133
|
"faf-cli": "^6.7.1",
|
|
136
134
|
"faf-scoring-kernel": "^2.0.3",
|
|
137
135
|
"yaml": "^2.4.1"
|
|
138
136
|
},
|
|
139
137
|
"devDependencies": {
|
|
140
|
-
"@types/cors": "^2.8.19",
|
|
141
|
-
"@types/express": "^5.0.3",
|
|
142
138
|
"@types/jsonwebtoken": "^9.0.5",
|
|
143
139
|
"@types/node": "^20.11.0",
|
|
144
140
|
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
package/dist/api/index.d.ts
DELETED