Loki MCP

Loki MCP

Read-only MCP server for 1mg's logistics platform (Loki/Thor), enabling order, task, rider, hub, and day-tracking queries via the Thor API.

Category
Visit Server

README

Loki MCP

Read-only MCP server over Loki / Thor — 1mg's logistics & operations platform. It talks to the same gateway the Thor admin UI uses (https://thor.1mg.com/1mg_api), so no VPN or host setup is needed beyond a valid login token.

Tools

Tool Surface What it does
loki_reference_data enums Valid values for status/type/category/fulfilled_by/rider filters
loki_search_hubs hubs Find a hub id (ObjectId) from a name/code — needed by order/task search
loki_get_hub hubs Full hub detail by id
loki_search_orders orders Search orders within hub(s) — hub_id required
loki_get_order orders Full order detail by order id
loki_get_order_timelines orders Chronological status history of an order
loki_search_tasks tasks Search delivery/pickup tasks within hub(s) — hub_id required
loki_get_task tasks Full task detail by id
loki_search_riders riders Search riders / phlebos
loki_get_rider riders Full rider detail by numeric id
loki_get_hub_riders riders Riders attached to a hub (optionally by type)
loki_get_phlebo_day_metrics day tracking Daily KPI summary for a rider (assigned/completed/distance/breach)
loki_get_phlebo_day_tasks day tracking Chronological day timeline (shift, login, task sequence)
loki_get_phlebo_planned_route day tracking Planned route waypoints + locations
loki_get_phlebo_actual_route day tracking Actual GPS pings (speed, battery, coolbox temp)
loki_search_phlebo_daily_metrics day tracking "Track Phlebos" board for a hub+date (live status/availability)
loki_get_hub_attendance_metrics attendance total_present / total_absent for hub(s) on a date
loki_get_rider_monthly_attendance attendance Day-by-day attendance + hours for a rider/month

All tools are read-only (readOnlyHint: true).

Day-tracking note: phlebo_id/rider_id is the numeric rider id; date is YYYY-MM-DD.

Auth

Thor authenticates with the authTokenThor JWT cookie. It is short-lived, so the server reads it fresh on every call — refreshing never needs a restart.

  1. Open https://thor.1mg.com while logged in.

  2. DevTools → Application → Cookies → copy the authTokenThor value.

  3. Paste it into the token file:

    echo 'PASTE_TOKEN_HERE' > ~/.loki_token
    

When calls start returning 401/403, just overwrite ~/.loki_token with a fresh value.

Env var Default Purpose
LOKI_TOKEN_FILE ~/.loki_token Path to token file
LOKI_TOKEN Token fallback if no file
LOKI_BASE_URL https://thor.1mg.com/1mg_api Gateway base

Setup

cd loki-mcp
uv sync
echo 'PASTE_TOKEN_HERE' > ~/.loki_token
uv run python server.py   # smoke test (Ctrl-C to stop)

Register in Claude Code

claude mcp add loki -- /Users/abhishekjain/1mg-claude-code/toy-ptojects/loki-mcp/.venv/bin/python \
  /Users/abhishekjain/1mg-claude-code/toy-ptojects/loki-mcp/server.py

Notes

  • hub_id is mandatory for order/task search. Resolve names → ids with loki_search_hubs.
  • Time filters use DD-MM-YYYY HH:mm:ss.
  • This is v1 and intentionally read-only; no write/action tools are exposed.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured