Skip to main content

MCP Chat-to-Data

Learn how to connect Autonify to AI assistants using Model Context Protocol (MCP). Enable natural language queries and exploration of your data through Claude, Claude Code, OpenAI, and other MCP-compatible tools.

VIDEO TUTORIAL⏱️ 3 min

📹 Chatting to Data with MCP

Discover how to connect Claude and other AI tools to query and explore your data using natural language through MCP.

Understanding MCP Integration

Model Context Protocol (MCP) enables AI assistants to:

  • Query Data: Natural language access to your databases
  • Explore Schemas: Understand data structures and relationships
  • Check Quality: Review data quality results
  • Inspect Sensitivity: Access data classifications (PII, PHI, PCI)

Available MCP Services

Autonify provides four MCP services:

1. Data Access Assistant

  • Purpose: Execute GraphQL queries and access data through secure APIs
  • Use Case: Query actual data from your databases
  • Endpoint: /data-sse/sse

2. Data Quality Monitoring Assistant

  • Purpose: Monitor data quality metrics and validation rules
  • Use Case: Review quality metrics and validation results
  • Endpoint: /quality-sse/sse

3. Sensitivity Classification Assistant

  • Purpose: Identify PII, PHI, PCI data and manage compliance requirements
  • Use Case: Check data sensitivity classifications
  • Endpoint: /sensitivity-sse/sse

4. Schema Discovery Assistant

  • Purpose: Explore database structures, tables, columns, and relationships
  • Use Case: Understand data structures and relationships
  • Endpoint: /schema-sse/sse

Configuring MCP Services

Accessing MCP Settings

  1. Navigate to Settings in the navigation
  2. Select the MCP tab

MCP Settings Tab

Service Management Interface

The MCP settings page displays:

  • Service Table: List of available MCP services in a table format
  • Columns:
    • Service name and description
    • Endpoint URL with copy button (displays full URL including base URL)
    • Status showing "Enabled" or "Disabled" with usage count
    • Actions: Toggle switch for enable/disable

Enabling Services

For each service:

  1. Review the service description
  2. Use the toggle switch in the Actions column to enable/disable
  3. Click the copy button next to the endpoint URL to copy the full URL
  4. The system will show a success toast when toggled

Connecting to Claude

Adding a Custom Connector

  1. Open Claude web application
  2. Navigate to the Connectors page

MCP Services List

  1. Click Add Custom Connector
  2. Configure the connector:
    • Name: Enter a descriptive name (e.g., "Schema Exploration")
    • Remote URL: Paste the MCP endpoint URL from Autonify
  3. Click Add to save the connector

Claude Custom Connector

Configuring the Connector

After adding:

  1. Click Configure on the connector
  2. Review available attributes and settings
  3. Adjust configuration as needed
  4. Test the connection

Testing the Connection

To verify the MCP connection:

  1. Ensure the tool is enabled in Claude
  2. Ask a test question about your data
  3. Allow tool access when prompted
  4. Review the response

Example test query:

What tables exist in our BankFS data source? 
Is there anything for tracking employees?

Using MCP in Conversations

Query Workflow

When using MCP in Claude:

  1. Initial Query: Ask your question in natural language
  2. Tool Permission: Claude requests permission to use MCP tools
  3. Service Selection: Allow access to the required MCP service
  4. Data Retrieval: The service fetches information from Autonify
  5. Response: Claude presents the results in readable format

Example Interactions

Schema Exploration

User: What tables exist in our BankFS data source?

Claude: [Uses schema_discovery MCP]
I found the following tables in BankFS:
- customers (customer information)
- accounts (bank accounts)
- transactions (transaction records)
- employees (staff records)
...

Data Quality Check

User: Show me any data quality issues in the customer table.

Claude: [Uses quality MCP]
Here are the quality issues found:
- 5% of email addresses are invalid format
- 12 records have missing phone numbers
...

Sensitivity Review

User: Which columns contain PII in the customer table?

