Skip to content

Commit 8dff5db

Browse files
authored
Add guides folder and weather-mcp guide (#1281)
### Description Build an MCP Server with Weather tools using Express and Vercel ### Demo URL To be used as reference for this guide: https://vercel.com/guides/mcp-server-with-weather-tool-express?__vercel_draft=1 ### Type of Change - [x] New Example - [ ] Example updates (Bug fixes, new features, etc.) - [ ] Other (changes to the codebase, but not to examples) ### New Example Checklist - [x] 🛫 `npm run new-example` was used to create the example - [ ] 📚 The template wasn't used but I carefuly read the [Adding a new example](https://github.com/vercel/examples#adding-a-new-example) steps and implemented them in the example - [ ] 📱 Is it responsive? Are mobile and tablets considered?
1 parent b2adf5c commit 8dff5db

File tree

8 files changed

+1729
-0
lines changed

8 files changed

+1729
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"root": true,
3+
"extends": "next/core-web-vitals"
4+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# Dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# Testing
9+
/coverage
10+
11+
# Next.js
12+
/.next/
13+
/out/
14+
next-env.d.ts
15+
16+
# Production
17+
build
18+
dist
19+
20+
# Misc
21+
.DS_Store
22+
*.pem
23+
24+
# Debug
25+
npm-debug.log*
26+
yarn-debug.log*
27+
yarn-error.log*
28+
29+
# Local ENV files
30+
.env.local
31+
.env.development.local
32+
.env.test.local
33+
.env.production.local
34+
35+
# Vercel
36+
.vercel
37+
38+
# Turborepo
39+
.turbo
40+
41+
# typescript
42+
*.tsbuildinfo
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
This example shows how to build an MCP Server with Weather tools using Express and Vercel
2+
3+
## How to Use
4+
5+
You can choose from one of the following two methods to use this repository:
6+
7+
### One-Click Deploy
8+
9+
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples):
10+
11+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/guides/express-weather-mcp-server&project-name=express-weather-mcp-server&repository-name=express-weather-mcp-server)
12+
13+
### Clone and Deploy
14+
15+
You can clone just this directory using:
16+
17+
```bash
18+
npx degit vercel/examples/guides/express-weather-mcp-server express-weather-mcp-server
19+
cd express-weather-mcp-server
20+
```
21+
22+
Run the Express app in development mode:
23+
24+
First install the [Vercel CLI](https://vercel.com/docs/cli). You will need to link the code with a Vercel project.
25+
26+
```bash
27+
vercel dev
28+
```
29+
30+
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples) ([Documentation](https://vercel.com/docs)).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "express-weather-mcp-server",
3+
"repository": "https://github.com/vercel/examples.git",
4+
"license": "MIT",
5+
"type": "module",
6+
"private": true,
7+
"scripts": {
8+
"dev": "vc dev"
9+
},
10+
"dependencies": {
11+
"express": "^5.1.0",
12+
"mcp-handler": "^1.0.3",
13+
"zod": "3.23.8"
14+
},
15+
"devDependencies": {
16+
"@types/express": "^5.0.0",
17+
"@types/node": "^20.0.0",
18+
"tsx": "^4.7.0",
19+
"typescript": "^5.0.0"
20+
}
21+
}

0 commit comments

Comments
 (0)