Using MCP to Bulk Upload Blog Posts: The Final Step
The final piece of the puzzle: using Claude Code and the Agility CMS MCP server to bulk upload 18 blog posts documenting this entire journey. What took minutes would have taken hours manually - and it demonstrates the power of AI-assisted content management.
Using MCP to Bulk Upload Blog Posts: The Final Step
Date: January 9, 2026
Agent: Claude Code (Opus 4.5)
Phase: Series Completion
The Task
Throughout building this site, I documented everything in markdown files in the process-docs/ folder. These files chronicled the entire journey:
- Planning and setup decisions
- Challenges with content models
- Component development
- The switch from Cursor to Claude Code
- Feature implementations like the Series system
- Lessons learned along the way
But these docs were just sitting in the codebase. They needed to be in Agility CMS as actual blog posts - part of the "Building This Site" series so visitors could follow along.
The Challenge
I had 18 markdown files to upload. Each one needed:
- A title extracted from the markdown
- A URL-friendly slug
- An excerpt summarizing the content
- A published date
- Category, tags, and series associations (matching the existing series structure)
- The full markdown content
Doing this manually through the Agility CMS UI would mean:
- 18 separate content items to create
- Copy-pasting titles, slugs, excerpts
- Copy-pasting potentially thousands of lines of markdown
- Setting up the linked content fields for each post
- Probably 2-3 hours of tedious work
The Solution: Claude Code + MCP
Instead, I asked Claude Code to handle it. Here's what happened:
Step 1: Discovery
Claude Code first gathered context:
// Found the Agility instance
mcp__Agility-CMS__get_available_instances()
// Result: "Joel Varty Dot Com" (e9a21a52-u)
// Got the content model structure
mcp__Agility-CMS__get_content_model_details({ modelID: 8 })
// Result: BlogPost model with all field definitions
// Fetched an existing post as a template
mcp__Agility-CMS__get_content_item({ contentID: 65 })
// Result: Template with category, series, and tag IDs
Step 2: Content Analysis
Claude Code read all 18 markdown files, extracting:
- Titles from the H1 headers
- Excerpts from the first meaningful paragraphs
- The full content (preserving all markdown formatting)
Step 3: Bulk Upload
Using the save_content_items MCP tool, Claude Code uploaded posts in batches:
mcp__Agility-CMS__save_content_items({
instanceGuid: "e9a21a52-u",
locale: "en-us",
items: [
{
contentID: -1, // New item
referenceName: "Posts",
fields: {
title: "Planning JoelVarty.com - Before the Build",
slug: "planning-joelvarty-com-before-the-build",
excerpt: "Build a personal website showcasing...",
publishedDate: "2026-01-06T00:00:00",
categoryID: "19",
seriesID: "64",
tagIDs: "22,69",
category: "categories",
tags: "tags",
series: "blogseries",
content: "# Planning JoelVarty.com..." // Full markdown
}
},
// ... more posts
]
})
Step 4: Verification
After each batch, Claude Code received confirmation:
{
"success": true,
"contentIDs": [76, 77, 78, 79, ...],
"itemCount": 18
}
The Results
18 blog posts uploaded in under 5 minutes.
All posts now live in Agility CMS with:
- ✅ Proper titles and slugs
- ✅ Excerpts for listing pages
- ✅ Full markdown content preserved
- ✅ Linked to the "Building This Site" series
- ✅ Categorized under "work"
- ✅ Tagged with "coding" and "ai"
| Content ID | Title |
|---|---|
| 76 | Planning JoelVarty.com - Before the Build |
| 77 | Phase 1 Setup: Building the Foundation |
| 78 | BlogPost Model Setup: Learning from Assumptions |
| 79 | Phase 3: Building the Layout Foundation |
| 80 | Phase 5: About & Career Pages |
| 81 | Phase 6: Uses Page |
| 82 | Phase 7: Content & CMS Integration |
| 83 | Phase 8: Styling & Polish |
| 84 | Project Summary: JoelVarty.com Development |
| 85 | Testing Content Requirements |
| 86 | Phase 9: Testing & QA Setup |
| 87 | Sample Content Creation for Testing |
| 88 | The Agility Component Content Loading Mistake |
| 89 | Blog Details Component: The dynamicPageItem Discovery |
| 90 | Upgrading the Career Timeline with 8star Labs |
| 91 | Switching from Cursor to Claude Code |
| 92 | Refactoring Markdown Gallery Processing |
| 93 | Series Feature Implementation |
Why This Matters
This isn't just about saving time (though saving 2-3 hours is nice). It demonstrates something bigger:
1. MCP Changes the Game
The Model Context Protocol allows AI assistants to interact with external systems directly. Instead of:
- Reading docs about how an API works
- Generating code for the user to run
- Waiting for feedback on what worked and what didn't
The AI can:
- Query the system directly to understand its structure
- Execute operations and verify results
- Iterate and fix issues in real-time
2. Content Operations at Scale
This same pattern could be used for:
- Migrating content from one CMS to another
- Bulk updating existing content
- Importing content from external sources (RSS feeds, databases, APIs)
- Synchronizing content across environments
3. Documentation as Content
By keeping process documentation in markdown files during development, then uploading them as blog posts at the end, I got:
- Easy editing during development (just markdown files)
- Version control through git
- A complete blog series documenting the journey
- Content that's now manageable through the CMS
The Workflow I'd Recommend
- Document as you build - Keep process notes in markdown files
- Use a consistent format - H1 for title, clear sections, etc.
- Set up your content model - Know what fields you need
- Use MCP for bulk operations - Let AI handle the tedious parts
- Verify and refine - Check the results in the CMS
Joel's Thoughts
This is exactly the kind of thing I hoped would be possible when we started this project. The entire "Building This Site" series - 19 posts now including this one - exists because:
- I documented as I went (easy because it was just markdown files)
- Claude Code could read those files and understand the structure
- The Agility CMS MCP server allowed direct content creation
- What would have been hours of copy-paste became a single conversation
The future of content management isn't just about pretty UIs for editors. It's about intelligent automation that handles the tedious parts while keeping humans in control of the creative decisions.
I decided what to document. I chose the structure and format. I set up the series and categories. Claude Code handled the mechanical work of getting 18 files into the CMS with all the right metadata.
That's the collaboration model I want: AI does the heavy lifting, I provide the creative direction.
And now, the series is complete. From planning to implementation to documentation - all done with AI assistance, all powered by MCP, all managed in Agility CMS.
Agent: Claude Code (Opus 4.5)
Date: 2026-01-09
Phase: Series Completion
Note: This post documents the final step of the "Building This Site" series - using MCP to bulk upload all 18 process documentation files as blog posts to Agility CMS.