mcp-logs-server

XCaliber000/mcp-logs-server

3.2

If you are the rightful owner of mcp-logs-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP Logs Server is a Model Context Protocol server designed to fetch deployment logs from Vercel and Railway.

Tools
  1. get_vercel_logs

    Fetches logs from a Vercel deployment.

  2. get_railway_logs

    Fetches logs from a Railway service or deployment.

MCP Logs Server

A Model Context Protocol (MCP) server that provides tools for fetching deployment logs from Vercel and Railway.

Setup

  1. Install dependencies:
npm install
  1. Set environment variables:
export VERCEL_TOKEN=your_vercel_token_here
export RAILWAY_TOKEN=your_railway_token_here
  1. Run the server:
npm start

The server will start on port 3000 (or the PORT environment variable).

Available Tools

get_vercel_logs

Fetches logs from a Vercel deployment.

Parameters:

  • projectId (required): The Vercel project ID
  • deploymentId (required): The Vercel deployment ID
  • limit (optional, default 100): Number of log entries to fetch

get_railway_logs

Fetches logs from a Railway service or deployment.

Parameters:

  • projectId (required): The Railway project ID
  • serviceId (required): The Railway service ID
  • environmentId (optional): The Railway environment ID
  • deploymentId (optional): The Railway deployment ID
  • limit (optional, default 100): Number of log entries to fetch

Deploying to Railway

Prerequisites

  1. A Railway account (https://railway.app)
  2. A GitHub account
  3. Your Vercel API token (from https://vercel.com/account/tokens)
  4. Your Railway API token (from https://railway.app/account/tokens)

Step-by-Step Deployment

  1. Push to GitHub:

    git add .
    git commit -m "Initial MCP logs server"
    git branch -M main
    git remote add origin https://github.com/YOUR_USERNAME/mcp-logs-server.git
    git push -u origin main
    
  2. Create Railway Project:

    • Go to https://railway.app/new
    • Click "Deploy from GitHub repo"
    • Connect your GitHub account if not already connected
    • Select the mcp-logs-server repository
    • Click "Deploy Now"
  3. Set Environment Variables:

    • In your Railway project dashboard, click on the service
    • Go to the "Variables" tab
    • Click "New Variable" and add:
      • VERCEL_TOKEN = Your Vercel API token
      • RAILWAY_TOKEN = Your Railway API token
    • Railway will automatically restart the service
  4. Get Your Public URL:

    • In the service settings, go to "Settings" tab
    • Under "Networking", click "Generate Domain"
    • Your MCP server will be available at: https://YOUR-SERVICE.railway.app
  5. Configure in Cursor:

    • Add to your MCP configuration:
    {
      "mcpServers": {
        "logs-server": {
          "url": "https://YOUR-SERVICE.railway.app/mcp",
          "transport": "http"
        }
      }
    }
    

Testing Locally

You can test the server by sending a POST request to /mcp:

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/list",
    "id": 1
  }'

Health Check

The server exposes a /health endpoint for monitoring:

curl http://localhost:3000/health