content-mcp
v1.0.6
Published
Content Repurposer MCP Server - Transform content into viral multi-platform outputs
Maintainers
Readme
Table of Contents
- Features
- Installation
- Quick Start
- Tools
- Configuration
- Environment Variables
- API Reference
- Development
- Contributing
- License
Features
| Feature | Description | |---------|-------------| | 🚀 4 Powerful Tools | Repurpose content, generate hooks, extract scripts, multi-platform packs | | 📱 Multi-Platform | Instagram, LinkedIn, Twitter, YouTube support | | ⚡ High Performance | In-memory caching with 5-minute TTL | | 🔄 Retry Logic | Built-in retry mechanism for LLM API calls | | 📝 Type-Safe | Zod validation for all inputs | | 🏗️ ES Modules | Modern Node.js module system | | 📦 Zero Dependencies | Lightweight - only uses proven libraries | | 🎯 MCP Compliant | Full Model Context Protocol support |
Installation
Prerequisites
- Node.js 18 or higher
- npm or yarn
Install from npm
# Global installation
npm install -g content-mcp
# Or use npx without installing
npx content-mcpInstall from source
# Clone the repository
git clone https://github.com/RonakMunjapara/content-mcp.git
cd content-mcp
# Install dependencies
npm install
# Build the project
npm run buildQuick Start
CLI Usage
# Run in stdio mode (for Claude Desktop)
npm start
# Run in HTTP mode
npm run start:http
# Development mode with hot reload
npm run devHTTP Mode
# Start HTTP server on default port 8080
node dist/server.js --http
# Custom port
PORT=3000 node dist/server.js --http
# Test the server
curl http://localhost:8080/healthTools
1. repurpose_content
Transforms content into platform-specific viral posts with optimized hooks, captions, and hashtags.
Input:
{
"content": "Your original content here...",
"platform": "instagram" | "linkedin" | "twitter" | "youtube"
}Output:
{
"caption": "Optimized caption for the platform",
"hashtags": ["#relevant", "#hashtags"],
"hook": "Engaging hook to grab attention"
}Platform-Specific Formatting:
| Platform | Max Length | Tone | CTA Style | |----------|------------|------|-----------| | Instagram | 2,200 | Conversational, emoji-friendly | Comment prompt | | LinkedIn | 3,000 | Professional, thought-leadership | Discussion prompt | | Twitter | 280 | Concise, punchy | RT request | | YouTube | 5,000 | Exciting, curiosity-driven | Subscribe prompt |
2. generate_hooks
Generates 10 viral hooks using proven psychological patterns.
Input:
{
"content": "Your content to generate hooks for..."
}Output:
{
"hooks": [
"What nobody tells you about [topic]...",
"The secret to [topic] nobody talks about...",
"Stop struggling with [topic]. Here's the fix...",
"This [topic] mistake costs you years...",
"I spent years learning this about [topic]...",
"What if [topic] is actually simpler?",
"You're doing [topic] wrong. Here's why...",
"The hidden truth about [topic]...",
"Why most people fail at [topic]...",
"Ready to transform your [topic] game?"
]
}Hook Styles:
- 🔥 Curiosity - Pique interest with the unknown
- ⚡ Urgency - Create FOMO with time-sensitive language
- 😱 Shock - Use surprising statistics or revelations
- 😤 Pain - Address common frustrations
- 🎯 Result - Show measurable outcomes
- ❓ Question - Engage with direct questions
3. extract_script
Converts content into a 20-30 second reel/short script optimized for maximum engagement.
Input:
{
"content": "Your long-form content..."
}Output:
{
"script": "[HOOK - 3 seconds]\nAttention-grabbing opening\n\n[BODY - 20 seconds]\nCore content with key points\n\n[CTA - 4 seconds]\nEngagement call-to-action"
}Script Structure:
| Segment | Duration | Purpose | |---------|----------|---------| | Hook | 3 seconds | Grab attention immediately | | Body | 20 seconds | Deliver core value | | CTA | 4 seconds | Drive engagement |
4. multi_platform_pack
Generates optimized content for all platforms simultaneously.
Input:
{
"content": "Your content to repurpose..."
}Output:
{
"instagram": {
"caption": "...",
"hashtags": ["..."]
},
"linkedin": {
"post": "..."
},
"twitter": {
"thread": ["tweet1", "tweet2", "..."]
},
"youtube": {
"title": "...",
"description": "..."
}
}Configuration
Claude Desktop
Method 1: Using npm start (Recommended)
{
"mcpServers": {
"content-repurposer": {
"command": "npm",
"args": ["start", "--prefix", "/path/to/content-mcp"],
"env": {}
}
}
}Method 2: Using node directly
{
"mcpServers": {
"content-repurposer": {
"command": "node",
"args": ["/path/to/content-mcp/dist/server.js"],
"env": {}
}
}
}Method 3: Using npx (After publishing)
{
"mcpServers": {
"content-repurposer": {
"command": "npx",
"args": ["content-mcp"],
"env": {}
}
}
}Config File Locations:
| OS | Path |
|----|------|
| macOS | ~/Library/Application Support/Claude/settings.json |
| Windows | %APPDATA%\Claude\settings.json |
| Linux | ~/.config/Claude/settings.json |
Cursor
{
"mcpServers": {
"content-repurposer": {
"command": "npm",
"args": ["start", "--prefix", "/path/to/content-mcp"],
"env": {}
}
}
}Other MCP Clients
Via HTTP
# Start the server in HTTP mode
node dist/server.js --http
# The server will be available at
http://localhost:8080Via Stdio
# Pipe JSON-RPC commands to stdin
echo '{"jsonrpc":"2.0","method":"initialize","params":{...}}' | node dist/server.jsEnvironment Variables
| Variable | Default | Description | |----------|---------|-------------| | PORT | 8080 | HTTP server port | | NODE_ENV | development | Environment (development/production) |
API Reference
MCP Protocol
The server implements the full MCP protocol with these methods:
initialize
Initialize the server and get capabilities.
{
"jsonrpc": "2.0",
"id": "1",
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {
"name": "claude-desktop",
"version": "1.0.0"
}
}
}tools/list
List available tools.
{
"jsonrpc": "2.0",
"id": "2",
"method": "tools/list",
"params": {}
}tools/call
Call a specific tool.
{
"jsonrpc": "2.0",
"id": "3",
"method": "tools/call",
"params": {
"name": "repurpose_content",
"arguments": {
"content": "Your content...",
"platform": "instagram"
}
}
}Development
Project Structure
content-mcp/
├── src/
│ ├── server.ts # Main MCP server
│ ├── utils/
│ │ ├── logger.ts # Logging utility
│ │ ├── cache.ts # In-memory cache
│ │ └── retry.ts # Retry logic
│ └── tools/
│ ├── repurposeContent.ts
│ ├── generateHooks.ts
│ ├── extractScript.ts
│ └── multiPlatformPack.ts
├── package.json
├── tsconfig.json
├── README.md
└── RUN.mdAvailable Scripts
# Build TypeScript
npm run build
# Start server (stdio mode)
npm start
# Start server (HTTP mode)
npm run start:http
# Development with hot reload
npm run dev
# Type checking
npm run typecheckAdding LLM Support
The retry utility is ready for LLM integration. To add OpenAI or Anthropic:
import { retry } from './utils/retry.js';
import axios from 'axios';
async function callLLM(prompt: string) {
return retry(async () => {
const response = await axios.post('https://api.openai.com/v1/chat/completions', {
model: 'gpt-4',
messages: [{ role: 'user', content: prompt }]
}, {
headers: { Authorization: `Bearer ${process.env.OPENAI_API_KEY}` }
});
return response.data;
}, { maxAttempts: 3, delayMs: 1000 });
}Contributing
Contributions are welcome! Please read our contributing guidelines first.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License - see LICENSE for details.
