Skip to content

Commit 22d89e2

Browse files
onmaxHugoRCDatinux
authored
fix: improve MCP tool descriptions and evaluations (#2099)
Co-authored-by: Hugo Richard <hugo.richard@vercel.com> Co-authored-by: Sébastien Chopin <atinux@gmail.com>
1 parent f8859a7 commit 22d89e2

File tree

7 files changed

+931
-33
lines changed

7 files changed

+931
-33
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ NUXT_OAUTH_GITHUB_CLIENT_SECRET=
2626
# Session encryption password (generate a secure random string)
2727
# You can use: openssl rand -base64 32
2828
NUXT_SESSION_PASSWORD=
29+
30+
# MCP Evaluation (Optional - for running evalite tests)
31+
OPENAI_API_KEY=
32+
MCP_URL=http://localhost:3000/mcp

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,34 @@ Build the application for production:
6565
pnpm generate
6666
```
6767

68+
### Running Evals for the MCP Server
69+
70+
To run the evals for the MCP server, follow these steps:
71+
72+
1. **Ensure your development server is running**
73+
Start the local Nuxt development server:
74+
```bash
75+
pnpm dev
76+
```
77+
78+
2. **Create an AI Gateway API key**
79+
Go to https://vercel.com/ai-gateway and create an API key.
80+
Add the following variable to your `.env` file (replace `sk-...` with your actual key):
81+
```
82+
AI_GATEWAY_API_KEY=<you-api-key>
83+
```
84+
85+
3. **Run the evals**
86+
You can execute the evals from the command line:
87+
```bash
88+
pnpm eval
89+
```
90+
91+
Or launch the interactive UI to run them via a web interface:
92+
```bash
93+
pnpm eval:ui
94+
```
95+
6896
## License
6997

7098
[MIT License](./LICENSE)

evalite.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import 'dotenv/config'
2+
import { defineConfig } from 'evalite/config'
3+
4+
export default defineConfig({
5+
cache: true
6+
})

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"lint": "eslint . --cache",
1111
"typecheck": "nuxt typecheck",
1212
"test": "pnpm lint && pnpm typecheck",
13+
"eval": "evalite",
14+
"eval:ui": "evalite serve",
1315
"db:generate": "nuxt hub database generate",
1416
"db:migrate": "nuxt hub database migrate"
1517
},
@@ -54,15 +56,19 @@
5456
"valibot": "1.1.0"
5557
},
5658
"devDependencies": {
59+
"@ai-sdk/mcp": "^0.0.8",
60+
"@ai-sdk/openai": "3.0.0-beta.60",
5761
"@iconify-json/vscode-icons": "^1.2.36",
5862
"@nuxt/eslint": "^1.10.0",
5963
"@nuxt/test-utils": "^3.20.1",
6064
"@nuxtjs/turnstile": "^1.1.1",
6165
"@testing-library/vue": "^8.1.0",
6266
"@types/youtube": "^0.1.2",
67+
"ai": "6.0.0-beta.99",
6368
"capture-website": "^5.1.0",
6469
"drizzle-kit": "^0.31.7",
6570
"eslint": "^9.39.1",
71+
"evalite": "1.0.0-beta.13",
6672
"nuxt-content-twoslash": "0.1.2",
6773
"shiki": "^3.15.0",
6874
"twoslash": "^0.3.4",

0 commit comments

Comments
 (0)