MCP Integration

ContentForge implements the Model Context Protocol (MCP) and can be used as a tool server for AI assistants like Claude Code.

What is MCP?

MCP is a protocol that allows AI assistants to use external tools. When ContentForge runs as an MCP server, an AI assistant can create content, adapt it for platforms, schedule publication, and check analytics -- all through natural language.

Setup with Claude Code

Step 1: Start the MCP Server

Add ContentForge to your Claude Code MCP configuration. Edit your Claude Code settings (typically ~/.config/claude-code/mcp.json or the project-level .mcp.json):

{
  "mcpServers": {
    "contentforge": {
      "command": "contentforge",
      "args": ["mcp"]
    }
  }
}

Step 2: Verify

In Claude Code, the ContentForge tools will appear automatically. You can verify by asking Claude:

"What ContentForge tools are available?"

Transport Modes

ContentForge supports two MCP transport modes:

ModeCommandUse Case
stdiocontentforge mcpClaude Code, local AI tools
SSEcontentforge mcp --sseWeb-based AI clients

For Claude Code, stdio (the default) is the correct choice.

Available Tools

create_content

Create a new content piece.

Parameters:

ParameterTypeRequiredDescription
titlestringyesContent title
bodystringyesMarkdown body
content_typestringyesarticle, thread, short_post, etc.
tagsarraynoTags for organization
projectstringnoAssociated project name

Example prompt:

"Create a new article titled 'Understanding Rust Lifetimes' with tags rust and tutorial."

list_content

List content filtered by status, project, or type.

Parameters:

ParameterTypeRequiredDescription
statusstringnoFilter by status (idea, drafting, published, etc.)
projectstringnoFilter by project
content_typestringnoFilter by content type
limitnumbernoMax results (default 20)

Example prompt:

"List all my draft articles."

get_content

Get a specific content piece by ID.

Parameters:

ParameterTypeRequiredDescription
idstringyesContent UUID

adapt_content

Generate a platform-specific adaptation.

Parameters:

ParameterTypeRequiredDescription
idstringyesContent UUID
platformstringyesTarget platform (twitter, devto, etc.)
use_aibooleannoUse AI for intelligent adaptation

Example prompt:

"Adapt my latest article for Twitter as a thread."

publish

Publish content to a platform.

Parameters:

ParameterTypeRequiredDescription
idstringyesContent UUID
platformstringyesTarget platform

Example prompt:

"Publish the Rust lifetimes article to DEV.to."

schedule

Schedule content for future publication.

Parameters:

ParameterTypeRequiredDescription
idstringyesContent UUID
platformstringyesTarget platform
scheduled_atstringyesISO 8601 datetime

Example prompt:

"Schedule the Twitter thread for tomorrow at 9 AM EST."

list_platforms

List configured platform accounts and their health status.

Parameters: None

get_analytics

Get engagement metrics for published content.

Parameters:

ParameterTypeRequiredDescription
idstringnoContent UUID (omit for all)

Example Conversations

Full Publishing Workflow

You: "Write a blog post about why developers should use Rust for CLI tools, then publish it to DEV.to and create a Twitter thread for it."

Claude: Uses create_content to draft the article, then adapt_content for DEV.to and Twitter, then publish to both platforms. Reports the live URLs.

Scheduled Campaign

You: "I have three articles ready. Schedule them for this week -- one on Monday, Wednesday, and Friday at 9 AM on LinkedIn and Twitter."

Claude: Uses list_content to find ready articles, then schedule for each platform and date.

Analytics Check

You: "How did my posts perform this week?"

Claude: Uses get_analytics and summarizes views, likes, and engagement across platforms.

Security Considerations

  • MCP over stdio communicates only with the parent process (Claude Code). No network exposure.
  • Platform credentials are read from your local config. The MCP server does not accept credentials as tool parameters.
  • All publish actions are explicit -- the AI must call the publish tool; no automatic publishing happens.
  • Audit: All operations are logged via the standard tracing framework. Set RUST_LOG=contentforge=info to see MCP tool invocations.