Weather‑Smart Merchandiser: Using Notion MCP + Claude to Turn DIY Sales & Weather Data into Layout Actions
Karlis

Karlis @acaciaman

About: Solo, AI‑assisted projects and games by a software developer.

Location:
Riga, Latvia
Joined:
Feb 25, 2026

Weather‑Smart Merchandiser: Using Notion MCP + Claude to Turn DIY Sales & Weather Data into Layout Actions

Publish Date: Mar 6
2 0

This is a submission for the Notion MCP Challenge

What I Built

I built Weather‑Smart Merchandiser, a weather‑driven merchandising tool that analyses historical sales–weather data, forecasts demand by temperature bucket, and then generates store layout‑change suggestions for a DIY store.

Under the hood, it’s a Python project exposed as an MCP server, so AI assistants (like Claude Desktop) can call high‑level tools such as layout_actions or top_categories instead of manually running scripts. The workflow is: the assistant looks at recent DIY sales and temperatures, classifies upcoming days as cold / mild / warm, and then proposes concrete layout moves (e.g., “move garden tools to front endcap for the warm weekend” or “highlight insulation at the entrance for a cold spell”).

On top of that, I use a Notion workspace as the control center:

  • A “Sales & Weather (Daily)” database holds the input data.
  • A “DIY Categories & Layout” database describes where each category currently lives in the store.
  • A “Layout Actions” database is automatically populated by the MCP tools with suggested moves, dates, and expected uplift.

The result is a small but realistic “weather‑smart” merchandising assistant for a DIY store that feels like a real workflow, not just a toy script.

Incremental updates

I am used to develop things incrementally. As there is still time left in the challenge, I will improve the solution and in this section will write my updates.

First incremental update: Added a Kanban view to the Layout Actions database in the DIY dashboard. Now store managers can instantly see actions flowing from Planned → In Progress → Done at a glance, making the workflow feel even more production-ready.

Added SQLite database for Python MCP server

Switched from CSV to JSON data exchange format: Discovered an issue. FastMCP's _convert_to_content function iterates over list results and converts each item separately into its own TextContent block. So when your tool returned list[dict], each dict became a separate JSON text block — producing {...}{...}{...} (concatenated objects) instead of {...}, {...}, {...}. The fix: all three tools (demand_signals, forecast, layout_actions) now return json.dumps(result, indent=2) — a single JSON string that FastMCP wraps in one TextContent block. Restarted Claude Desktop to pick up the change.

Added Sales insights subpage in DIY dashboard: Added also Claude Desktop prompt in GitHub repository to fill in Sales insights subpage.

Video Demo

https://github.com/user-attachments/assets/bdb07f87-5e2a-4974-be23-12ba47560132

Public Notion project page:
https://neighborly-fridge-ea2.notion.site/Weather-smart-merchandiser-31a4fffb13a880618b7fd4198be66b30

Public Notion DIY dashboard:
https://neighborly-fridge-ea2.notion.site/DIY-Weather-Smart-Merchandising-fffb7fe844f841bda431202321e29ac9

I recorded a short video walkthrough showing:

  • How I trigger the workflow from Claude Desktop by asking: “Generate layout actions from Sales & Weather for the next 3 days and write them into Notion.”
  • How the MCP server returns suggested actions (per store, date, category, and temperature bucket).
  • How Claude then uses Notion’s MCP integration to create new rows in the “Layout Actions” database and generate a “Store Playbook” summary page in Notion.
  • How I can also ask Claude to summarize the weekend layout actions into a concise briefing, so store staff get a quick “weekend plan” without reading every individual row.
  • The final Notion DIY dashboard that shows weather, recent sales, and planned layout changes in one place.

Show us the code

The full source code is available here:

GitHub repo: https://github.com/AcaciaMan/weather-smart-merchandiser

Key pieces:

  • first_python_module.py – core library with reusable functions for:
    • loading the sales_weather_daily.csv dataset
    • computing demand signals by temperature bucket
    • generating a simple forecast
    • producing layout‑change suggestions
  • server.py – MCP server entry point that wraps these functions as MCP tools.
  • sales_weather_daily.csv – example dataset with Date, Store, Temp °C, Weather, Category, Units Sold, Revenue €.
  • requirements.txt – Python dependencies.

You can run it in three ways:

  • As an MCP server from a client (e.g., Claude Desktop).
  • With an MCP inspector / dev CLI for testing.
  • As a standalone script to generate layout actions into layout_actions_suggested.csv.

How I Used Notion MCP

My goal was: say one prompt, get real layout actions written into Notion automatically, and optionally get a weekend summary.

I used Notion’s MCP integration together with my custom Python MCP server so an AI assistant can orchestrate the whole chain:

  1. Custom MCP server (Python)

    • I implemented tools such as:
      • list_stores – list unique stores in the dataset.
      • demand_signals – average units sold per temperature bucket and category.
      • top_categories – top sellers for cold / mild / warm conditions.
      • classify_temperature – classify any °C value into a bucket.
      • forecast – a simple temperature forecast for upcoming days.
      • layout_actions – an end‑to‑end tool that takes a store and days‑ahead and returns layout suggestions.
    • This server runs locally and is registered as a custom MCP server in my client.
  2. AI client (Claude Desktop) calls the MCP tools

    • From Claude, I can ask:
      • “For store ‘Riga 1’, generate layout actions for the next 3 days based on the existing sales_weather_daily.csv data.”
      • “Summarize this weekend’s layout actions into a short briefing for store staff.”
    • Claude calls my layout_actions tool, which:
      • reads the CSV (or, in a more advanced setup, reads from Notion)
      • computes demand signals per temperature bucket
      • fakes or consumes a short‑term forecast
      • outputs structured layout actions (Store, Start/End Date, Category, Suggested Move, Expected Uplift, Forecast Temp, Bucket).
    • Then, using the actions already written into Notion, I can ask Claude to summarize the weekend plan, producing a concise natural‑language overview (“This weekend: promote Garden and Cooling near the entrance, de‑emphasize Insulation”).
  3. Notion MCP writes the results into Notion

    • In the same conversation, I ask Claude to “take these layout actions and insert them into my Notion ‘Layout Actions’ database, and create a summary page.”
    • Using Notion’s MCP integration, Claude:
      • creates new rows in the Layout Actions database (one per suggested move)
      • updates or creates a “DIY Weather‑Smart Merchandising” dashboard view
      • generates a “Weekend Store Playbook” page summarizing:
      • upcoming temperature buckets
      • key categories to promote
      • concrete moves for staff
      • a short summary of the weekend layout actions.
  4. Why Notion MCP matters here

Notion MCP turns Notion into the front end for the system:

  • I don’t have to build a custom UI; everything lives in Notion pages and databases.
  • The AI can both read (past actions, sales context) and write (new layout actions, summaries) in a structured, permission‑aware way.
  • My Python MCP server stays focused on the “brains” (weather + sales logic), while Notion is the “workspace” where humans see and act on the plan—and even get an auto‑written weekend summary they can quickly share with the team.

Comments 0 total

    Add comment