Skip to main content

Code

Secure the instance with OS_SECURITY_KEY. Every request to the API and to /mcp must then carry Authorization: Bearer <key>.
cookbook/05_agent_os/mcp_demo/mcp_server_example.py

Define a Local Test Client

The client connects to /mcp with the security key in the Authorization header and drives the built-in tools.
test_client.py

Usage

1

Set up your virtual environment

2

Set Environment Variables

3

Install dependencies

4

Run Server

5

Run Test Client