fa-mcp-sdk 0.3.2 → 0.3.3
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 +10 -2
- package/cli-template/CLAUDE.md +20 -0
- package/cli-template/package.json +1 -1
- package/cli-template/prompt-example-new-MCP.md +13 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -223,14 +223,22 @@ Note: The `dist/` directory (compiled JavaScript) is created after running `npm
|
|
|
223
223
|
Built-in chat interface for testing MCP server tools using an AI agent (OpenAI-compatible LLM).
|
|
224
224
|
The agent automatically discovers available tools and calls them in a conversational loop.
|
|
225
225
|
|
|
226
|
-
To enable, set environment variables:
|
|
226
|
+
To enable, set environment variables (`.env` or shell):
|
|
227
227
|
```
|
|
228
228
|
AGENT_TESTER_ENABLED=true
|
|
229
229
|
AGENT_TESTER_OPENAI_API_KEY=sk-...
|
|
230
230
|
```
|
|
231
231
|
|
|
232
|
+
Or configure in `config/default.yaml` (or `local.yaml`):
|
|
233
|
+
```yaml
|
|
234
|
+
agentTester:
|
|
235
|
+
enabled: true
|
|
236
|
+
openAi:
|
|
237
|
+
apiKey: sk-...
|
|
238
|
+
```
|
|
239
|
+
|
|
232
240
|
The tester UI is available at `http://localhost:<port>/agent-tester` and auto-connects to the local MCP server.
|
|
233
|
-
Supports custom LLM endpoints, configurable system prompts, and dynamic HTTP headers.
|
|
241
|
+
Supports custom LLM endpoints, configurable system prompts, and dynamic HTTP headers. Recommended model for testing: **gpt-5.2**.
|
|
234
242
|
|
|
235
243
|
## Directory Requirements
|
|
236
244
|
|
package/cli-template/CLAUDE.md
CHANGED
|
@@ -112,6 +112,26 @@ Detailed fa-mcp-sdk docs are in `FA-MCP-SDK-DOC/`:
|
|
|
112
112
|
|
|
113
113
|
The Agent Tester validates the full agent experience: how the LLM interprets tool descriptions, selects tools, passes arguments, and presents results. → See `08-agent-tester-and-headless-api.md` for complete API reference.
|
|
114
114
|
|
|
115
|
+
### Prerequisites
|
|
116
|
+
|
|
117
|
+
Agent Tester requires an OpenAI API key to call the LLM. Before using it, ensure the following configuration is in place:
|
|
118
|
+
|
|
119
|
+
**Option A** — environment variables (`.env` file or shell):
|
|
120
|
+
```
|
|
121
|
+
AGENT_TESTER_ENABLED=true
|
|
122
|
+
AGENT_TESTER_OPENAI_API_KEY=sk-...
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Option B** — `config/default.yaml` (or `local.yaml`):
|
|
126
|
+
```yaml
|
|
127
|
+
agentTester:
|
|
128
|
+
enabled: true
|
|
129
|
+
openAi:
|
|
130
|
+
apiKey: sk-...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**IMPORTANT for Claude Code**: Before running any Agent Tester tests (Headless API or Playwright), verify that the OpenAI API key is configured. Check `.env` for `AGENT_TESTER_OPENAI_API_KEY` or `config/default.yaml` / `config/local.yaml` for `agentTester.openAi.apiKey`. If the key is missing or empty, inform the user that Agent Tester cannot function without it and ask them to provide the key.
|
|
134
|
+
|
|
115
135
|
### What Gets Tested
|
|
116
136
|
|
|
117
137
|
- **Tool architecture** — correct tool decomposition (split or merge?)
|
|
@@ -37,7 +37,7 @@ accessPoints:
|
|
|
37
37
|
currencyService:
|
|
38
38
|
host: smart-trade-ml.com
|
|
39
39
|
port: 5002
|
|
40
|
-
token: '***'
|
|
40
|
+
token: '***'
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
|
|
@@ -51,6 +51,11 @@ accessPoints:
|
|
|
51
51
|
currencyService:
|
|
52
52
|
token: '88888888-4444-4444-4444-bbbbbbbbbbbb'
|
|
53
53
|
|
|
54
|
+
agentTester:
|
|
55
|
+
enabled: true
|
|
56
|
+
openAi:
|
|
57
|
+
apiKey: '<ask the user for the key>'
|
|
58
|
+
|
|
54
59
|
consul:
|
|
55
60
|
service:
|
|
56
61
|
enable: false
|
|
@@ -67,14 +72,6 @@ webServer:
|
|
|
67
72
|
type: 'permanentServerTokens'
|
|
68
73
|
```
|
|
69
74
|
|
|
70
|
-
|
|
71
|
-
### Code Style
|
|
72
|
-
Write code concisely. Avoid unnecessary logging.
|
|
73
|
-
Follow DRY and KISS principles.
|
|
74
|
-
|
|
75
|
-
### Use the fa-mcp-sdk agent
|
|
76
|
-
Follow the recommendations in the file `FA-MCP-SDK-DOC/00-FA-MCP-SDK-index.md`
|
|
77
|
-
|
|
78
75
|
# Task
|
|
79
76
|
|
|
80
77
|
1) Instead of the test tool 'example_tool', add a tool to get the current currency cross-rate.
|
|
@@ -82,7 +79,11 @@ Follow the recommendations in the file `FA-MCP-SDK-DOC/00-FA-MCP-SDK-index.md`
|
|
|
82
79
|
- quoteCurrency - Currency code (ISO 4217 code Alpha-3) - required parameter
|
|
83
80
|
- baseCurrency - Currency code (ISO 4217 code Alpha-3) - optional parameter, default is USD
|
|
84
81
|
|
|
85
|
-
2)
|
|
82
|
+
2) Instead of the test resource 'custom-resource://resource1', add a resource to get the list of available currencies
|
|
83
|
+
|
|
84
|
+
3) 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>
|
|
85
|
+
|
|
86
|
+
4) Replace file content `src/asset/logo.svg` with
|
|
86
87
|
```
|
|
87
88
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
88
89
|
<path fill="currentColor"
|
|
@@ -90,10 +91,6 @@ Follow the recommendations in the file `FA-MCP-SDK-DOC/00-FA-MCP-SDK-index.md`
|
|
|
90
91
|
</svg>
|
|
91
92
|
```
|
|
92
93
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
4) Instead of the test examples in `tests/mcp/test-cases.js`, write tests for our case
|
|
96
|
-
|
|
97
|
-
5) Formulate the prompt AGENT_BRIEF in `src/prompts/agent-brief.ts` and AGENT_PROMPT in src/prompts/agent-prompt.ts
|
|
94
|
+
5) Formulate the prompt AGENT_BRIEF in `src/prompts/agent-brief.ts` and AGENT_PROMPT in `src/prompts/agent-prompt.ts`
|
|
98
95
|
|
|
99
|
-
6) Instead of the
|
|
96
|
+
6) Instead of the test examples in `tests/mcp/test-cases.js`, write tests for our case
|
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.3.
|
|
4
|
+
"version": "0.3.3",
|
|
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",
|