Skip to main content
Glama
availability_mcp

availability_mcp

by shayben

availability_mcp

A dependency-free MCP server that runs locally and reports the current user's activity/idle state. Agents can use it when deciding whether to wait for user feedback or continue autonomously. Activity data stays on-device and is only returned to the connected MCP client.

Install and configure

Python 3.10 or newer is required.

python -m pip install .

Add the server to your MCP client:

{
  "mcpServers": {
    "availability": {
      "command": "availability-mcp"
    }
  }
}

For development, run it directly with:

PYTHONPATH=src python -m availability_mcp.server

Related MCP server: genpark-cue-desktop-ambient-context-trigger-skill

Tool

get_user_activity

Returns:

  • idle_seconds: time since the last detected user input

  • is_idle: whether idle time meets idle_threshold_seconds (default: 300)

  • last_activity_at and observed_at: UTC ISO 8601 timestamps

  • source: the operating-system API used for the reading

The optional idle_threshold_seconds argument must be non-negative.

Platform support

  • Windows: GetLastInputInfo

  • macOS: the built-in ioreg utility and IOHIDSystem

  • Linux: xprintidle when installed, otherwise systemd-logind's user idle hint. Desktop environments that publish neither source return a tool error rather than guessing.

On macOS, terminal input-monitoring permissions may be required. Linux systemd-logind reports coarse active/idle state when xprintidle is not available; install xprintidle under X11 for exact idle duration.

Test

PYTHONPATH=src python -m unittest discover -s tests

Available Tools

1 tool
get_user_activityA

Get the local user's current idle duration and activity state. Use this to decide whether to wait for user feedback or proceed autonomously.

Inputs: idle_threshold_seconds.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 1 tool

    Disambiguation5/5

    There is only one tool, so there is no possibility of confusion or misselection between tools. Its purpose (retrieving the local user's idle duration and activity state) is unambiguous.

    Naming Consistency5/5

    The single tool follows a clear verb_noun convention (get_user_activity). With only one tool there is no inconsistency to introduce.

    Tool Count3/5

    A single tool is thin for a server, even one with a narrow scope like availability detection. It works but leaves little room for related queries, making the surface feel minimal.

    Completeness4/5

    For the narrow stated purpose of determining user availability, the tool covers the key signal (idle duration and activity state). Coverage is reasonable, though richer availability context (e.g. session or lock state) is absent.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Local workstation attention journal that tracks focus, idle, and agent sessions, exposing timeline data via MCP for AI agents to query current or past activity.
      5
      AGPL 3.0
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI agents to monitor ambient desktop context, react to screen text and clipboard changes, and predict proactive intents for non-intrusive action through MCP.
      -
    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables users to log AI tool activity without conversation text and contribute back only user-approved, small-cell-suppressed counts through a local MCP interface.
      MIT