Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FastMCP Examples

πŸš€ Quick Start

1. Install Dependencies

python -m src.main
pip install -e .

2. Run the Server

uv run python -m src.main

The server will start on http://localhost:8081

3. Test the Endpoints

Homepage with trace info:

curl http://localhost:8081/

Health check:

curl http://localhost:8081/health

Async operations demo:

curl http://localhost:8081/demo-async

Ping with trace headers:

curl -H "X-Session-ID: my-session-123" http://localhost:8080/ping

πŸ“Š Understanding the Logs

When you make requests, you'll see logs like this:

2024-01-15 10:30:45 - src.main - INFO - [req=a1b2c3d4|session=550e8400] - Request started: GET /
2024-01-15 10:30:45 - src.main - INFO - [req=a1b2c3d4|session=550e8400] - Homepage accessed
2024-01-15 10:30:45 - src.tracing_middleware - INFO - [req=a1b2c3d4|session=550e8400] - Request completed: 200 in 12.3ms

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages