Provides time filtering tools that can be integrated into Langflow AI workflows, enabling automated dashboard time period management through MCP protocol
CX TimeFilter MCP Server
A Model Context Protocol (MCP) server providing time filter tools for CX Dashboard. This server exposes time filtering functionality that can be used by any MCP-compatible client, including Langflow.
๐ฏ Features
Set Predefined Time Periods: Last Month, Last 7 days, This Quarter, etc.
Set Custom Date Ranges: Specify exact start and end dates
List Available Periods: Get all supported time periods
HTTP-based MCP Protocol: Easy integration with any MCP client
Optional Authentication: API key protection
Comprehensive Validation: Input validation and error handling
๐ Quick Start
1. Installation
2. Configuration
3. Run the Server
4. Verify Installation
๐ ๏ธ Available Tools
1. set_time_period
Set a predefined time period for dashboard tabs.
Parameters:
timePeriodName
(string): Exact name of the time periodtabName
(string): Dashboard tab name
Example:
2. set_custom_date_range
Set a custom date range with specific start and end dates.
Parameters:
startDate
(string): Start date in YYYY-MM-DD formatendDate
(string): End date in YYYY-MM-DD formattabName
(string): Dashboard tab name
Example:
3. list_time_periods
List all available predefined time periods.
Parameters: None
Example:
๐ API Endpoints
Endpoint | Method | Description |
| GET | Health check |
| GET | MCP protocol information |
| GET | List available tools |
| POST | Execute a tool |
| POST | Full MCP protocol endpoint |
๐ Authentication
The server supports optional API key authentication:
Set API Key: Add
MCP_API_KEY=your-secret-key
to.env
Include in Requests: Add
Authorization: Bearer your-secret-key
headerAlternative Formats:
ApiKey your-secret-key
orKey your-secret-key
๐ Langflow Integration
Step 1: Add MCP Tools Component
Open your Langflow project
Add an "MCP Tools" component
Configure the connection
Step 2: Configure Connection
Step 3: Use Tools in Flows
The tools will appear in Langflow and can be used in your AI workflows.
๐ฆ Deployment
Railway (Recommended)
Render
Connect your GitHub repository
Set environment variables
Deploy automatically
Docker
๐งช Testing
๐ Supported Time Periods
Calendar Periods:
All Time, Today, Yesterday
This Week, Last Week
This Month, Last Month
This Quarter, Last Quarter
This Year, Last Year
Rolling Periods:
Last 24 hours, Last 7 days, Last 14 days
Last 30 days, Last 90 days, Last 180 days
Last 12 Months
Custom Periods:
Any date range in YYYY-MM-DD format
๐ง Development
Project Structure
Adding New Tools
Create tool definition in
src/tools/
Add validation schema
Implement execute function
Export in tools array
Update README
๐ Troubleshooting
Common Issues:
Port already in use: Change
PORT
in.env
CORS errors: Update
ALLOWED_ORIGINS
in.env
Auth failures: Check
MCP_API_KEY
configurationTool not found: Verify tool name matches exactly
Debug Mode:
๐ License
MIT License - see LICENSE file for details.
๐ค Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests
Submit a pull request
Ready to integrate with Langflow and start filtering time periods via MCP! ๐
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Provides time filter tools for CX Dashboard integration, allowing users to set predefined time periods, custom date ranges, and manage time-based filtering across dashboard tabs. Supports HTTP-based MCP protocol with optional authentication for seamless integration with MCP-compatible clients like Langflow.