AI Hints
Home›MCP Tutorial›Completions and Instructions
MCP · Lesson 47 of 120

Server Instructions

A guide for the model.

⏱ 2 min read▶ Video at 41:57🎓 Free
Watch this lesson in the MCP courseWatch on YouTube ↗Full MCP course

A server can include instructions, a short guide that hosts can add to the model's system prompt. It explains how the tools fit together, and when to use each one.

Server Instructions
From the video: Server Instructions
  • A short guide
  • Into the system prompt
  • How tools fit together

Adding instructions

We pass instructions when creating the server. The client receives them when it connects. Run it. The client prints the server's guide.

instructions.pypython
import asyncio
from mcp import Client
from mcp.server.mcpserver import MCPServer

mcp = MCPServer("northwind", instructions=(
    "Northwind Bikes support tools. Use order_status for order questions. "
    "Read policy:// resources before answering policy questions. "
    "Never cancel an order without the customer's clear request."))

async def main():
    async with Client(mcp) as client:
        print(client.instructions)

asyncio.run(main())
Output
Northwind Bikes support tools. Use order_status for order questions. Read policy://
resources before answering policy questions. Never cancel an order without the
customer's clear request.

Good instructions

Say what the server is for. Explain how tools relate. State any rules, like asking before cancelling. And keep it short, because it's added to every conversation.

keyvalue
Purposeone line
Relationswhich tool when
Ruleswhat never to do
Lengthshort

Summary

Server instructions give the model a short guide to your tools. Next, practice with support prompts.

Key takeaways
  • instructions=
  • Purpose
  • Rules
Next up: Practice: Support Prompts — two templates