architect-mcp

InboundCPH/architect-mcp

3.2

If you are the rightful owner of architect-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Architect is a state-aware MCP server designed to autonomously manage and update Google Slides presentations using a local SQLite database and QuickChart.io for chart generation.

Tools
15
Resources
0
Prompts
0

The Architect - Google Slides MCP Server

A State-Aware MCP server that acts as an autonomous Presentation Architect. It manages a local "Digital Twin" of presentations in SQLite databases and generates modern, styled charts via QuickChart.io.

Features

  • Multi-Project Support: Isolated database files per client (e.g., nike.db, tesla.db)
  • High-End Visuals: Cyberpunk/Modern charts with gradients and rounded corners
  • Layout Engine: Understands slide geometry and native master layouts
  • Self-Contained: All config stored in SQLite - portable projects
  • Smart Updates: Hash-based change detection to skip unchanged data

Quick Start

Local Development

# Install dependencies
uv sync

# Run the server locally
uv run python -m architect.server

The server will start on http://localhost:8000/mcp/

Railway Deployment

  1. Push to GitHub and connect to Railway

  2. Set environment variables in Railway:

    • GOOGLE_CREDENTIALS_BASE64: Base64-encoded service account JSON
    • PORT: (auto-set by Railway)
  3. Deploy - Railway will use the Procfile automatically

Google Cloud Setup

  1. Create a Service Account in Google Cloud Console
  2. Enable Google Slides API and Google Sheets API
  3. Download the JSON credentials
  4. For Railway: base64 credentials.json and set as GOOGLE_CREDENTIALS_BASE64
  5. Share your presentations with the service account email

MCP Tools

Workspace & Config

ToolDescription
list_projectsList all project workspaces
set_active_project(name)Switch/create project
get_brand_configGet colors, fonts, chart settings
update_brand_config(key, value)Update brand settings
get_project_history(limit)View audit log

Google Authentication

ToolDescription
authenticate_googleAuth with Google APIs
get_service_account_emailGet email for sharing files

Discovery & Binding

ToolDescription
scan_deck_context(presentation_id)Scan for tagged elements
register_dataset(key, sheet_url, range)Link Google Sheet
link_element_to_dataset(tag_id, dataset_key)Bind element to data
list_datasetsShow registered datasets

Creation

ToolDescription
create_slide(pres_id, layout, content)Add slide with native layout
adjust_layout(pres_id, tag, action, value)Move/resize elements

Magic Update

ToolDescription
smart_update_deck(presentation_id)Auto-update all linked charts
generate_chart_preview(type, labels, values)Preview chart URL

Tagging Elements

Add Alt-Text to elements in Google Slides using the format:

  • CHART::REVENUE - Chart element
  • IMAGE::LOGO - Image element
  • TEXT::HEADLINE - Text element

The server scans for elements containing :: in their description/title.

Watchman Sync Protocol

The Architect includes a self-healing state management system that automatically detects and recovers from manual user edits.

How It Works

  1. Revision Tracking: Every scan saves the Google Slides revisionId
  2. JIT State Check: Before any update, compares live vs cached revision
  3. Auto-Repair: If drift detected, automatically rescans to sync state
  4. Orphan Cleanup: Removes elements from DB that users manually deleted

What This Prevents

  • ❌ API 404 errors from updating deleted elements
  • ❌ Stale position data from moved elements
  • ❌ Crashes from deleted slides

Flow Diagram

smart_update_deck()
    │
    ├─► HANDSHAKE: Get live revisionId (lightweight API call)
    │
    ├─► DRIFT CHECK: live_revision != cached_revision?
    │       │
    │       ├─► YES: "Human edits detected!"
    │       │        └─► AUTO-REPAIR: scan_deck_context()
    │       │                └─► Remove orphans, update positions
    │       │
    │       └─► NO: "State is clean"
    │
    └─► UPDATE LOOP: Now safe to iterate and push updates

Pitfall Protections Built-In

The Architect handles common failure scenarios automatically:

PitfallProblemSolution
1. Invisible FileService account can't access your file (404)Shows exact email to share with
2. Blurry ChartsChart doesn't match placeholder sizeUses geometry from DB to render exact dimensions
3. URL Too LongComplex charts exceed URL limitsSwitches to POST API for short URLs
4. Grouped ElementsTags hidden inside Ctrl+G groupsRecursive scanning dives into groups

Getting the Service Account Email

→ authenticate_google()
→ get_service_account_email()
📧 mcp-bot@project-id.iam.gserviceaccount.com

Then share your presentation with this email as Editor.

Database Schema

Each project .db contains 6 tables:

  1. project_settings - Brand palette, fonts, chart defaults
  2. data_registry - Google Sheet connections
  3. slide_state - Tagged elements with geometry/style
  4. theme_cache - Master layout placeholders
  5. audit_log - Change history
  6. presentation_metadata - Watchman revision tracking

Example Workflow

User: Start working on the Nike Q3 report
→ set_active_project('nike_q3')

User: Scan this deck: [presentation URL]
→ scan_deck_context('...')

User: Register the sales data
→ register_dataset('SALES', 'sheet_url', 'Data!A1:E10')

User: Link the revenue chart to sales data
→ link_element_to_dataset('CHART::REVENUE', 'SALES')

User: Update all the charts
→ smart_update_deck('...')

Environment Variables

VariableDescription
GOOGLE_CREDENTIALS_BASE64Base64-encoded service account JSON
GOOGLE_CREDENTIALS_JSONRaw JSON string (alternative)
PROJECTS_ROOTPath to store .db files (default: ./projects)
PORTHTTP port (default: 8000)
HOSTBind address (default: 0.0.0.0)

License

MIT