Resource / data source

MCP Python SDK Bookshop Configuration Resource

A minimal Python SDK example that exposes application configuration as an addressable MCP resource rather than an action tool.

About this listing

This small resource example in the official MCP Python SDK demonstrates how an application can load configuration into model context. The Bookshop server registers get_config at config://app and returns two text settings: a dark theme and English language. It is a teaching component, not a hosted configuration service or a connection to a real shop.

The accompanying SDK documentation explains that the function runs when a client reads its URI, not when resources are listed. Developers can use the example to understand resource registration and the separation between reading application context and invoking model-selected tools. The SDK source is MIT-licensed and free to use; running an adapted server and any separately selected model or infrastructure can incur their own costs.

Source: Visionary Junction · Reuse terms