Report Builder MCP Server
An MCP (Model Context Protocol) server for formatting AI agent outputs into professional reports, emails, and documents. Built for the AI Operations Platform.
🎯 Purpose
This MCP server helps you:
- ✅ Format agent outputs into email-ready templates
- ✅ Create professional HTML reports with branding
- ✅ Generate executive summaries from long content
- ✅ Validate output quality (detect generic AI language)
- ✅ Apply client-specific branding to outputs
🚀 Quick Start
Option 1: Use with Replit (Recommended for Testing)
-
Fork this to Replit:
- Go to Replit.com
- Click "Create Repl" → Import from GitHub
- Or create a new Node.js repl and copy these files
-
Install dependencies:
npm install -
Test the server:
npm test -
Run HTTP API (for platform integration):
npm install express node http-server.js
Option 2: Deploy to Railway/Render
- Push to GitHub
- Connect to Railway.app or Render.com
- Set build command:
npm install - Set start command:
node http-server.js - Deploy!
Option 3: Use with Claude Desktop
-
Install locally:
git clone <your-repo> cd report-builder-mcp npm install -
Add to Claude Desktop config:
Mac:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%/Claude/claude_desktop_config.json{ "mcpServers": { "report-builder": { "command": "node", "args": ["/absolute/path/to/report-builder-mcp/server.js"] } } } -
Restart Claude Desktop
🛠️ Available Tools
1. create_email_template
Converts agent output into email-ready format.
Input:
{
"content": "Q4 revenue exceeded expectations by 15%...",
"recipient_name": "John Smith",
"subject": "Q4 Performance Report",
"sender_name": "Audrey - Financial Analyst",
"branding": "TechCorp Analytics",
"include_disclaimer": true
}
2. format_report_html
Creates professional HTML report with sections and styling.
Input:
{
"title": "Quarterly Analysis Report",
"content": "Main report content...",
"sections": [
{
"title": "Executive Summary",
"content": "Key findings..."
}
],
"summary": "Brief overview...",
"branding": "Company Name"
}
3. validate_output_quality
Checks agent output for generic AI language and specialization.
Input:
{
"content": "Your agent's output here...",
"expected_role": "legal assistant",
"check_tone": true
}
Output:
{
"quality_score": 85,
"status": "GOOD",
"issues": [],
"suggestions": [],
"content_length": 245
}
4. create_executive_summary
Condenses long content into key points.
Input:
{
"full_content": "Long detailed content...",
"max_points": 5,
"include_recommendations": true
}
5. add_branding
Applies client-specific branding to content.
Input:
{
"content": "Your content here...",
"client_id": "client-123",
"brand_elements": {
"primary_color": "#0066cc",
"company_name": "TechCorp",
"tagline": "Excellence in AI"
}
}
🌐 HTTP API Usage
If you're running the HTTP server (node http-server.js), you can call tools via REST API:
Health Check
curl http://localhost:3000/health
List Tools
curl http://localhost:3000/tools
Format Email (Convenience Endpoint)
curl -X POST http://localhost:3000/format-email \
-H "Content-Type: application/json" \
-d '{
"content": "Q4 revenue exceeded expectations...",
"recipient": "John Smith",
"subject": "Q4 Report",
"sender": "Audrey"
}'
Check Quality (Convenience Endpoint)
curl -X POST http://localhost:3000/check-quality \
-H "Content-Type: application/json" \
-d '{
"content": "As an AI, I cannot provide legal advice...",
"role": "legal assistant"
}'
Execute Any Tool
curl -X POST http://localhost:3000/tools/create_executive_summary \
-H "Content-Type: application/json" \
-d '{
"full_content": "Your long content here...",
"max_points": 5
}'
🔗 Integration with Your Platform
N8N Workflow Integration
Create an N8N workflow:
- Webhook Trigger - Receives data from your AI agent
- HTTP Request Node - Calls this MCP API
- Method: POST
- URL:
https://your-deployed-mcp.com/tools/create_email_template - Body: Agent output data
- Process Response - Format the result
- Return to Platform - Send formatted output back
Example N8N HTTP Request:
{
"method": "POST",
"url": "{{ $env.MCP_API_URL }}/format-email",
"body": {
"content": "{{ $json.agent_output }}",
"recipient": "{{ $json.recipient_name }}",
"subject": "{{ $json.subject }}",
"sender": "{{ $json.agent_name }}"
}
}
Direct Platform Integration
If your platform supports HTTP calls:
// In your platform's agent workflow
const response = await fetch('https://your-mcp-api.com/format-email', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
content: agentOutput,
recipient: customerName,
subject: reportTitle,
sender: agentName
})
});
const { email } = await response.json();
// Use formatted email
📝 Action Items Addressed
This MCP helps with your meeting action items:
✅ Employee Response Customization - Use validate_output_quality to test if Audrey's responses are specialized
✅ Report Generation Workflow - Use create_email_template and format_report_html to format outputs for customers
✅ MCP Integration - This entire server demonstrates MCP integration for your platform
🧪 Testing
Run the test suite:
npm test
This will test all 5 tools with example data.
📦 Package Updates
Update dependencies:
npm install @modelcontextprotocol/sdk@latest
Add Express for HTTP API:
npm install express
🐛 Troubleshooting
MCP not appearing in Claude Desktop?
- Check the path in your config is absolute
- Restart Claude Desktop completely
- Check server.js has execute permissions:
chmod +x server.js
HTTP API not working?
- Make sure Express is installed:
npm install express - Check the port is available (default: 3000)
- Look for error messages in console
Tools returning errors?
- Check the input matches the expected schema
- Use the test script to validate:
npm test - Check server logs for specific error messages
🚀 Next Steps
- Test locally - Run
npm testto see it work - Deploy to Railway - Get a public URL for platform integration
- Create N8N workflow - Connect to your AI Operations Platform
- Build more tools - Add custom tools for your specific needs
📖 Additional Resources
👤 Author
Built by Nathan for the AI Operations Platform collaboration with Chris, David, and Charlie Butler.
📄 License
MIT