MCP Python SDK Bookshop Catalog Statistics Resource
A compact SDK example of an MCP JSON resource that exposes book and author counts.
About this listing
This Bookshop example in the official MCP Python SDK demonstrates a structured resource for catalogue statistics. It registers stats://catalog with the application/json media type and returns a Python dictionary with books and authors entries. The example contains fixed illustrative counts, not a live book database. Developers can use it to understand how a small typed function becomes readable context for an MCP client, then connect their own data source when implementing a real service. This is a source-code example rather than a hosted statistics service. The SDK code is available under the MIT licence; running your own server and any separately selected model or infrastructure may incur costs.