Tailwind UI Pattern Registry for humans and agents

mcp offline cache installation workflow claude-code

AI Prompts

Using the Webspire MCP Offline

How the Webspire MCP handles offline scenarios, what data is available without a network connection, and how to ensure you have the latest patterns before going offline.

Reference beginner

How To Use This Guide

Use this while choosing patterns, tones, or tools. It is best as lookup material, not as a first read.

At A Glance

Level
beginner
Type
Reference
Updated
2026-03-26

How the MCP Stays Available Offline

The Webspire MCP is designed to work without a permanent internet connection. When you call a tool like get_pattern or search_patterns, it does not require the network to be reachable every time.

The MCP uses a layered approach to find pattern data:

  1. In-memory cache — within a single session, data fetched once is reused for up to five minutes
  2. Disk cache — the last successfully fetched dataset is written to ~/.cache/webspire/ and survives process restarts
  3. Installed fallback — a copy shipped with the package itself is used as a last resort when both network and disk cache are unavailable

In practice, this means:

  • Online session → MCP fetches the latest data, writes it to disk
  • Offline restart → MCP reads from disk, returns the last known good state
  • First install, never been online → MCP uses the copy shipped with the package

What “Offline” Means in Practice

When the network is unreachable, all MCP tools continue to work — search_patterns, get_pattern, compose_page, get_snippet, recommend_fonts, and all others. The data they return reflects the last time a successful network fetch occurred.

No tool will throw a network error or stall waiting for a response. The fallback is transparent.

Ensuring You Have the Latest Patterns

The disk cache is updated automatically whenever the MCP successfully reaches the server. You do not need to do anything explicitly.

To guarantee you have the current state before going offline:

  1. Make sure you have an internet connection
  2. Run any Webspire MCP tool once — for example, list_pattern_families
  3. The disk cache will be refreshed in the background

From that point, the offline state reflects the current registry.

Checking Your Cache Location

The disk cache lives at:

~/.cache/webspire/registry.json

On macOS and Linux this resolves to your home directory. On Windows it follows the same ~ expansion.

You can delete this file at any time — the MCP will rebuild it on the next online session.

Updating the MCP Package

The installed fallback is frozen at the time the npm package was published. If you have never been online with the current installation, the data may be several weeks old depending on when you installed it.

Running any tool while online immediately refreshes to the current state, so the installed fallback only matters for the very first cold start before any successful network fetch.

To check which version of the package you have installed:

npm list @webspire/mcp
# or
pnpm list @webspire/mcp

To update:

npm update @webspire/mcp
# or
pnpm update @webspire/mcp
mcpofflinecacheinstallationworkflowclaude-code