Claude: [Uses sensitivity MCP]
The following columns contain PII:
- customer_name (High sensitivity)
- social_security_number (Critical)
- email_address (Medium)
...

Technical Integration

For detailed technical integration instructions and supported frameworks, see MCP Integration Guide.

Integration with AI Frameworks

Native MCP Support

Claude Family

  • Claude Desktop: Full MCP support with native integration
  • Claude Code: IDE integration for development with data context
  • Configuration: Direct SSE endpoint connection

Other MCP-Compatible Tools

  • Continue.dev: AI code assistant with MCP support
  • Cursor: AI-powered editor with MCP capabilities
  • Cody (Sourcegraph): Code AI assistant

Custom Integration Patterns

Direct SSE Integration

// Example: Connect to MCP service from any JavaScript application
const eventSource = new EventSource('https://your-autonify.com/schema-sse/sse');
eventSource.onmessage = (event) => {
const data = JSON.parse(event.data);
// Process MCP responses
};

REST API Wrapper

For tools that don't support SSE:

  1. Create a REST endpoint that calls MCP services
  2. Transform SSE streams to REST responses
  3. Add caching layer for performance

GraphQL Client Integration

For the data access service:

  • Use any GraphQL client (Apollo, Relay, etc.)
  • Connect directly to the Hasura endpoint
  • Leverage introspection for schema discovery

Requirements for Integration

  • MCP-compatible client or bridge adapter
  • Network access to Autonify instance
  • Authentication token (if required)
  • Enabled MCP services in Settings → MCP tab

Security Considerations

Access Control

  • Services respect Autonify permissions
  • Only authorised data is accessible
  • Team-level isolation maintained

Authentication

  • MCP authentication can be disabled via MCP_AUTH_ENABLED environment variable
  • When enabled, services use OAuth authentication middleware
  • Secure HTTPS connections
  • Full endpoint URLs provided (base URL + service endpoint)

Audit Trail

  • All MCP usage is logged
  • Track which services are accessed
  • Monitor usage patterns

Best Practices

Service Selection

  • Enable only needed services
  • Disable unused endpoints
  • Regular security reviews

Query Optimization

  • Use specific data source names
  • Provide context in queries
  • Break complex questions into steps

Performance

  • Cache frequently accessed data
  • Limit result set sizes
  • Use filters when possible

Common Use Cases

Data Exploration

  • Discover available tables
  • Understand column meanings
  • Explore relationships

Quality Assurance

  • Check data completeness
  • Identify anomalies
  • Review validation results

Compliance Checks

  • Locate sensitive data
  • Verify classifications
  • Audit data handling

Development Support

  • Generate SQL queries
  • Understand data models
  • Debug data issues

Troubleshooting

Connection Issues

Problem: Claude Desktop cannot connect to MCP

  • Verify the full endpoint URL is correct (the system provides the complete URL)
  • Check service is enabled in the MCP settings table
  • Ensure network connectivity to your Autonify instance
  • Verify your Autonify instance is accessible from Claude Desktop
  • Check if MCP authentication is properly configured (MCP_AUTH_ENABLED setting)

Problem: No data returned

  • Confirm data source name
  • Check user permissions
  • Verify service is running
  • Review query syntax

Permission Errors

Problem: Access denied messages

  • Verify Autonify user permissions
  • Check team access rights
  • Confirm service authorisation
  • Review security settings

Performance Issues

Problem: Slow responses

  • Reduce query complexity
  • Use specific filters
  • Check network latency
  • Monitor service load

Advanced Configuration

Custom Settings

Each MCP service may have:

  • Rate limiting options
  • Result size limits
  • Timeout configurations
  • Cache settings

Multiple Environments

Configure separate MCP endpoints for:

  • Development
  • Staging
  • Production
  • Testing

Integration Options

MCP can be integrated with:

  • CI/CD pipelines
  • Documentation tools
  • Monitoring systems
  • Custom applications

Next Steps

After setting up MCP:

  1. Test with simple queries
  2. Configure security settings
  3. Set up monitoring
  4. Explore advanced features