Skip to main content
Glama
nathanwolfe2208

Report Builder MCP Server

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

Related MCP server: Formatix AI MCP Server

🚀 Quick Start

  1. 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

  2. Install dependencies:

    npm install
  3. Test the server:

    npm test
  4. Run HTTP API (for platform integration):

    npm install express
    node http-server.js

Option 2: Deploy to Railway/Render

  1. Push to GitHub

  2. Connect to Railway.app or Render.com

  3. Set build command: npm install

  4. Set start command: node http-server.js

  5. Deploy!

Option 3: Use with Claude Desktop

  1. Install locally:

    git clone <your-repo>
    cd report-builder-mcp
    npm install
  2. Add to Claude Desktop config:

    Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

    Windows: %APPDATA%/Claude/claude_desktop_config.json

    {
      "mcpServers": {
        "report-builder": {
          "command": "node",
          "args": ["/absolute/path/to/report-builder-mcp/server.js"]
        }
      }
    }
  3. 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:

  1. Webhook Trigger - Receives data from your AI agent

  2. HTTP Request Node - Calls this MCP API

    • Method: POST

    • URL: https://your-deployed-mcp.com/tools/create_email_template

    • Body: Agent output data

  3. Process Response - Format the result

  4. 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

  1. Test locally - Run npm test to see it work

  2. Deploy to Railway - Get a public URL for platform integration

  3. Create N8N workflow - Connect to your AI Operations Platform

  4. 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

Available Tools

5 tools
add_brandingC

Applies client-specific branding (headers, footers, colors, logos) to formatted content

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesContent to brand
client_idNoClient identifier for branding lookup
brand_elementsNoCustom brand elements to apply

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool 'applies' branding, implying a mutation or transformation, but doesn't disclose behavioral traits such as whether it modifies content in-place, returns a new version, requires specific permissions, has rate limits, or what happens if branding fails. For a tool with no annotations and potential side effects, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It front-loads the core purpose ('applies client-specific branding') and specifies the target and elements without redundancy. Every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a tool that applies branding (a mutation with potential complexity), the description is incomplete. It lacks details on behavior, error handling, return values, or how branding integrates with content. For a tool with 3 parameters (including nested objects) and no structured support, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters (content, client_id, brand_elements). The description adds minimal value by mentioning 'headers, footers, colors, logos' which loosely maps to brand_elements but doesn't provide additional syntax, format details, or constraints beyond the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('applies') and target ('client-specific branding to formatted content'), specifying what gets applied (headers, footers, colors, logos). It distinguishes from siblings like 'format_report_html' (formatting) or 'create_email_template' (template creation) by focusing on branding application. However, it doesn't explicitly differentiate from all siblings (e.g., 'validate_output_quality' is unrelated).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing formatted content first), when not to use it (e.g., for unformatted content), or comparisons to siblings like 'format_report_html' (which might include branding). Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_email_templateB

Converts raw agent output into an email-ready format with proper formatting, subject line, and professional structure

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesThe raw content from the AI agent to format
recipient_nameYesName of the email recipient
subjectYesEmail subject line
sender_nameNoName of the sender/agent (optional)AI Operations Team
brandingNoClient branding identifier (optional)
include_disclaimerNoWhether to include AI-generated disclaimer

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states what the tool does ('converts...into email-ready format') without disclosing behavioral traits like whether it's read-only or mutating, permission requirements, rate limits, or what the output looks like beyond 'proper formatting'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('converts raw agent output into an email-ready format') and adds key specifics ('with proper formatting, subject line, and professional structure') without any wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 6 parameters, no annotations, and no output schema, the description is incomplete—it doesn't explain the output format, error handling, or behavioral context needed for safe invocation, leaving significant gaps despite good schema coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional parameter meaning beyond implying that 'content' is raw AI output and the output is email-formatted, which aligns with but doesn't extend beyond schema details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('converts', 'format') and resources ('raw agent output', 'email-ready format'), and distinguishes it from siblings by focusing on email formatting rather than branding, summaries, reports, or validation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when converting AI output to email format, but provides no explicit guidance on when to use this tool versus alternatives like 'format_report_html' or 'create_executive_summary', nor any prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_executive_summaryA

Condenses long agent outputs into a concise executive summary with key points and recommendations

ParametersJSON Schema
NameRequiredDescriptionDefault
full_contentYesThe full content to summarize
max_pointsNoMaximum number of key points to extract
include_recommendationsNoWhether to include actionable recommendations

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions output traits ('concise executive summary with key points and recommendations') but fails to address critical aspects like processing limits, error handling, or whether the operation is idempotent, leaving significant gaps for a tool that transforms content.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('condenses long agent outputs') and specifies key features ('concise executive summary with key points and recommendations') without any wasted words, making it highly scannable and informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the purpose and output format but lacks details on behavioral constraints (e.g., input size limits, processing time) and doesn't fully compensate for the absence of annotations or output schema, leaving some operational ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional meaning beyond what the schema provides (e.g., it doesn't explain how 'max_points' interacts with content length or what constitutes a 'key point'), resulting in the baseline score for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('condenses', 'extract') and resources ('long agent outputs', 'executive summary'), distinguishing it from sibling tools like add_branding or format_report_html by focusing on summarization rather than formatting or validation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for condensing long outputs but provides no explicit guidance on when to use this tool versus alternatives (e.g., validate_output_quality for quality checks). It lacks context on prerequisites or exclusions, leaving usage decisions to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

