fa-mcp-sdk 0.4.17 → 0.4.19

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.
@@ -522,20 +522,31 @@ at-toast-<type> e.g. at-toast-success, at-toast-error
522
522
  | `at-header-row-<name>` | Row for a specific header (e.g. `at-header-row-Authorization`) |
523
523
  | `at-header-input-<name>` | Input for a specific header value |
524
524
 
525
- **Sidebar — model settings**
525
+ **Sidebar — LLM settings**
526
+
527
+ The sidebar shows only the current model name (read-only) and a gear button. All LLM parameters (Base URL, API Key, Model Name, Temperature, Max Tokens, Max Turns, Limit (chars)) are edited in the LLM Settings modal opened via that button. Settings are persisted in `localStorage['mcpAgentLlmSettings']`. If `agentTester.openAi.exposeToClient` is `true` in config, the server sends `baseURL` and `apiKey` via `GET /agent-tester/api/config` → `llmDefaults` and the UI pre-fills them into localStorage on first open (security note: only enable `exposeToClient` when the tester is protected by `useAuth: true` or deployed in a trusted network). When the effective `apiKey` is empty, a red "API Key is not set" warning is shown below the model name.
526
528
 
527
529
  | testid | Element |
528
530
  |---|---|
529
531
  | `at-model-section` | Model section container |
530
- | `at-model-select` | Model `<select>` |
531
- | `at-custom-model-settings` | "Other..." custom model panel |
532
- | `at-custom-base-url` | Custom base URL input |
533
- | `at-custom-api-key` | Custom API key input |
534
- | `at-custom-model-name` | Custom model name input |
535
- | `at-model-temperature` | Temperature input |
536
- | `at-model-max-tokens` | Max tokens input |
537
- | `at-model-max-turns` | Max turns input |
538
- | `at-tool-result-limit` | Tool result char limit input |
532
+ | `at-model-display` | Read-only current model name |
533
+ | `at-llm-settings-btn` | Gear button that opens the LLM Settings modal |
534
+ | `at-api-key-warning` | "API Key is not set" warning (visible only when `apiKey` is empty) |
535
+ | `at-llm-modal` | LLM Settings modal overlay |
536
+ | `at-llm-modal-close` | Modal close (×) button |
537
+ | `at-llm-modal-cancel` | Modal Cancel button |
538
+ | `at-llm-modal-save` | Modal Save button |
539
+ | `at-llm-base-url` | Base URL input (optional — empty means OpenAI default) |
540
+ | `at-llm-api-key` | API Key input (password field) |
541
+ | `at-llm-api-key-toggle` | Show/hide API key visibility toggle |
542
+ | `at-llm-model-name` | Model Name input (editable combobox) |
543
+ | `at-llm-model-dropdown-toggle` | Model dropdown arrow button |
544
+ | `at-llm-model-dropdown-list` | Model dropdown list (preset models) |
545
+ | `at-llm-model-option-<name>` | Individual model option inside the list |
546
+ | `at-llm-temperature` | Temperature input |
547
+ | `at-llm-max-tokens` | Max tokens input |
548
+ | `at-llm-max-turns` | Max turns input |
549
+ | `at-llm-limit-chars` | Tool result char limit input |
539
550
 
540
551
  **Sidebar — prompts**
541
552
 
