Skip to content

Commit 138d51c

Browse files
give the MCP server itself some instructions
1 parent 764294d commit 138d51c

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

ai/mcp_server_fastmcp/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fi
9494
project_guid=$(ibmcloud ce project get --name $ce_project_name --output json | jq -r '.guid')
9595

9696
print_msg "\nCreating the MCP Server as a code engine application"
97-
ibmcloud ce app create --name fastmcp --build-source ./server --build-strategy buildpacks --cpu 1 --memory 4G -p 8080 --wait-timeout 600 --min-scale 0 --scale-down-delay 120 --visibility public
97+
ibmcloud ce app create --name fastmcp --build-source ./server --build-strategy buildpacks --cpu 1 --memory 4G -p 8080 --wait-timeout 600 --min-scale 1 --scale-down-delay 120 --visibility public
9898

9999
while true; do
100100
ibmcloud ce app list

ai/mcp_server_fastmcp/server/main.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
from fastmcp import FastMCP
33
import weather_api
44

5-
mcp = FastMCP("Weather MCP Server on Code Engine")
5+
mcp = FastMCP(name="Weather MCP Server on Code Engine", instructions="""
6+
OpenWeatherMap MCP Server
7+
8+
This server provides comprehensive and live weather data from OpenWeatherMap API.
9+
10+
Available tools:
11+
- get_current_weather: Current weather for any location
12+
- get_forecast: 5-day weather forecast
13+
- search_location: Find locations by name
14+
""")
615

716

817
@mcp.tool

0 commit comments

Comments
 (0)