Skip to main content

X-HR MCP server using stdio transport

Project description

XHR MCP Server

Python MCP server for X-HR tools. This package is intended to run as a stdio MCP server so external clients can launch it as a local subprocess and communicate through standard input/output.

Transport

This server uses MCP stdio transport.

It is not intended to expose an HTTP MCP endpoint. MCP clients should start the package command directly and let the client manage the stdio session.

Install

From PyPI, once published:

pip install xhr-mcp-server

Or run it without a persistent install:

uvx xhr-mcp-server

For local development:

uv sync

This repository includes a starter tools.yaml with the default Workbench tools.

MCP Client Config

Example stdio configuration:

{
  "mcpServers": {
    "xhr": {
      "command": "uvx",
      "args": ["xhr-mcp-server"]
    }
  }
}

If the package is installed in the same environment as the MCP client:

{
  "mcpServers": {
    "xhr": {
      "command": "xhr-mcp-server",
      "args": []
    }
  }
}

Local Development

Run from the repository root:

uv run xhr-mcp-server

The installed package exposes the same command:

xhr-mcp-server

Environment

Common environment variables:

LOG_LEVEL=DEBUG
LOG_FORMAT=pretty
API_BASE_URL=https://api.dev.x-hr.ai
XHR_PAT=

API_BASE_URL defaults to https://api.x-hr.co when unset. For local testing, set it to the dev API URL shown above. XHR_PAT is optional. When present and the MCP request does not include an authorization header, script tools forward it as authorization: Bearer <XHR_PAT>. Script tools also use that authorization header to call /v1/im/me and fill xhr-employee-id and xhr-company-id when they are missing.

Tool Definition Example

Tools are loaded from tools.yaml. Each item can define an HTTP tool or a Python script tool:

tools:
  - name: workbench_list_tasks
    description: List Workbench tasks with optional filters.
    tool_type: python_script
    requires_auth: true
    active: true
    agent_category: workbench
    parameters:
      mine:
        type: boolean
        default: false
        description: Return tasks assigned to the current user.
    config:
      entrypoint: skills/workbench/get_tasks/scripts/get_tasks.py
      timeout_seconds: 30

Notes

Database migrations, Alembic, SQLAlchemy, and Postgres are intentionally not part of this package. Tools and script resources are bundled with the package by default.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xhr_mcp_server-0.1.0.tar.gz (164.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xhr_mcp_server-0.1.0-py3-none-any.whl (297.9 kB view details)

Uploaded Python 3

File details

Details for the file xhr_mcp_server-0.1.0.tar.gz.

File metadata

  • Download URL: xhr_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 164.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for xhr_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1ecb0eb8f1768c38ffd4553cb60283e8c624183813e710b2c3b9a1c413c7dd07
MD5 218693b6fc329f77407763843718ab26
BLAKE2b-256 9eb9e04ca2fa138870f37cfda95280ae06d897a46be5ce0be4d6af4aeb2c00fc

See more details on using hashes here.

File details

Details for the file xhr_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for xhr_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65e53053d14ccda434c1c7c8cc376d8551e487ca4328a6d611a436ab8f4ed21a
MD5 025f54bdb44b42296a61c8a9d2a14cb4
BLAKE2b-256 f00a9a88885372a73b9ca098d95a7a984e1bed4c1527079debbf80b0cd0ffe64

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page