fa-mcp-sdk 0.2.105 → 0.2.107
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.
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# {{project.productName}}
|
|
2
|
+
|
|
3
|
+
{{project.description}}
|
|
4
|
+
|
|
5
|
+
## Install & Run
|
|
6
|
+
|
|
7
|
+
### Quick Start
|
|
8
|
+
```bash
|
|
9
|
+
# Install
|
|
10
|
+
npm install
|
|
11
|
+
|
|
12
|
+
# Configure (copy config/local.yaml from config/_local.yaml)
|
|
13
|
+
# Add database credentials
|
|
14
|
+
|
|
15
|
+
# Build
|
|
16
|
+
npm run build
|
|
17
|
+
|
|
18
|
+
# Run (STDIO mode for Claude Desktop)
|
|
19
|
+
npm start
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Test Run
|
|
23
|
+
```bash
|
|
24
|
+
# Unit tests
|
|
25
|
+
npm test
|
|
26
|
+
|
|
27
|
+
# MCP protocol tests
|
|
28
|
+
npm run test:mcp # STDIO mode
|
|
29
|
+
npm run test:mcp-http # HTTP mode
|
|
30
|
+
npm run test:mcp-simple # Simple test
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Dual Transport System
|
|
34
|
+
|
|
35
|
+
**STDIO Mode** (default for Claude Desktop):
|
|
36
|
+
- Direct stdin/stdout communication
|
|
37
|
+
- Optimal for Claude Desktop integration
|
|
38
|
+
- No network ports required
|
|
39
|
+
|
|
40
|
+
**HTTP Mode** (web integration):
|
|
41
|
+
- HTTP server with Server-Sent Events (SSE)
|
|
42
|
+
- About page with server status at `http://localhost:{{port}}/`
|
|
43
|
+
- Health check endpoint at `/health`
|
|
44
|
+
- Direct JSON-RPC 2.0 endpoint at `/mcp`
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Features
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## MCP Tools
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## MCP Prompts
|
|
56
|
+
|
|
57
|
+
### `agent_brief`
|
|
58
|
+
Brief description of agent capabilities for agent selection.
|
|
59
|
+
|
|
60
|
+
### `agent_prompt`
|
|
61
|
+
Complete prompt with instructions.
|
|
62
|
+
|
|
63
|
+
## MCP Resources
|
|
64
|
+
|
|
65
|
+
### `staff://agent/brief`
|
|
66
|
+
Same as `agent_brief` prompt. **MIME:** text/plain
|
|
67
|
+
|
|
68
|
+
### `staff://agent/prompt`
|
|
69
|
+
Same as `agent_prompt` prompt. **MIME:** text/plain
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## 2. Configuration
|
|
73
|
+
|
|
74
|
+
**Option A: Configuration File**
|
|
75
|
+
|
|
76
|
+
**Option B: Environment Variables**
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## Claude Desktop Setup
|
|
80
|
+
|
|
81
|
+
Add to `claude_desktop_config.json`:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"mcpServers": {
|
|
86
|
+
"{{project.name}}": {
|
|
87
|
+
"command": "node",
|
|
88
|
+
"args": [
|
|
89
|
+
"<path-to-project>/mcp-staff-db/dist/src/index.js"
|
|
90
|
+
],
|
|
91
|
+
"env": {
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## HTTP Mode Endpoints
|
|
99
|
+
|
|
100
|
+
- **/** - About page
|
|
101
|
+
- **/health** - Health check
|
|
102
|
+
- **/sse** - Server-Sent Events
|
|
103
|
+
- **/mcp** - JSON-RPC 2.0
|
|
104
|
+
|
|
105
|
+
## Security
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
2
|
-
<
|
|
3
|
-
d="m 17.622437,19.155864 v -2.611959 h 2.251659 v 2.611959 H 22.468 v 2.251688 h -2.593904 v 2.581936 h -2.251659 v -2.581936 h -2.632933 v -2.251688 z m -5.686183,2.592444 v 2.251688 H 1.4 V 0 H 22.404961 V 15.011256 H 20.153302 V 2.251689 H 3.6516577 V 21.748308 H 11.937755 Z M 7.4959862,7.535651 V 6.034525 h 8.9705968 v 1.501126 z m 0.02402,4.552914 v -1.501126 h 8.9180578 v 1.501126 z m 0.02252,4.420814 v -1.501125 h 5.9278628 v 1.501125 z" />
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
|
2
|
+
<rect width="16" height="16" fill="${appConfig.uiColor.primary || '#007ACC'}"/>
|
|
4
3
|
</svg>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// Import all project data from existing files
|
|
2
2
|
// @ts-ignore
|
|
3
|
-
import { appConfig, initMcpServer, McpServerData } from 'fa-mcp-sdk';
|
|
4
|
-
import { readFileSync } from 'fs';
|
|
5
|
-
import { join } from 'path';
|
|
3
|
+
import { appConfig, initMcpServer, McpServerData, getAsset } from 'fa-mcp-sdk';
|
|
6
4
|
import { tools } from './tools/tools.js';
|
|
7
5
|
import { handleToolCall } from './tools/handle-tool-call.js';
|
|
8
6
|
import { AGENT_BRIEF } from './prompts/agent-brief.js';
|
|
@@ -20,17 +18,7 @@ const isConsulProd = (process.env.NODE_CONSUL_ENV || process.env.NODE_ENV) === '
|
|
|
20
18
|
*/
|
|
21
19
|
const startProject = async (): Promise<void> => {
|
|
22
20
|
// Read favicon from assets
|
|
23
|
-
const
|
|
24
|
-
let favicon: string;
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
favicon = readFileSync(faviconPath, 'utf-8');
|
|
28
|
-
} catch (_error) {
|
|
29
|
-
// Fallback if favicon not found
|
|
30
|
-
favicon = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
|
31
|
-
<rect width="16" height="16" fill="${appConfig.uiColor.primary || '#007ACC'}"/>
|
|
32
|
-
</svg>`;
|
|
33
|
-
}
|
|
21
|
+
const favicon = getAsset('favicon.svg')!;
|
|
34
22
|
|
|
35
23
|
// Assemble all data to pass to the core
|
|
36
24
|
const serverData: McpServerData = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fa-mcp-sdk",
|
|
3
3
|
"productName": "FA MCP SDK",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.107",
|
|
5
5
|
"description": "Core infrastructure and templates for building Model Context Protocol (MCP) servers with TypeScript",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/core/index.js",
|