fa-mcp-sdk 0.2.225 → 0.2.227
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 +22 -8
- package/cli-template/package.json +1 -1
- package/cli-template/prompt-example-new-MCP.md +27 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,6 +34,11 @@ The framework uses dependency injection to keep the core completely agnostic of
|
|
|
34
34
|
```bash
|
|
35
35
|
fa-mcp
|
|
36
36
|
```
|
|
37
|
+
Or using configuration file:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
fa-mcp config.yaml
|
|
41
|
+
```
|
|
37
42
|
|
|
38
43
|
3) Launching the template MCP server:
|
|
39
44
|
- Navigate to the target directory: `cd <targetPath>`
|
|
@@ -47,13 +52,7 @@ The framework uses dependency injection to keep the core completely agnostic of
|
|
|
47
52
|
You can find an example prompt for creating an MCP server (e.g., a currency exchange rate provider) in `cli-template/prompt-example-new-MCP.md`.
|
|
48
53
|
- Launch your AI coder and provide it with the instructions to build your new MCP server.
|
|
49
54
|
|
|
50
|
-
`
|
|
51
|
-
|
|
52
|
-
### Using Configuration File
|
|
53
55
|
|
|
54
|
-
```bash
|
|
55
|
-
fa-mcp config.yaml
|
|
56
|
-
```
|
|
57
56
|
|
|
58
57
|
## Configuration
|
|
59
58
|
|
|
@@ -123,6 +122,7 @@ fa-mcp --config=my-config.yml
|
|
|
123
122
|
- TypeScript MCP server with HTTP/STDIO transport
|
|
124
123
|
- Express.js web server with Swagger documentation
|
|
125
124
|
- JWT authentication support (optional)
|
|
125
|
+
- Admin panel for generating JWT access tokens (optional)
|
|
126
126
|
- Consul service discovery integration (optional)
|
|
127
127
|
- File and console logging
|
|
128
128
|
- ESLint configuration and Jest testing
|
|
@@ -223,14 +223,28 @@ Note: The `dist/` directory (compiled JavaScript) is created after running `npm
|
|
|
223
223
|
## Server runs at
|
|
224
224
|
`http://localhost:3000` with:
|
|
225
225
|
- MCP endpoints at `/mcp/*`
|
|
226
|
+
- Admin panel for generating access tokens at `/admin`
|
|
226
227
|
- Swagger UI at `/docs`
|
|
227
228
|
- Health check at `/health`
|
|
228
229
|
|
|
229
230
|
## Directory Requirements
|
|
230
231
|
|
|
231
|
-
- **Empty directories only** - CLI aborts if files exist
|
|
232
|
-
- Allowed files: `.git`, `.idea`, `.vscode`, `.DS_Store`, `node_modules`, `dist`, `__misc`, `_tmp`, `.swp`, `.swo`, `.sublime-project`, `.sublime-workspace`, `~last-cli-config.json`
|
|
233
232
|
- Use absolute paths for target directory
|
|
233
|
+
- **Empty directories only** - CLI aborts if files exist except for the following:
|
|
234
|
+
|
|
235
|
+
.git/
|
|
236
|
+
.idea/
|
|
237
|
+
.vscode
|
|
238
|
+
.DS_Store
|
|
239
|
+
node_modules/
|
|
240
|
+
dist/
|
|
241
|
+
__misc/
|
|
242
|
+
_tmp/
|
|
243
|
+
.swp
|
|
244
|
+
.swo
|
|
245
|
+
.sublime-project
|
|
246
|
+
.sublime-workspace
|
|
247
|
+
~last-cli-config.json
|
|
234
248
|
|
|
235
249
|
## Deployment
|
|
236
250
|
|
|
@@ -46,9 +46,23 @@ accessPoints:
|
|
|
46
46
|
Create a file config/local.yaml with the following content:
|
|
47
47
|
|
|
48
48
|
```yaml
|
|
49
|
+
---
|
|
49
50
|
accessPoints:
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
currencyService:
|
|
52
|
+
token: '88888888-4444-4444-4444-bbbbbbbbbbbb'
|
|
53
|
+
|
|
54
|
+
webServer:
|
|
55
|
+
auth:
|
|
56
|
+
enabled: true
|
|
57
|
+
jwtToken:
|
|
58
|
+
encryptKey: 'dbbe87db-90d0-4732-aae3-4089763ec392'
|
|
59
|
+
checkMCPName: true
|
|
60
|
+
basic:
|
|
61
|
+
username: 'userTest'
|
|
62
|
+
password: 'passTest'
|
|
63
|
+
|
|
64
|
+
adminAuth:
|
|
65
|
+
type: 'basic'
|
|
52
66
|
```
|
|
53
67
|
|
|
54
68
|
|
|
@@ -57,7 +71,7 @@ Write code concisely. Avoid unnecessary logging.
|
|
|
57
71
|
Follow DRY and KISS principles.
|
|
58
72
|
|
|
59
73
|
### Use the fa-mcp-sdk agent
|
|
60
|
-
Follow the recommendations in the file FA-MCP-SDK-DOC/00-FA-MCP-SDK-index.md
|
|
74
|
+
Follow the recommendations in the file `FA-MCP-SDK-DOC/00-FA-MCP-SDK-index.md`
|
|
61
75
|
|
|
62
76
|
# Task
|
|
63
77
|
|
|
@@ -66,12 +80,18 @@ Follow the recommendations in the file FA-MCP-SDK-DOC/00-FA-MCP-SDK-index.md
|
|
|
66
80
|
- quoteCurrency - Currency code (ISO 4217 code Alpha-3) - required parameter
|
|
67
81
|
- baseCurrency - Currency code (ISO 4217 code Alpha-3) - optional parameter, default is USD
|
|
68
82
|
|
|
69
|
-
2)
|
|
83
|
+
2) Replace file content `src/asset/logo.svg` with
|
|
84
|
+
```
|
|
85
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
86
|
+
<path fill="currentColor"
|
|
87
|
+
d="M12 14.4q-.8 0-1.4-.6l-.3-.3H10l-1 1v.2l.3.3q.7.8 1.9 1v1l.1.2h1.4l.2-.1v-1q2-.4 2.1-2.2c0-1.8-1.5-2.3-2.5-2.6-1.3-.4-1.5-.5-1.5-1s.8-.6 1.3-.6q.7 0 1.3.4l.3.2h.3l.7-1.3v-.2l-.4-.2Q13.8 8 13 8V7l-.2-.1h-1.4l-.1.2v1q-1.9.6-2 2.2c0 1.9 1.8 2.4 2.7 2.7q1.6.4 1.4.9c0 .4-.8.5-1.2.5m10 .2-.7-.1-.7.3a8.6 8.6 0 0 1-10.9 5.6c-2.8-1-5-3.2-5.7-6l1.7.8q.5.2.8-.3l.3-.5-.3-.8-3.7-2a1 1 0 0 0-.8.4l-2 3.7.3.8.6.3q.5.2.8-.3l.7-1.3A10.4 10.4 0 0 0 17 21.5q3.8-2 5.2-6.1a1 1 0 0 0-.4-.8M24 8q0-.3-.3-.4l-.6-.3-.8.3-.7 1.3A10.4 10.4 0 0 0 7 2.7a10 10 0 0 0-5.2 6q-.2.6.4.8l.6.2q.5.1.7-.4a8.6 8.6 0 0 1 10.9-5.6 9 9 0 0 1 5.7 6.1L18.3 9l-.8.3-.3.5.3.8 3.7 2 .8-.3 2-3.8z"/>
|
|
88
|
+
</svg>
|
|
89
|
+
```
|
|
70
90
|
|
|
71
91
|
3) Instead of the test resource 'custom-resource://resource1', add a resource to get the list of available currencies
|
|
72
92
|
|
|
73
|
-
4) Instead of the test examples in tests/mcp/test-cases.js
|
|
93
|
+
4) Instead of the test examples in `tests/mcp/test-cases.js`, write tests for our case
|
|
74
94
|
|
|
75
|
-
5) Formulate the prompt AGENT_BRIEF in src/prompts/agent-brief.ts and AGENT_PROMPT in src/prompts/agent-prompt.ts
|
|
95
|
+
5) Formulate the prompt AGENT_BRIEF in `src/prompts/agent-brief.ts` and AGENT_PROMPT in src/prompts/agent-prompt.ts
|
|
76
96
|
|
|
77
|
-
6) Instead of the endpoint /api/example (/example) in the file src/api/router.ts
|
|
97
|
+
6) Instead of the endpoint /api/example (/example) in the file `src/api/router.ts`, create the endpoint get-curr-rate as a proxy to http://<appConfig.accessPoints.currencyService.host>:<appConfig.accessPoints.currencyService.port>/currency-service/?rate=<QUOTE_CURRENCY><BASE_CURRENCY>
|
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.227",
|
|
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",
|