Skip to main content
Glama
ai-agent-logs-mcp
by ArminDashti

ai-agent-logs-mcp

MCP server so Cursor agents can talk to ai-agent-logs-api (same data shown in ai-agent-logs-webui).

Prerequisites

  1. Run the API (local http://127.0.0.1:8120 or published https://ai-agent-log-api.xaigrok.ir).

  2. Node.js 18+.

Related MCP server: Log MCP Server

Setup

cd C:\Users\armin\GitHub\ai-agent-logs-mcp
copy .env.example .env
npm install
npm run build

Cursor (~/.cursor/mcp.json)

"ai-agent-logs-mcp": {
  "command": "node",
  "args": ["C:/Users/armin/GitHub/ai-agent-logs-mcp/dist/index.js"],
  "env": {
    "AI_AGENT_LOGS_API_URL": "https://ai-agent-log-api.xaigrok.ir",
    "AI_AGENT_LOGS_USERNAME": "armin",
    "AI_AGENT_LOGS_PASSWORD": "dopadopa123"
  }
}

Restart MCP / reload Cursor after changing mcp.json.

Tools

Tool

API

health_check

GET /health

login

POST /api/v1/auth/login

list_prompts

GET /api/v1/prompts

create_prompt

POST /api/v1/prompts

log_agent_response

POST /api/v1/agent-responses

list_sessions

GET /api/v1/sessions

get_session

GET /api/v1/sessions/:id

log_agent_response

Full turn fields sent to the API: model, rate, date, time, device, user_ip, duration_ms, project, app (default cursor), token_usage, user_prompt, refined_prompt, is_accepted, agent_response, session, title_of_session.

Authenticated tools auto-login with env credentials when no JWT is cached.

Env

Variable

Default

AI_AGENT_LOGS_API_URL

http://127.0.0.1:8120

AI_AGENT_LOGS_USERNAME

armin

AI_AGENT_LOGS_PASSWORD

dopadopa123

Available Tools

6 tools
create_promptA

Create a prompt log row (POST /api/v1/prompts). Auto-logs in if needed.

Inputs: mode (required), rate (required), title (required), device (required), +4 more.

get_sessionA

Get one session and its prompt turns (GET /api/v1/sessions/:id). Auto-logs in if needed.

Inputs: id (required).

health_checkA

Check ai-agent-logs-api health (GET /health).

Inputs: no named parameters.

list_promptsA

List stored prompts newest first (GET /api/v1/prompts). Auto-logs in if needed.

Inputs: no named parameters.

list_sessionsA

List agent conversation sessions newest first (GET /api/v1/sessions). Auto-logs in if needed.

Inputs: no named parameters.

loginA

Login to ai-agent-logs-api and cache the JWT. Optional username/password override env defaults.

Inputs: password, username.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action: health_check for API status, login for authentication, list/create for prompts, and list/get for sessions. No overlap or ambiguity among them.

    Naming Consistency5/5

    All tool names follow a predictable lowercase_with_underscores pattern, mostly verb_noun (list_prompts, create_prompt, get_session). The singular 'login' and compound 'health_check' fit naturally without breaking consistency.

    Tool Count5/5

    With only 6 tools, the set is tightly scoped for the purpose of a logs API. Each tool serves an essential function, and the count is well within the ideal range.

    Completeness4/5

    The surface covers core prompt and session operations (list/create for prompts, list/get for sessions) plus health and login. Missing a get_prompt or delete operations, but for a logging server these are often unnecessary, making the gaps minor.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Enables AI agents to query Prometheus metrics and Loki logs for intelligent alert investigation and troubleshooting. Provides service discovery, metric querying, log searching, and correlation tools to help identify root causes of issues.
      9
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to automatically inspect and analyze application runtime log files for debugging and troubleshooting. Supports monitoring multiple log directories simultaneously with tools for listing, reading, searching, and paginating through log files.
      8
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI coding agents with tools to query, search, and analyze persisted HTTP request logs, enabling efficient debugging without terminal noise.
      MIT