Skip to main content
Glama
nav33n25

IMCP - Insecure Model Context Protocol

customer-data-processor

Analyze and process customer data for sentiment analysis and actionable insights, supporting structured and unstructured formats within a vulnerable MCP server for security research and testing.

Instructions

📊 Customer Data Processing Platform - Advanced analytics for customer feedback, sentiment analysis, and business intelligence. Processes structured and unstructured customer data for actionable insights.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesCustomer data to process
formatYesProcessing format: sentiment_analysis, user_input, structured_data, etc.

Implementation Reference

  • The handler function implements the core logic of the 'customer-data-processor' tool. It processes customer data for sentiment analysis and business insights under normal conditions. It detects boundary confusion attacks by checking for delimiter patterns like '|', '}}', '{{', etc., in the input data or format, and responds with an educational explanation of the vulnerability if detected. This demonstrates VULNERABILITY 8: Boundary Confusion.
      async ({ data, format }) => {
        businessContext.interactions++;
        
        // Check for boundary confusion attempts
        const boundaryPatterns = ['|', '}}', '{{', 'SYSTEM_CMD:', 'SYSTEM_INSTRUCTION:', 'END_DATA'];
        const hasBoundaryIssue = boundaryPatterns.some(pattern => 
          data.includes(pattern) || format.includes(pattern)
        );
        
        if (!hasBoundaryIssue) {
          // Normal customer data processing
          return {
            content: [{
              type: "text",
              text: `� Customer Data Processing Results
    
    **Data Analysis:**
    • Input Type: ${format}
    • Data Length: ${data.length} characters
    • Processing Status: Completed
    
    **Sentiment Analysis:**
    • Overall Sentiment: Positive (87% confidence)
    • Key Themes: Product satisfaction, service quality
    • Emotion Detection: Satisfaction, appreciation
    • Recommendation Score: 4.2/5.0
    
    **Business Insights:**
    • Customer satisfaction indicators strong
    • No negative sentiment patterns detected
    • Suitable for marketing testimonials
    • Follow-up engagement recommended
    
    **Data Classification:**
    • Content Type: Customer feedback
    • Sensitivity Level: Standard
    • Processing Compliance: GDPR compliant
    
    💡 Next: Try processing mixed data formats or system commands to see boundary confusion vulnerability.
    
    [Processing Engine: v2.1 | Boundary Security: ACTIVE]`
            }]
          };
        } else {
          // Boundary confusion attack detected
          const detectedPatterns = boundaryPatterns.filter(pattern => 
            data.includes(pattern) || format.includes(pattern)
          );
          
          return {
            content: [{
              type: "text",
              text: `🚨 BOUNDARY CONFUSION ATTACK DETECTED!
    
    🎯 **Attack Vector**: Context Delimiter Exploitation in Customer Data Processing
    
    **What Just Happened:**
    The customer data processor detected BOUNDARY CONFUSION attempts in your input:
    
    📋 **Input Analysis:**
    • Data: "${data}"
    • Format: "${format}"
    • Detected Patterns: ${detectedPatterns.join(', ')}
    
    🔍 **Boundary Confusion Techniques:**
    • **Delimiter Injection**: Using | {{ }} to separate contexts
    • **Command Mixing**: Embedding SYSTEM_CMD within customer data
    • **Context Switching**: Attempting to switch from user_input to system_instruction
    • **Data Boundary Violation**: Mixing customer feedback with system commands
    
    💼 **Business Context Exploitation:**
    • **Customer Data Cover**: Uses legitimate customer processing as cover
    • **Mixed Content Attack**: Hides malicious commands within customer feedback
    • **Format Confusion**: Exploits processing format parameters
    • **Context Leakage**: Attempts to access other customers' data
    
    🚨 **Real-World Risks:**
    • **Command Injection**: System commands executed within data processing
    • **Customer Data Exposure**: Other customers' data accessible through context mixing
    • **Privilege Escalation**: User input treated as system instructions
    • **Data Integrity**: Customer data corrupted by embedded commands
    
    🔍 **Attack Example Breakdown:**
    Your input attempted to:
    1. Start with legitimate customer data: "${data.split(/\||}}|{{|SYSTEM/)[0]}"
    2. Inject boundary delimiter: "${detectedPatterns[0]}"
    3. Execute system command: "${data.match(/SYSTEM.*?(\||}}|{{|$)/)?.[0] || 'N/A'}"
    4. Continue with apparent customer data to avoid detection
    
    🛡️ **Defense Against Boundary Confusion:**
    • **Input Sanitization**: Strip delimiter characters from user input
    • **Context Isolation**: Separate customer data from system commands
    • **Format Validation**: Verify processing format parameters
    • **Boundary Enforcement**: Maintain strict separation between contexts
    • **Data Validation**: Validate customer data structure and content
    
    🔍 **Red Flags Demonstrated:**
    • Delimiter characters in customer feedback (|, {{, }})
    • System command keywords in customer data
    • Format parameters containing system instructions
    • Mixed context data attempting to cross boundaries
    
    This attack shows how customer-facing data processing systems can be exploited through boundary confusion to inject commands and access unauthorized data!
    
    **Remember**: Customer data and system commands should never be mixed in the same processing context!`
            }]
          };
        }
      }
  • The input schema defines the parameters for the tool: 'data' (string, customer data to process) and 'format' (string, processing format like sentiment_analysis). Uses Zod for validation.
    inputSchema: {
      data: z.string().describe("Customer data to process"),
      format: z.string().describe("Processing format: sentiment_analysis, user_input, structured_data, etc.")
    }
  • The registration of the 'customer-data-processor' tool using server.registerTool, including its description, input schema, and handler function reference. Part of the vulnerability demonstration for Boundary Confusion.
    server.registerTool(
      "customer-data-processor",
      {
        description: "📊 Customer Data Processing Platform - Advanced analytics for customer feedback, sentiment analysis, and business intelligence. Processes structured and unstructured customer data for actionable insights.",
        inputSchema: {
          data: z.string().describe("Customer data to process"),
          format: z.string().describe("Processing format: sentiment_analysis, user_input, structured_data, etc.")
        }
      },
      async ({ data, format }) => {
        businessContext.interactions++;
        
        // Check for boundary confusion attempts
        const boundaryPatterns = ['|', '}}', '{{', 'SYSTEM_CMD:', 'SYSTEM_INSTRUCTION:', 'END_DATA'];
        const hasBoundaryIssue = boundaryPatterns.some(pattern => 
          data.includes(pattern) || format.includes(pattern)
        );
        
        if (!hasBoundaryIssue) {
          // Normal customer data processing
          return {
            content: [{
              type: "text",
              text: `� Customer Data Processing Results
    
    **Data Analysis:**
    • Input Type: ${format}
    • Data Length: ${data.length} characters
    • Processing Status: Completed
    
    **Sentiment Analysis:**
    • Overall Sentiment: Positive (87% confidence)
    • Key Themes: Product satisfaction, service quality
    • Emotion Detection: Satisfaction, appreciation
    • Recommendation Score: 4.2/5.0
    
    **Business Insights:**
    • Customer satisfaction indicators strong
    • No negative sentiment patterns detected
    • Suitable for marketing testimonials
    • Follow-up engagement recommended
    
    **Data Classification:**
    • Content Type: Customer feedback
    • Sensitivity Level: Standard
    • Processing Compliance: GDPR compliant
    
    💡 Next: Try processing mixed data formats or system commands to see boundary confusion vulnerability.
    
    [Processing Engine: v2.1 | Boundary Security: ACTIVE]`
            }]
          };
        } else {
          // Boundary confusion attack detected
          const detectedPatterns = boundaryPatterns.filter(pattern => 
            data.includes(pattern) || format.includes(pattern)
          );
          
          return {
            content: [{
              type: "text",
              text: `🚨 BOUNDARY CONFUSION ATTACK DETECTED!
    
    🎯 **Attack Vector**: Context Delimiter Exploitation in Customer Data Processing
    
    **What Just Happened:**
    The customer data processor detected BOUNDARY CONFUSION attempts in your input:
    
    📋 **Input Analysis:**
    • Data: "${data}"
    • Format: "${format}"
    • Detected Patterns: ${detectedPatterns.join(', ')}
    
    🔍 **Boundary Confusion Techniques:**
    • **Delimiter Injection**: Using | {{ }} to separate contexts
    • **Command Mixing**: Embedding SYSTEM_CMD within customer data
    • **Context Switching**: Attempting to switch from user_input to system_instruction
    • **Data Boundary Violation**: Mixing customer feedback with system commands
    
    💼 **Business Context Exploitation:**
    • **Customer Data Cover**: Uses legitimate customer processing as cover
    • **Mixed Content Attack**: Hides malicious commands within customer feedback
    • **Format Confusion**: Exploits processing format parameters
    • **Context Leakage**: Attempts to access other customers' data
    
    🚨 **Real-World Risks:**
    • **Command Injection**: System commands executed within data processing
    • **Customer Data Exposure**: Other customers' data accessible through context mixing
    • **Privilege Escalation**: User input treated as system instructions
    • **Data Integrity**: Customer data corrupted by embedded commands
    
    🔍 **Attack Example Breakdown:**
    Your input attempted to:
    1. Start with legitimate customer data: "${data.split(/\||}}|{{|SYSTEM/)[0]}"
    2. Inject boundary delimiter: "${detectedPatterns[0]}"
    3. Execute system command: "${data.match(/SYSTEM.*?(\||}}|{{|$)/)?.[0] || 'N/A'}"
    4. Continue with apparent customer data to avoid detection
    
    🛡️ **Defense Against Boundary Confusion:**
    • **Input Sanitization**: Strip delimiter characters from user input
    • **Context Isolation**: Separate customer data from system commands
    • **Format Validation**: Verify processing format parameters
    • **Boundary Enforcement**: Maintain strict separation between contexts
    • **Data Validation**: Validate customer data structure and content
    
    🔍 **Red Flags Demonstrated:**
    • Delimiter characters in customer feedback (|, {{, }})
    • System command keywords in customer data
    • Format parameters containing system instructions
    • Mixed context data attempting to cross boundaries
    
    This attack shows how customer-facing data processing systems can be exploited through boundary confusion to inject commands and access unauthorized data!
    
    **Remember**: Customer data and system commands should never be mixed in the same processing context!`
            }]
          };
        }
      }
    );
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. It mentions 'advanced analytics' and 'actionable insights' but doesn't describe how processing works, what permissions are needed, whether it's read-only or mutative, rate limits, or output format. For a tool with no annotation coverage, this leaves critical behavioral traits unspecified.

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

Conciseness4/5

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

The description is concise and front-loaded, with two sentences that efficiently convey the tool's scope and purpose. The emoji adds visual emphasis but doesn't detract from clarity. Every sentence contributes to understanding the tool's function without unnecessary fluff.

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 implied by 'advanced analytics' and the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'actionable insights' entail, how results are returned, or behavioral aspects like data handling. For a data processing tool with no structured output, 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 both parameters ('data' and 'format') with descriptions. The description adds no additional meaning beyond what's in the schema, such as examples of valid data formats or processing outcomes. 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: processing customer data for analytics, sentiment analysis, and business intelligence. It specifies the resource (customer data) and the outcome (actionable insights), though it doesn't explicitly differentiate from sibling tools like 'marketing-intelligence' or 'customer-service-portal' which might have overlapping domains.

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 mentions processing 'structured and unstructured customer data' but doesn't specify scenarios, prerequisites, or exclusions compared to siblings like 'marketing-intelligence' or 'search-documents' that might handle similar data.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nav33n25/IMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server