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.
📹 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
- Navigate to Settings in the navigation
- Select the MCP 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:
- Review the service description
- Use the toggle switch in the Actions column to enable/disable
- Click the copy button next to the endpoint URL to copy the full URL
- The system will show a success toast when toggled
Connecting to Claude
Adding a Custom Connector
- Open Claude web application
- Navigate to the Connectors page
- Click Add Custom Connector
- Configure the connector:
- Name: Enter a descriptive name (e.g., "Schema Exploration")
- Remote URL: Paste the MCP endpoint URL from Autonify
- Click Add to save the connector
Configuring the Connector
After adding:
- Click Configure on the connector
- Review available attributes and settings
- Adjust configuration as needed
- Test the connection
Testing the Connection
To verify the MCP connection:
- Ensure the tool is enabled in Claude
- Ask a test question about your data
- Allow tool access when prompted
- 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:
- Initial Query: Ask your question in natural language
- Tool Permission: Claude requests permission to use MCP tools
- Service Selection: Allow access to the required MCP service
- Data Retrieval: The service fetches information from Autonify
- 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:
- Create a REST endpoint that calls MCP services
- Transform SSE streams to REST responses
- 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:
- Test with simple queries
- Configure security settings
- Set up monitoring
- Explore advanced features