-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdemo-server.js
More file actions
59 lines (53 loc) · 1.42 KB
/
Copy pathdemo-server.js
File metadata and controls
59 lines (53 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const express = require('express');
const cors = require('cors');
const app = express();
app.use(cors());
app.use(express.json());
const PORT = process.env.PORT || 3001;
const HOST = process.env.HOST || '0.0.0.0';
app.get('/health', (req, res) => {
res.json({
status: 'healthy',
server: 'faf-mcp',
version: '1.1.1',
transport: 'http-sse',
timestamp: new Date().toISOString(),
championship: 'Universal MCP - All Platforms'
});
});
app.get('/info', (req, res) => {
res.json({
name: 'faf-mcp',
version: '1.1.1',
description: 'Universal FAF MCP Server for ALL platforms - AI Context Intelligence',
transport: 'http-sse',
capabilities: {
resources: { subscribe: true, listChanged: true },
tools: { listChanged: true }
},
tools: [
'faf_status', 'faf_score', 'faf_init', 'faf_trust',
'faf_sync', 'faf_enhance', 'faf_bi_sync', 'faf_clear', 'faf_debug'
],
endpoints: {
health: '/health',
info: '/info',
sse: '/sse'
}
});
});
app.get('/', (req, res) => {
res.json({
message: 'FAF MCP Server - Universal AI Context',
version: '1.1.1',
endpoints: {
health: '/health',
info: '/info'
}
});
});
app.listen(PORT, HOST, () => {
console.log(`🏎️ FAF MCP Demo Server running on ${HOST}:${PORT}`);
console.log(` Health: http://${HOST}:${PORT}/health`);
console.log(` Info: http://${HOST}:${PORT}/info`);
});