format_report_htmlC

Formats agent output as a professional HTML report with sections, styling, and proper structure

ParametersJSON Schema
NameRequiredDescriptionDefault
titleYesReport title
contentYesMain report content
sectionsNoArray of report sections with titles and content
summaryNoExecutive summary (optional)
brandingNoClient branding/company name

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions formatting with 'sections, styling, and proper structure,' it lacks critical details: whether this is a read-only or mutating operation, what permissions might be required, how errors are handled, or what the output looks like (e.g., HTML string, file). For a formatting tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Formats agent output as a professional HTML report') and adds key details ('with sections, styling, and proper structure'). There is zero waste—every word contributes to understanding the tool's function without redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (5 parameters, no output schema, no annotations), the description is incomplete. It adequately states what the tool does but fails to address behavioral aspects (e.g., side effects, error handling), usage context relative to siblings, or output details. For a tool that transforms content into HTML, more guidance on input expectations and output format would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 5 parameters with descriptions. The description adds no parameter-specific information beyond implying general formatting of 'agent output.' It doesn't explain how parameters like 'sections' or 'branding' interact with the HTML structure, nor does it provide examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Formats agent output as a professional HTML report with sections, styling, and proper structure.' It specifies the verb (formats), resource (agent output), and output format (HTML report) with key characteristics (sections, styling, structure). However, it doesn't explicitly differentiate from sibling tools like 'create_email_template' or 'create_executive_summary' which might also format content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'create_email_template' (for email formatting) or 'create_executive_summary' (for summary creation), nor does it specify prerequisites, exclusions, or appropriate contexts for HTML report generation versus other output formats.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

validate_output_qualityB

Checks agent output quality - detects generic AI language, ensures specialization, and provides improvement suggestions

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesAgent output to validate
expected_roleNoExpected role specialization (e.g., 'legal assistant', 'marketing expert')
check_toneNoCheck for appropriate professional tone

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions what the tool does (detects generic language, ensures specialization, provides suggestions) but doesn't disclose critical behavioral traits like whether this is a read-only analysis or if it modifies content, what permissions might be needed, rate limits, or what format the improvement suggestions take. For a tool with 3 parameters and no annotation coverage, this leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that packs multiple specific functions. Every phrase earns its place by describing distinct aspects of the tool's functionality. There's zero waste or redundancy, and the information is front-loaded with the core purpose immediately clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description provides adequate but incomplete context. It clearly states what the tool does but lacks information about behavioral characteristics, output format, and usage boundaries. The description covers the 'what' but not the 'how' or 'when' sufficiently for a tool that analyzes and provides feedback on content.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description doesn't add any meaningful parameter semantics beyond what's in the schema - it mentions 'specialization' which relates to the 'expected_role' parameter, but this is already clearly described in the schema. The baseline of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with specific verbs ('checks', 'detects', 'ensures', 'provides') and identifies the resource ('agent output quality'). It distinguishes from sibling tools by focusing on quality validation rather than content creation or formatting. However, it doesn't explicitly differentiate from potential alternative validation tools that might exist elsewhere.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through the mention of 'agent output' and 'specialization', suggesting this tool should be used when evaluating AI-generated content for role-specific quality. However, it provides no explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites or exclusions. The context is clear but lacks specific comparative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updates
    • First observedadd_branding
    • First observedcreate_email_template
    • First observedcreate_executive_summary
    • First observedformat_report_html
    • First observedvalidate_output_quality

TDQS

A3.6/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: branding, email templates, executive summaries, HTML formatting, and quality validation. The descriptions clearly differentiate their functions, making misselection unlikely.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (e.g., add_branding, create_email_template, format_report_html). The naming is predictable and readable throughout the set.

Tool Count5/5

With 5 tools, the count is well-scoped for a report builder server. Each tool earns its place by covering distinct aspects of report creation and refinement, avoiding bloat or thinness.

Completeness4/5

The tool set covers key report-building workflows (formatting, summarization, branding, email conversion, quality checks), but minor gaps exist, such as no tools for data input or integration with external sources. Agents can likely work around this with the provided tools.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Enables complete Office document lifecycle management for AI agents, including creation, editing, conversion, and templating of DOCX, XLSX, PPTX, PDF, and EML files.
    40
    31 PyPI
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to generate editable PPTX presentations and standardized Word simulation reports with format confirmation, asynchronous task processing, semantic revision, and secure file download via MCP.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to inspect generated .docx and .pdf files before delivery, extracting structural, typographic, spacing, and language facts so formatting errors can be caught automatically.
    6
    MIT