@@ -50,7 +50,7 @@
50
50
  "dependencies": {
51
51
  "@modelcontextprotocol/sdk": "^1.29.0",
52
52
  "dotenv": "^17.4.1",
53
- "fa-mcp-sdk": "^0.4.17"
53
+ "fa-mcp-sdk": "^0.4.19"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/express": "^5.0.6",
@@ -1,148 +1,312 @@
1
- # Copy this file to local.yaml and update with your database credentials
2
- # local.yaml is gitignored and won't be committed
3
- ---
4
- ad:
5
- domains:
6
- MYDOMAIN:
7
- default: true
8
- controllers:
9
- - 'ldap://c1.corp.com'
10
- - 'ldap://c2.corp.com'
11
- username: '***'
12
- password: '***'
13
-
14
-
15
- agentTester:
16
- enabled: true
17
- showFooterLink: true # true (default) show Agent Tester link in home page footer; false — hide link without disabling tester
18
- useAuth: false # true — apply full multi-auth middleware (permanentTokens/basic/JWT/custom) to /agent-tester routes, same as MCP endpoints
19
- sessionTtlMs: 28800000 # Browser login session lifetime in milliseconds. Default: 28800000 (8 hours). Applies only when useAuth is true. Sessions are in-memory on the server — lost on restart.
20
- logJson: false # true — emit structured JSON events (tool_call, tool_result, llm_response, response) to stdout during agent execution
21
- openAi:
22
- apiKey: ''
23
- # baseURL: ''
24
- httpHeaders:
25
- # Key-value pairs for HTTP requests that should be auto-populated in agentTester
26
- # Example: X-User-Id: 12345
27
-
28
-
29
- # --------------------------------------------------
30
- # CACHING Reduces API calls by caching responses
31
- # --------------------------------------------------
32
- cache:
33
- # Cache TTL in seconds
34
- ttlSeconds: 300
35
- # Maximum number of cached items
36
- maxItems: 1000
37
-
38
-
39
- consul:
40
- agent:
41
- dev:
42
- # Token for getting information about DEV services
43
- token: '{{consul.agent.dev.token}}'
44
- prd:
45
- # Token for obtaining information about PROD services
46
- token: '{{consul.agent.prd.token}}'
47
- reg:
48
- host: '{{consul.agent.reg.host}}' # 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
49
- # Token for registering the service in the consul agent
50
- token: '{{consul.agent.reg.token}}'
51
- service:
52
- enable: {{consul.service.enable}} # true - Allows registration of the service with the consul
53
- instance: '{{SERVICE_INSTANCE}}' # This value will be specified as a suffix in the id of the service
54
- envCode: # Used to generate the service ID
55
- prod: '{{consul.envCode.prod}}' # Production environment code
56
- dev: '{{consul.envCode.dev}}' # Development environment code
57
-
58
- db:
59
- postgres:
60
- dbs:
61
- main:
62
- label: 'Your Database Label'
63
- database: your_database
64
- host: '' # To exclude the use of the database, you need to set host = ''
65
- port: 5432
66
- user: your_user
67
- password: your_password
68
- # usedExtensions:
69
- # - pgvector
70
-
71
- homePage:
72
- helpLink:
73
- url: '' # If empty — help link is not shown in footer
74
- label: 'Help' # Link text (default: "Help")
75
-
76
- logger:
77
- level: info
78
- useFileLogger: {{logger.useFileLogger}} # To use or not to use logging to a file
79
- # Absolute path to the folder where logs will be written. Default <proj_root>/../logs
80
- dir: '{{logger.dir}}'
81
-
82
- mcp:
83
- transportType: http # 'stdio' or 'http'
84
- toolAnswerAs: text # text | structuredContent
85
- rateLimit:
86
- maxRequests: 100
87
- windowMs: 60000 # 1 minute
88
-
89
- swagger:
90
- servers: # An array of servers that will be added to swagger docs
91
- - url: http://localhost:{{port}}
92
- description: "Local server"
93
-
94
- webServer:
95
- port: {{port}}
96
- # array of hosts that CORS skips
97
- originHosts: [ 'localhost', '0.0.0.0' ]
98
- # Authentication is configured here only when accessing the MCP server
99
- # Authentication in services that enable tools, resources, and prompts
100
- # is implemented more deeply. To do this, you need to use the information passed in HTTP headers
101
- # You can also use a custom authorization function
102
- auth:
103
- enabled: {{webServer.auth.enabled}} # Enables/disables token authorization
104
- # ========================================================================
105
- # PERMANENT SERVER TOKENS
106
- # Static tokens for server-to-server communication
107
- # CPU cost: O(1) - fastest authentication method
108
- #
109
- # To enable this authentication, you need to set auth.enabled = true
110
- # and set one token of at least 20 characters in length
111
- # ========================================================================
112
- permanentServerTokens: [ ] # Add your server tokens here: ['token1', 'token2']
113
-
114
- # ========================================================================
115
- # JWT TOKEN WITH SYMMETRIC ENCRYPTION
116
- # Custom JWT tokens with AES-256 encryption
117
- # CPU cost: Medium - decryption + JSON parsing
118
- #
119
- # To enable this authentication, you need to set auth.enabled = true and set
120
- # encryptKey to at least 20 characters
121
- # ========================================================================
122
- jwtToken:
123
- # Symmetric encryption key to generate a token for this MCP (minimum 8 chars)
124
- encryptKey: '{{webServer.auth.token.encryptKey}}'
125
- # If webServer.auth.enabled and the parameter true, the service name and the service specified in the token will be checked
126
- checkMCPName: {{webServer.auth.token.checkMCPName}}
127
-
128
- # ========================================================================
129
- # Basic Authentication - Base64 encoded username:password
130
- # CPU cost: Medium - Base64 decoding + string comparison
131
- # To enable this authentication, you need to set auth.enabled = true
132
- # and set username and password to valid values
133
- # ========================================================================
134
- basic:
135
- username: ''
136
- password: '***'
137
-
138
- # ========================================================================
139
- # ADMIN PANEL AUTHENTICATION
140
- # Token generation page available at /admin endpoint
141
- # Supports 4 authentication methods: permanentServerTokens, basic, jwtToken, ntlm
142
- # ========================================================================
143
- adminAuth:
144
- enabled: true # Enable/disable admin panel
145
- # Authentication type for admin panel: 'permanentServerTokens' | 'basic' | 'jwtToken' | 'ntlm'
146
- # For permanentServerTokens, basic, jwtToken - uses credentials from webServer.auth section
147
- # For ntlm - uses AD configuration from ad.domains section (no additional credentials needed)
148
- type: 'basic'
1
+ # Copy this file to local.yaml and update with your database credentials
2
+ # local.yaml is gitignored and won't be committed
3
+ ---
4
+
5
+ #> ========================================================================
6
+ #> Outbound access points — connection settings for remote services this MCP talks to.
7
+ #> Each entry under accessPoints is keyed by a logical alias used in code to look up host/port/token.
8
+ #> By default, hosts/ports are resolved via Consul; the fields below let you override that or
9
+ #> describe a service that is not registered in Consul at all.
10
+ #> ========================================================================
11
+ # accessPoints:
12
+ # myService:
13
+ # #> Human-readable title shown in diagnostics and admin pages
14
+ # title: 'My remote service'
15
+ # #> Remote service host (used when noConsul=true or as a fallback)
16
+ # host: <host>
17
+ # #> Remote service TCP port
18
+ # port: 9999
19
+ # #> Auth token sent to the remote service
20
+ # token: '***'
21
+ # #> Use if the service developers do not provide registration in consul —
22
+ # #> disables Consul lookup and forces use of the host/port above
23
+ # noConsul: true
24
+ # #> Override the Consul service name to look up (defaults to the alias key)
25
+ # consulServiceName: <consulServiceName>
26
+
27
+ #> Active Directory / LDAP settings.
28
+ #> Used for authentication/authorization (e.g., NTLM in admin panel) and checking user membership in AD groups.
29
+ ad:
30
+ #> Map of domains. Key is a domain name
31
+ domains:
32
+ MYDOMAIN:
33
+ #> Marks this domain as default one
34
+ default: true
35
+ #> List of LDAP controllers (can be multiple for failover).
36
+ #> Use ldap:// for plain LDAP or ldaps:// for LDAP over TLS.
37
+ controllers:
38
+ - 'ldap://c1.corp.com'
39
+ - 'ldap://c2.corp.com'
40
+ #> Service account (bind DN or username) used to connect to LDAP.
41
+ username: '***'
42
+ #> Service account password.
43
+ password: '***'
44
+ #> Base DN for LDAP searches. Auto-derived from controller URL if not set.
45
+ # baseDn: 'DC=corp,DC=com'
46
+ #> Cache TTL for group membership checks (default: 600000 = 10 min)
47
+ # groupCacheTtlMs: 600000
48
+ #> Cache TTL for user/group DN lookups (default: 86400000 = 24 hours)
49
+ # dnCacheTtlMs: 86400000
50
+
51
+ #> Built-in chat UI for testing MCP tools with an LLM.
52
+ agentTester:
53
+ #> Enables the Agent Tester UI at /agent-tester
54
+ enabled: true
55
+ #> true (default) show Agent Tester link in home page footer; false — hide link without disabling tester
56
+ showFooterLink: true
57
+ #> true — protect Agent Tester with full multi-auth (permanentTokens/basic/JWT/custom);
58
+ #> browser users see a login dialog, headless clients pass Authorization header
59
+ useAuth: false
60
+ #> Browser login session lifetime in milliseconds. Default: 28800000 (8 hours).
61
+ #> Applies only when useAuth is true. Sessions are in-memory on the server — lost on restart.
62
+ sessionTtlMs: 28800000
63
+ #> true — emit structured JSON events (tool_call, tool_result, llm_response, response) to stdout during agent execution
64
+ logJson: false
65
+ #> OpenAI-compatible LLM credentials used by Agent Tester to drive tool calls
66
+ openAi:
67
+ #> API key for LLM provider (OpenAI and compatible)
68
+ apiKey: ''
69
+ #> Key name (for logging and debugging)
70
+ apiKeyName: '***'
71
+ #> Override base URL for OpenAI-compatible providers (Azure, local LLMs, proxies)
72
+ baseURL: ''
73
+ #> -------------------------------------------------------------------------
74
+ #> When true, baseURL and apiKey are sent to the Agent Tester UI as defaults
75
+ #> and auto-saved into the browser's localStorage on first open. The UI shows
76
+ #> them in the LLM Settings dialog. Enable only if the tester is protected by
77
+ #> useAuth=true OR deployed in a trusted network — otherwise anyone who opens
78
+ #> /agent-tester can read the key. Default: false (safe).
79
+ #> -------------------------------------------------------------------------
80
+ exposeToClient: false
81
+
82
+ #> Key-value pairs for HTTP requests that should be auto-populated in agentTester. Example: X-User-Id: 12345
83
+ httpHeaders:
84
+
85
+ #> --------------------------------------------------
86
+ #> CACHING Reduces API calls by caching responses
87
+ #> --------------------------------------------------
88
+ cache:
89
+ #> Time in seconds to check all data and delete expired keys
90
+ checkPeriod: 1200
91
+ #> Default maximum number of cached items
92
+ maxItems: 1000
93
+ #> Default Cache TTL in seconds
94
+ ttlSeconds: 300
95
+
96
+
97
+ #> Consul service discovery and registration settings
98
+ consul:
99
+ #> Health check parameters reported to Consul for this service
100
+ check:
101
+ #> How often Consul invokes the health check
102
+ interval: '10s'
103
+ #> Per-attempt timeout for the health check
104
+ timeout: '5s'
105
+ #> Auto-deregister the service after it has been critical for this duration
106
+ deregistercriticalserviceafter: '3m'
107
+ agent:
108
+ #> Credentials for getting information about services in the DEV DC
109
+ dev:
110
+ #> DEV datacenter name
111
+ dc: '{{consul.agent.dev.dc}}'
112
+ #> DEV consul agent host
113
+ host: '{{consul.agent.dev.host}}'
114
+ #> DEV consul agent port
115
+ port: 443
116
+ #> Use HTTPS for the DEV consul agent
117
+ secure: true
118
+ #> Token for getting information about DEV services
119
+ token: '{{consul.agent.dev.token}}'
120
+ #> Credentials for getting information about services in the PROD DC
121
+ prd:
122
+ #> PROD datacenter name
123
+ dc: '{{consul.agent.prd.dc}}'
124
+ #> PROD consul agent host
125
+ host: '{{consul.agent.prd.host}}'
126
+ #> PROD consul agent port
127
+ port: 443
128
+ #> Use HTTPS for the PROD consul agent
129
+ secure: true
130
+ #> Token for obtaining information about PROD services
131
+ token: '{{consul.agent.prd.token}}'
132
+ #> Credentials for registering the service with Consul
133
+ reg:
134
+ #> The host of the consul agent where the service will be registered.
135
+ #> If not specified, the server on which the service is running is used
136
+ host: '{{consul.agent.reg.host}}'
137
+ #> Consul agent port for registration
138
+ port: 8500
139
+ #> Use HTTPS when calling the registration agent
140
+ secure: false
141
+ #> Token for registering the service in the consul agent
142
+ token: '{{consul.agent.reg.token}}'
143
+ service:
144
+ #> true Allows registration of the service with the consul
145
+ enable: {{consul.service.enable}}
146
+ #> Here you can specify an alternative name for the service.
147
+ #> String "<name>" will be replaced by env SERVICE_NAME | <package.json>.name at initialization
148
+ name: <name>
149
+ #> This value will be specified as a suffix in the id of the service
150
+ instance: '{{SERVICE_INSTANCE}}'
151
+ #> String "<version>" will be replaced by <package.json>.version at initialization
152
+ version: <version>
153
+ #> Here you can specify an alternative name description.
154
+ #> String "<description>" will be replaced by <package.json>.description at initialization
155
+ description: <description>
156
+ #> If null or empty array — Will be pulled up from package.keywords at initialization
157
+ tags: [ ]
158
+ #> Arbitrary metadata published with the service registration
159
+ meta:
160
+ #> "Home" page link template
161
+ who: 'http://{address}:{port}/'
162
+ #> Used to generate the service ID
163
+ envCode:
164
+ #> Production environment code
165
+ prod: '{{consul.envCode.prod}}'
166
+ #> Development environment code
167
+ dev: '{{consul.envCode.dev}}'
168
+
169
+ #> Database connections used by the service
170
+ db:
171
+ #> PostgreSQL connection pool definitions
172
+ postgres:
173
+ #> Map of named PostgreSQL databases (key is a logical alias used in code)
174
+ dbs:
175
+ main:
176
+ #> Human-readable label shown in diagnostics and admin pages
177
+ label: 'Your Database Label'
178
+ #> To exclude the use of the database, you need to set host = ''
179
+ host: ''
180
+ #> PostgreSQL server port
181
+ port: 5432
182
+ #> Database name
183
+ database: your_database
184
+ #> Database user
185
+ user: your_user
186
+ #> Database password
187
+ password: your_password
188
+ #> List of PostgreSQL extensions required by the service (e.g., 'pgvector', 'uuid-ossp')
189
+ usedExtensions: []
190
+ # - pgvector
191
+
192
+
193
+ #> Logging configuration (tslog-based)
194
+ logger:
195
+ #> Minimum log level: silly | trace | debug | info | warn | error | fatal
196
+ level: info
197
+ #> To use or not to use logging to a file
198
+ useFileLogger: {{logger.useFileLogger}}
199
+ #> Absolute path to the folder where logs will be written. Default <proj_root>/../logs
200
+ dir: '{{logger.dir}}'
201
+
202
+ #> MCP (Model Context Protocol) server settings
203
+ mcp:
204
+ #> Transport for the MCP server: stdio | http
205
+ transportType: http
206
+ #> Response format configuration.
207
+ #> - structuredContent — default — the response in result.structuredContent returns JSON
208
+ #> - text — in the response, serialized JSON is returned in result.content[0].text
209
+ toolAnswerAs: text
210
+ #> Per-client request rate limiting for the MCP endpoint
211
+ rateLimit:
212
+ #> Maximum number of requests allowed within windowMs
213
+ maxRequests: 100
214
+ #> Rate limit window length in milliseconds (1 minute)
215
+ windowMs: 60000
216
+
217
+ #> Swagger / OpenAPI documentation settings
218
+ swagger:
219
+ #> An array of servers that will be added to swagger docs
220
+ servers:
221
+ # - url: http://localhost:{{port}}
222
+ # description: "Development server (localhost)"
223
+ # - url: http://0.0.0.0:{{port}}
224
+ # description: "Development server (all interfaces)"
225
+ # - url: http://<prod_server_host_or_ip>:{{port}}
226
+ # description: "PROD server"
227
+ - url: http://localhost:{{port}}
228
+ description: "Local server"
229
+
230
+ #> Service home page (`/`) customization
231
+ homePage:
232
+ #> Optional help link rendered in the home page footer
233
+ helpLink:
234
+ #> If empty — help link is not shown in footer
235
+ url: ''
236
+ #> Link text (default: "Help")
237
+ label: 'Help'
238
+
239
+ #> UI theme overrides for built-in pages (home, admin, agent-tester)
240
+ uiColor:
241
+ #> Font color of the header and a number of interface elements on the HOME page
242
+ primary: '#0f65dc'
243
+
244
+ #> HTTP server hosting MCP, admin panel, agent tester, swagger and health endpoints
245
+ webServer:
246
+ #> Bind address for the HTTP server
247
+ host: '0.0.0.0'
248
+ #> TCP port for the HTTP server
249
+ port: {{port}}
250
+ #> Array of hosts that CORS skips
251
+ originHosts: [ 'localhost', '0.0.0.0' ]
252
+ #> ========================================================================
253
+ #> Authentication is configured here only when accessing the MCP server.
254
+ #> Authentication in services that enable tools, resources, and prompts
255
+ #> is implemented more deeply. To do this, you need to use the information passed in HTTP headers.
256
+ #> You can also use a custom authorization function.
257
+ #> ========================================================================
258
+ auth:
259
+ #> Enables/disables authorization
260
+ enabled: {{webServer.auth.enabled}}
261
+ #> ========================================================================
262
+ #> PERMANENT SERVER TOKENS
263
+ #> Static tokens for server-to-server communication
264
+ #> CPU cost: O(1) — fastest authentication method
265
+ #>
266
+ #> To enable this authentication, you need to set auth.enabled = true
267
+ #> and set one token of at least 20 characters in length
268
+ #> ========================================================================
269
+ #> Add your server tokens here: ['token1', 'token2']
270
+ permanentServerTokens: [ ]
271
+
272
+ #> ========================================================================
273
+ #> JWT TOKEN WITH SYMMETRIC ENCRYPTION
274
+ #> Custom JWT tokens with AES-256 encryption
275
+ #> CPU cost: Medium — decryption + JSON parsing
276
+ #>
277
+ #> To enable this authentication, you need to set auth.enabled = true and set
278
+ #> encryptKey to at least 20 characters
279
+ #> ========================================================================
280
+ jwtToken:
281
+ #> Symmetric encryption key to generate a token for this MCP (minimum 8 chars)
282
+ encryptKey: '{{webServer.auth.token.encryptKey}}'
283
+ #> If webServer.auth.enabled and the parameter true, the service name and the service specified in the token will be checked
284
+ checkMCPName: {{webServer.auth.token.checkMCPName}}
285
+ #> If true and JWT token contains non-empty 'ip' field,
286
+ #> the client IP will be checked against the allowed list in the token
287
+ isCheckIP: false
288
+
289
+ #> ========================================================================
290
+ #> Basic Authentication — Base64 encoded username:password
291
+ #> CPU cost: Medium — Base64 decoding + string comparison
292
+ #> To enable this authentication, you need to set auth.enabled = true
293
+ #> and set username and password to valid values
294
+ #> ========================================================================
295
+ basic:
296
+ #> Username for HTTP Basic auth
297
+ username: ''
298
+ #> Password for HTTP Basic auth
299
+ password: '***'
300
+
301
+ #> ========================================================================
302
+ #> ADMIN PANEL AUTHENTICATION
303
+ #> Token generation page available at /admin endpoint
304
+ #> Supports 4 authentication methods: permanentServerTokens, basic, jwtToken, ntlm
305
+ #> ========================================================================
306
+ adminAuth:
307
+ #> Enable/disable admin panel
308
+ enabled: true
309
+ #> Authentication type for admin panel: 'permanentServerTokens' | 'basic' | 'jwtToken' | 'ntlm'
310
+ #> For permanentServerTokens, basic, jwtToken — uses credentials from webServer.auth section
311
+ #> For ntlm — uses AD configuration from ad.domains section (no additional credentials needed)
312
+ type: 'basic'