fa-mcp-sdk 0.2.249 → 0.2.258
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/cli-template/FA-MCP-SDK-DOC/00-FA-MCP-SDK-index.md +45 -161
- package/cli-template/FA-MCP-SDK-DOC/01-getting-started.md +71 -226
- package/cli-template/FA-MCP-SDK-DOC/02-1-tools-and-api.md +80 -360
- package/cli-template/FA-MCP-SDK-DOC/02-2-prompts-and-resources.md +191 -342
- package/cli-template/FA-MCP-SDK-DOC/03-configuration.md +141 -279
- package/cli-template/FA-MCP-SDK-DOC/04-authentication.md +73 -522
- package/cli-template/FA-MCP-SDK-DOC/05-ad-authorization.md +68 -419
- package/cli-template/FA-MCP-SDK-DOC/06-utilities.md +64 -447
- package/cli-template/FA-MCP-SDK-DOC/07-testing-and-operations.md +39 -196
- package/cli-template/package.json +2 -1
- package/config/local.yaml +1 -1
- package/dist/core/_types_/types.d.ts +36 -10
- package/dist/core/_types_/types.d.ts.map +1 -1
- package/dist/core/auth/admin-auth.js +1 -1
- package/dist/core/auth/admin-auth.js.map +1 -1
- package/dist/core/auth/middleware.js +8 -8
- package/dist/core/auth/middleware.js.map +1 -1
- package/dist/core/auth/multi-auth.d.ts.map +1 -1
- package/dist/core/auth/multi-auth.js +15 -14
- package/dist/core/auth/multi-auth.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/mcp/create-mcp-server.js +8 -9
- package/dist/core/mcp/create-mcp-server.js.map +1 -1
- package/dist/core/mcp/prompts.d.ts +10 -5
- package/dist/core/mcp/prompts.d.ts.map +1 -1
- package/dist/core/mcp/prompts.js +17 -15
- package/dist/core/mcp/prompts.js.map +1 -1
- package/dist/core/mcp/resources.d.ts +4 -4
- package/dist/core/mcp/resources.d.ts.map +1 -1
- package/dist/core/mcp/resources.js +21 -20
- package/dist/core/mcp/resources.js.map +1 -1
- package/dist/core/utils/utils.d.ts +2 -1
- package/dist/core/utils/utils.d.ts.map +1 -1
- package/dist/core/utils/utils.js +2 -2
- package/dist/core/utils/utils.js.map +1 -1
- package/dist/core/web/home-api.d.ts.map +1 -1
- package/dist/core/web/home-api.js +4 -3
- package/dist/core/web/home-api.js.map +1 -1
- package/dist/core/web/server-http.d.ts.map +1 -1
- package/dist/core/web/server-http.js +36 -21
- package/dist/core/web/server-http.js.map +1 -1
- package/package.json +1 -1
- package/scripts/update-doc.js +21 -0
- package/src/template/start.ts +1 -1
|
@@ -1,324 +1,191 @@
|
|
|
1
1
|
# Configuration, Cache, and Database
|
|
2
2
|
|
|
3
|
-
## Configuration
|
|
3
|
+
## Configuration
|
|
4
4
|
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
Access configuration in your code:
|
|
5
|
+
### appConfig Access
|
|
8
6
|
|
|
9
7
|
```typescript
|
|
10
8
|
import { appConfig } from 'fa-mcp-sdk';
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
const serverPort = appConfig.webServer.port;
|
|
10
|
+
const port = appConfig.webServer.port;
|
|
14
11
|
const dbEnabled = appConfig.isMainDBUsed;
|
|
15
12
|
const transport = appConfig.mcp.transportType; // 'stdio' | 'http'
|
|
16
13
|
```
|
|
17
14
|
|
|
18
15
|
### Service Identification
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
process.env.SERVICE_NAME || package.json.name
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
A derivative value `appConfig.shortName` is also created by removing "mcp" from the name:
|
|
30
|
-
```typescript
|
|
31
|
-
shortName = name.replace(/[\s\-]*\bmcp\b[\s\-]*/ig, '');
|
|
32
|
-
// Example: "my-mcp-service" → "my-service"
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
**Usage locations:**
|
|
36
|
-
|
|
37
|
-
| Component | Property | Purpose |
|
|
38
|
-
|--------------|-----------------------|-----------------------------------------|
|
|
39
|
-
| Consul | `consul.service.name` | Service registration in Consul |
|
|
40
|
-
| MCP Server | Server name | MCP protocol server identifier |
|
|
41
|
-
| Logger | File prefix | Log file naming (`<name>.log`) |
|
|
42
|
-
| JWT Auth | `expectedService` | Token validation - checks service claim |
|
|
43
|
-
| Admin API | `serviceName` | Service identification in API responses |
|
|
44
|
-
| MCP Resource | `project://id` | Returns service identifier |
|
|
45
|
-
| Cache | `keyPrefix` | Uses `shortName` for cache key prefixes |
|
|
46
|
-
| PM2 | Process name | `<name>[--<SERVICE_INSTANCE>]` |
|
|
47
|
-
|
|
48
|
-
#### PRODUCT_NAME → `appConfig.productName`
|
|
49
|
-
|
|
50
|
-
**Formation:**
|
|
51
|
-
```
|
|
52
|
-
process.env.PRODUCT_NAME || package.json.productName
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
This is the human-readable display name for the service.
|
|
56
|
-
|
|
57
|
-
**Usage locations:**
|
|
58
|
-
|
|
59
|
-
| Component | Purpose |
|
|
60
|
-
|-----------------|---------------------------------------|
|
|
61
|
-
| OpenAPI/Swagger | API title in documentation |
|
|
62
|
-
| Home page | Service title in web UI header |
|
|
63
|
-
| Server startup | Displayed in console startup message |
|
|
64
|
-
| MCP Resource | `project://name` returns product name |
|
|
65
|
-
|
|
66
|
-
#### Environment Variables
|
|
17
|
+
| Variable | Source | Usage |
|
|
18
|
+
|----------|--------|-------|
|
|
19
|
+
| `appConfig.name` | `SERVICE_NAME` env or `package.json.name` | Consul, JWT, logs, MCP server ID |
|
|
20
|
+
| `appConfig.shortName` | name without "mcp" | Cache key prefix |
|
|
21
|
+
| `appConfig.productName` | `PRODUCT_NAME` env or `package.json.productName` | Swagger title, UI header |
|
|
67
22
|
|
|
68
|
-
|
|
23
|
+
### config/default.yaml
|
|
69
24
|
|
|
70
|
-
```bash
|
|
71
|
-
# Service identifier (technical name)
|
|
72
|
-
SERVICE_NAME=my-mcp-service
|
|
73
|
-
|
|
74
|
-
# Human-readable display name
|
|
75
|
-
PRODUCT_NAME=My MCP Service
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Configuration Files
|
|
79
|
-
|
|
80
|
-
**`config/default.yaml`** - Base configuration:
|
|
81
25
|
```yaml
|
|
82
26
|
accessPoints:
|
|
83
27
|
myService:
|
|
84
|
-
title: '
|
|
28
|
+
title: 'Remote service'
|
|
85
29
|
host: <host>
|
|
86
30
|
port: 9999
|
|
87
31
|
token: '***'
|
|
88
|
-
noConsul: true
|
|
89
|
-
consulServiceName: <
|
|
32
|
+
noConsul: true
|
|
33
|
+
consulServiceName: <name>
|
|
90
34
|
|
|
91
|
-
# --------------------------------------------------
|
|
92
|
-
# CACHING Reduces API calls by caching responses
|
|
93
|
-
# --------------------------------------------------
|
|
94
35
|
cache:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
# Default maximum number of cached items
|
|
98
|
-
maxItems: 1000
|
|
36
|
+
ttlSeconds: 300
|
|
37
|
+
maxItems: 1000
|
|
99
38
|
|
|
100
39
|
consul:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
40
|
+
check:
|
|
41
|
+
interval: '10s'
|
|
42
|
+
timeout: '5s'
|
|
43
|
+
deregistercriticalserviceafter: '3m'
|
|
44
|
+
agent:
|
|
45
|
+
# Credentials for getting information about services in the DEV DC
|
|
46
|
+
dev:
|
|
47
|
+
dc: '{{consul.agent.dev.dc}}'
|
|
48
|
+
host: '{{consul.agent.dev.host}}'
|
|
49
|
+
port: 443
|
|
50
|
+
secure: true
|
|
51
|
+
# Token for getting information about DEV services
|
|
52
|
+
token: '***'
|
|
53
|
+
# Credentials for getting information about services in the PROD DC
|
|
54
|
+
prd:
|
|
55
|
+
dc: '{{consul.agent.prd.dc}}'
|
|
56
|
+
host: '{{consul.agent.prd.host}}'
|
|
57
|
+
port: 443
|
|
58
|
+
secure: true
|
|
59
|
+
# Token for obtaining information about PROD services
|
|
60
|
+
token: '***'
|
|
61
|
+
# Credentials for registering the service with Consul
|
|
62
|
+
reg:
|
|
63
|
+
# The host of the consul agent where the service will be registered. If not specified, the server on which the service is running is used
|
|
64
|
+
host: null
|
|
65
|
+
port: 8500
|
|
66
|
+
secure: false
|
|
67
|
+
# Token for registering the service in the consul agent
|
|
68
|
+
token: '***'
|
|
69
|
+
service:
|
|
70
|
+
enable: {{consul.service.enable}} # true - Allows registration of the service with the consul
|
|
71
|
+
name: <name> # <name> will be replaced by <package.json>.name at initialization
|
|
72
|
+
instance: '{{SERVICE_INSTANCE}}' # This value will be specified as a suffix in the id of the service
|
|
73
|
+
version: <version> # <version> will be replaced by <package.json>.version at initialization
|
|
74
|
+
description: <description> # <description> will be replaced by <package.json>.description at initialization
|
|
75
|
+
tags: [] # If null or empty array - Will be pulled up from package.keywords at initialization
|
|
76
|
+
meta:
|
|
77
|
+
# "Home" page link template
|
|
78
|
+
who: 'http://{address}:{port}/'
|
|
79
|
+
envCode: # Used to generate the service ID
|
|
80
|
+
prod: {{consul.envCode.prod}} # Production environment code
|
|
81
|
+
dev: {{consul.envCode.dev}} # Development environment code
|
|
143
82
|
|
|
144
83
|
db:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
usedExtensions: []
|
|
84
|
+
postgres:
|
|
85
|
+
dbs:
|
|
86
|
+
main:
|
|
87
|
+
label: 'My Database'
|
|
88
|
+
host: '' # Empty = DB disabled
|
|
89
|
+
port: 5432
|
|
90
|
+
database: <database>
|
|
91
|
+
user: <user>
|
|
92
|
+
password: <password>
|
|
155
93
|
|
|
156
94
|
logger:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
dir: '{{logger.dir}}'
|
|
95
|
+
level: info
|
|
96
|
+
useFileLogger: {{logger.useFileLogger}}
|
|
97
|
+
dir: '{{logger.dir}}'
|
|
161
98
|
|
|
162
99
|
mcp:
|
|
163
|
-
|
|
164
|
-
#
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
rateLimit:
|
|
169
|
-
maxRequests: 100
|
|
170
|
-
windowMs: 60000 # 1 minute
|
|
100
|
+
transportType: http # stdio | http
|
|
101
|
+
toolAnswerAs: text # text | structuredContent
|
|
102
|
+
rateLimit:
|
|
103
|
+
maxRequests: 100
|
|
104
|
+
windowMs: 60000
|
|
171
105
|
|
|
172
106
|
swagger:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
# - url: http://0.0.0.0:9020
|
|
177
|
-
# description: "Development server (all interfaces)"
|
|
178
|
-
# - url: http://<prod_server_host_or_ip>:{{port}}
|
|
179
|
-
# description: "PROD server"
|
|
180
|
-
- url: https://{{mcp.domain}}
|
|
181
|
-
description: "PROD server"
|
|
107
|
+
servers:
|
|
108
|
+
- url: https://{{mcp.domain}}
|
|
109
|
+
description: "PROD server"
|
|
182
110
|
|
|
183
111
|
uiColor:
|
|
184
|
-
|
|
185
|
-
|
|
112
|
+
# Font color of the header and a number of interface elements on the HOME page
|
|
113
|
+
primary: '#0f65dc'
|
|
186
114
|
|
|
187
115
|
webServer:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
**`config/local.yaml`** - local overrides. Usually contains secrets.
|
|
234
|
-
|
|
235
|
-
---
|
|
236
|
-
|
|
237
|
-
## Cache Management
|
|
238
|
-
|
|
239
|
-
### `getCache(options?): CacheManager`
|
|
116
|
+
host: '0.0.0.0'
|
|
117
|
+
port: {{port}}
|
|
118
|
+
# array of hosts that CORS skips
|
|
119
|
+
originHosts: ['localhost', '0.0.0.0']
|
|
120
|
+
# Authentication is configured here only when accessing the MCP server
|
|
121
|
+
# Authentication in services that enable tools, resources, and prompts
|
|
122
|
+
# is implemented more deeply. To do this, you need to use the information passed in HTTP headers
|
|
123
|
+
# You can also use a custom authorization function
|
|
124
|
+
auth:
|
|
125
|
+
enabled: false # Enables/disables authorization
|
|
126
|
+
# ========================================================================
|
|
127
|
+
# PERMANENT SERVER TOKENS
|
|
128
|
+
# Static tokens for server-to-server communication
|
|
129
|
+
# CPU cost: O(1) - fastest authentication method
|
|
130
|
+
#
|
|
131
|
+
# To enable this authentication, you need to set auth.enabled = true
|
|
132
|
+
# and set one token of at least 20 characters in length
|
|
133
|
+
# ========================================================================
|
|
134
|
+
permanentServerTokens: [ ] # Add your server tokens here: ['token1', 'token2']
|
|
135
|
+
|
|
136
|
+
# ========================================================================
|
|
137
|
+
# JWT TOKEN WITH SYMMETRIC ENCRYPTION
|
|
138
|
+
# Custom JWT tokens with AES-256 encryption
|
|
139
|
+
# CPU cost: Medium - decryption + JSON parsing
|
|
140
|
+
#
|
|
141
|
+
# To enable this authentication, you need to set auth.enabled = true and set
|
|
142
|
+
# encryptKey to at least 20 characters
|
|
143
|
+
# ========================================================================
|
|
144
|
+
jwtToken:
|
|
145
|
+
# Symmetric encryption key to generate a token for this MCP (minimum 8 chars)
|
|
146
|
+
encryptKey: '***'
|
|
147
|
+
# If webServer.auth.enabled and the parameter true, the service name and the service specified in the token will be checked
|
|
148
|
+
checkMCPName: true
|
|
149
|
+
|
|
150
|
+
# ========================================================================
|
|
151
|
+
# Basic Authentication - Base64 encoded username:password
|
|
152
|
+
# CPU cost: Medium - Base64 decoding + string comparison
|
|
153
|
+
# To enable this authentication, you need to set auth.enabled = true
|
|
154
|
+
# and set username and password to valid values
|
|
155
|
+
# ========================================================================
|
|
156
|
+
basic:
|
|
157
|
+
username: ''
|
|
158
|
+
password: '***'
|
|
240
159
|
|
|
241
|
-
Get or create a global cache instance for your MCP server.
|
|
242
|
-
|
|
243
|
-
```typescript
|
|
244
|
-
import { getCache, CacheManager } from 'fa-mcp-sdk';
|
|
245
|
-
|
|
246
|
-
// Create default cache instance
|
|
247
|
-
const cache = getCache();
|
|
248
|
-
|
|
249
|
-
// Create cache with custom options
|
|
250
|
-
const customCache = getCache({
|
|
251
|
-
ttlSeconds: 600, // Default TTL: 10 minutes
|
|
252
|
-
maxItems: 5000, // Max cached items
|
|
253
|
-
checkPeriod: 300, // Cleanup interval in seconds
|
|
254
|
-
verbose: true // Enable debug logging
|
|
255
|
-
});
|
|
256
160
|
```
|
|
257
161
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
The `CacheManager` provides the following methods:
|
|
261
|
-
|
|
262
|
-
| Method | Description | Example |
|
|
263
|
-
|--------|-------------|---------|
|
|
264
|
-
| `get<T>(key)` | Get value from cache | `const user = cache.get<User>('user:123');` |
|
|
265
|
-
| `set<T>(key, value, ttl?)` | Set value in cache | `cache.set('user:123', userData, 300);` |
|
|
266
|
-
| `has(key)` | Check if key exists | `if (cache.has('user:123')) { ... }` |
|
|
267
|
-
| `del(key)` | Delete key from cache | `cache.del('user:123');` |
|
|
268
|
-
| `take<T>(key)` | Get and delete (single use) | `const otp = cache.take<string>('otp:123');` |
|
|
269
|
-
| `mget<T>(keys[])` | Get multiple values | `const users = cache.mget(['user:1', 'user:2']);` |
|
|
270
|
-
| `mset(items[])` | Set multiple values | `cache.mset([{key: 'a', val: 1}, {key: 'b', val: 2}]);` |
|
|
271
|
-
| `getOrSet<T>(key, factory, ttl?)` | Get or compute value | `const data = await cache.getOrSet('key', () => fetchData());` |
|
|
272
|
-
| `keys()` | List all keys | `const allKeys = cache.keys();` |
|
|
273
|
-
| `flush()` | Clear all entries | `cache.flush();` |
|
|
274
|
-
| `ttl(key, seconds)` | Update key TTL | `cache.ttl('user:123', 600);` |
|
|
275
|
-
| `getTtl(key)` | Get remaining TTL | `const remaining = cache.getTtl('user:123');` |
|
|
276
|
-
| `getStats()` | Get cache statistics | `const stats = cache.getStats();` |
|
|
277
|
-
| `close()` | Close cache resources | `cache.close();` |
|
|
278
|
-
|
|
279
|
-
### Usage Examples
|
|
162
|
+
## Cache
|
|
280
163
|
|
|
281
164
|
```typescript
|
|
282
165
|
import { getCache } from 'fa-mcp-sdk';
|
|
283
166
|
|
|
284
|
-
const cache = getCache();
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
cache.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
cache.
|
|
295
|
-
|
|
167
|
+
const cache = getCache(); // Default options
|
|
168
|
+
const cache = getCache({ ttlSeconds: 600, maxItems: 5000 });
|
|
169
|
+
|
|
170
|
+
// Methods
|
|
171
|
+
cache.set('key', value, ttlSeconds?);
|
|
172
|
+
cache.get<T>('key');
|
|
173
|
+
cache.has('key');
|
|
174
|
+
cache.del('key');
|
|
175
|
+
cache.take<T>('key'); // Get and delete
|
|
176
|
+
cache.mget<T>(['k1', 'k2']);
|
|
177
|
+
cache.mset([{ key: 'a', val: 1 }, { key: 'b', val: 2, ttl: 600 }]);
|
|
178
|
+
cache.keys();
|
|
179
|
+
cache.flush();
|
|
180
|
+
cache.ttl('key', seconds); // Update TTL
|
|
181
|
+
cache.getTtl('key');
|
|
182
|
+
cache.getStats(); // { hitRate, keys, vsize }
|
|
183
|
+
cache.close();
|
|
296
184
|
|
|
297
185
|
// Get-or-set pattern
|
|
298
|
-
const
|
|
299
|
-
'computation:key',
|
|
300
|
-
async () => {
|
|
301
|
-
// This function runs only on cache miss
|
|
302
|
-
return await performExpensiveOperation();
|
|
303
|
-
},
|
|
304
|
-
3600 // Cache for 1 hour
|
|
305
|
-
);
|
|
306
|
-
|
|
307
|
-
// Batch operations
|
|
308
|
-
const userData = cache.mget(['user:1', 'user:2', 'user:3']);
|
|
309
|
-
cache.mset([
|
|
310
|
-
{ key: 'user:1', val: user1Data },
|
|
311
|
-
{ key: 'user:2', val: user2Data, ttl: 600 }
|
|
312
|
-
]);
|
|
313
|
-
|
|
314
|
-
// Cache monitoring
|
|
315
|
-
const stats = cache.getStats();
|
|
316
|
-
console.log(`Hit rate: ${(stats.hitRate * 100).toFixed(1)}%`);
|
|
317
|
-
console.log(`Keys: ${stats.keys}, Memory: ${stats.vsize} bytes`);
|
|
186
|
+
const data = await cache.getOrSet('key', async () => await fetchData(), 3600);
|
|
318
187
|
```
|
|
319
188
|
|
|
320
|
-
---
|
|
321
|
-
|
|
322
189
|
## Database Integration
|
|
323
190
|
|
|
324
191
|
To disable the use of the database, you need to set appConfig.db.postgres.dbs.main.host to an empty value.
|
|
@@ -328,12 +195,7 @@ In this case, when the configuration is formed, appConfig.isMainDBUsed is set to
|
|
|
328
195
|
If you enable database support (`isMainDBUsed: true` in config):
|
|
329
196
|
|
|
330
197
|
```typescript
|
|
331
|
-
import {
|
|
332
|
-
queryMAIN,
|
|
333
|
-
execMAIN,
|
|
334
|
-
oneRowMAIN,
|
|
335
|
-
getMainDBConnectionStatus
|
|
336
|
-
} from 'fa-mcp-sdk';
|
|
198
|
+
import { queryMAIN, execMAIN, oneRowMAIN, queryRsMAIN, checkMainDB } from 'fa-mcp-sdk';
|
|
337
199
|
|
|
338
200
|
// Check database connection. If there is no connection, the application stops
|
|
339
201
|
await checkMainDB();
|