Skip to content

paytm/trace-eye-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TraceEye Project Setup and Usage

This document outlines the steps to set up and run the project, configure necessary services, and integrate with Cursor MCP.

Prerequisites

  1. Set ElasticSearch Credentials: Create or update a .env file in the root of the project with your ElasticSearch credentials:

    ELASTICSEARCH_URL=<your_elasticsearch_url>
    ELASTICSEARCH_USERNAME=<your_elasticsearch_username>
    ELASTICSEARCH_PASSWORD=<your_elasticsearch_password>
    ELASTICSEARCH_FINGERPRINT=<your_elasticsearch_fingerprint>

Configuration

  1. Add Service to Endpoint Configuration: Modify the endpoint_config_data.json file to include your service details. Replace <service_name> with the actual name of your service.

    {
        "<service_name>": {
            "name": "<service_name>",
            "endpoint": "<service_name>",
            "log_index_path": "fse_backend_access_app*,fse_access_nginx*",
            "es_source_fields": ["message"],
            "es_sort_field": "@timestamp",
            "es_search_query": ["error exception"]
        }
    }

Installation and Running the Application

  1. Create and Activate Virtual Environment: It is recommended to use a virtual environment. Replace <env_name> with your preferred environment name.

    python3.13 -m venv <env_name>
    source <env_name>/bin/activate
  2. Install Requirements: Install the necessary Python packages using the requirements.txt file.

    pip install -r requirements.txt
  3. Run the Application: Execute the main.py script to start the application.

    python main.py

    This will expose an MCP endpoint.

MCP Endpoint

The application will expose an MCP endpoint at the following URL structure:

http://localhost:8090/<service_name>/sse

Replace <service_name> with the name you configured in endpoint_config_data.json.

Cursor MCP Integration

  1. Add URL to Cursor MCP Configuration: Update your Cursor mcp.json file to include the new MCP server. Replace ServiceNameProdLogs with a descriptive name for your service and <service_name> with your actual service name.

    {
        "mcpServers": {
            "ServiceNameProdLogs":{
               "url": "http://localhost:8090/<service_name>/sse"
            }
        }
    }

Expected Outcome

After completing these steps, the search_latest_logs tool should be exposed and available in Cursor MCP tools.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages