@agilex/huly-recruit-mcp

MCP Server Specification for the Huly Recruit Module

Version 0.0.1 (Pre-alpha) License: Apache 2.0 Author: AgileX Protocol: MCP

1. Overview

A Model Context Protocol server that exposes Huly Recruit operations as tools any MCP-compatible client can call. It wraps @hcengineering/api-client and lets AI agents create and manage talents, vacancies, applications, and pipeline movements without touching the Huly UI.

What this is

What this is not

2. Connection & Authentication

Transport

MCP over stdio (standard input/output). The server is a Node.js process that communicates with the MCP client via JSON-RPC 2.0 on stdin/stdout.

Huly Authentication

The server authenticates to Huly using email/password credentials via @hcengineering/api-client, which establishes a WebSocket connection with a NodeWebSocketFactory.

Environment Variables

VariableRequiredDefaultDescription
HULY_URLOptionalhttps://huly.appHuly instance URL. Use http://localhost:8087 for self-hosted.
HULY_EMAILRequiredEmail address of the Huly user account.
HULY_PASSWORDRequiredPassword for the Huly user account.
HULY_WORKSPACERequiredWorkspace slug (e.g. agilex-recruitment).

MCP Client Configuration

{
  "mcpServers": {
    "huly-recruit": {
      "command": "npx",
      "args": ["-y", "@agilex/huly-recruit-mcp"],
      "env": {
        "HULY_URL": "https://huly.app",
        "HULY_EMAIL": "you@example.com",
        "HULY_PASSWORD": "…",
        "HULY_WORKSPACE": "your-workspace"
      }
    }
  }
}

3. Tools

create_talent Implemented

Create a Talent in Huly Recruit. A Talent is a Person (in contact:space:Contacts) with the recruit:mixin:Candidate mixin attached. Optionally attaches email, phone, LinkedIn, and Google Drive URL channels.

Input Schema

FieldTypeRequiredDescription
first_namestringYesFirst/given name
last_namestringYesLast/family name
titlestringNoCurrent job title — surfaces on the talent card
citystringNoCity of residence
emailstring (email)NoEmail address — attached as Email channel
phonestringNoPhone number — attached as Phone channel
linkedinstringNoLinkedIn profile URL — attached as LinkedIn channel
cv_drive_urlstring (URL)NoGoogle Drive URL for the CV. Huly stores the link only; the artifact lives in Workspace. Attached as a Homepage channel.
profile_folder_urlstring (URL)NoGoogle Drive folder for all candidate artifacts. Attached as a Homepage channel.
notes_doc_urlstring (URL)NoGoogle Doc for working notes. Attached as a Homepage channel.
skillsstring[]NoSkill tags. NOTE: Accepted but not attached in v0.0.1 — uses the @hcengineering/tags subsystem, deferred.
sourcestringNoOrigin label (e.g. "LinkedIn InMail", "Direct application").

Output

{
  "talent_id": "69eda41502dd3b119a5c8fda",  // Huly Person doc ref
  "name": "Kagiso Maile",
  "channels_added": 6,                       // email + phone + linkedin + 3 drive URLs
  "warnings": []                             // or ["skills (5) accepted but not attached…"]
}

Huly Data Model

create_vacancy Implemented

Create a Vacancy in Huly Recruit. Vacancies live in core:space:Space with type=recruit:template:DefaultVacancy. The tool auto-seeds the seven default pipeline statuses.

Input Schema

FieldTypeRequiredDescription
namestringYesJob title (e.g. "ML Platform Engineer (LLM/MLOps)")
descriptionstringNoShort summary for the vacancy card. Markdown supported.
full_descriptionstringNoLong-form job spec. Omit if the brief lives in Drive.
brief_drive_urlstring (URL)NoGoogle Drive URL for the full vacancy brief. Appended to description as a link.

Output

{
  "vacancy_id": "69f1a89d02dd3b119a5c9012",
  "name": "V3 · ML Platform Engineer (LLM/MLOps)"
}

Pipeline Statuses (auto-seeded)

#StageHuly RefCategory
1Backlogrecruit:taskTypeStatus:BacklogUnStarted
2HR Interviewrecruit:taskTypeStatus:HRInterviewActive
3Technical Interviewrecruit:taskTypeStatus:TechnicalInterviewActive
4Test Taskrecruit:taskTypeStatus:TestTaskActive
5Offerrecruit:taskTypeStatus:OfferActive
6Wonrecruit:taskTypeStatus:WonWon
7Lostrecruit:taskTypeStatus:LostLost

Huly Data Model

create_application Implemented

Attach a Talent to a Vacancy at a pipeline stage. Creates a recruit:class:Applicant linking the Person to the Vacancy. The Applicant lives in the Vacancy's space and is attached to the Person via the 'applications' collection.

Input Schema

FieldTypeRequiredDescription
talent_idstringYesPerson doc ID (returned by create_talent)
vacancy_idstringYesVacancy doc ID (returned by create_vacancy)
stageenumYesOne of: Backlog, HR Interview, Technical Interview, Test Task, Offer, Won, Lost
assignee_idstringNoRecruiter Employee ref (responsible for this application)

Output

{
  "application_id": "69f1b23402dd3b119a5c9045",
  "talent_id": "69eda41502dd3b119a5c8fda",
  "vacancy_id": "69f1a89d02dd3b119a5c9012",
  "stage": "HR Interview"
}

Huly Data Model

4. Roadmap Tools

ToolPhaseStatusDescription
move_application2PlannedMove an application to a different pipeline stage with validation
find_talent3PlannedSearch talents by name, email, or skills
list_vacancies3PlannedList all vacancies with candidate counts per stage
add_review3PlannedAttach an interview review/feedback to an application
get_pipeline3PlannedGet full pipeline view for a vacancy (all applicants by stage)

5. Huly Data Model Reference

Entity Relationships

Person (contact:class:Person)
  ├── recruit:mixin:Candidate    ← makes it a Talent
  ├── Channel[] (Email, Phone, LinkedIn, Homepage)
  └── Application[] (one per Vacancy)

Vacancy (recruit:class:Vacancy extends task:class:Project)
  ├── statuses[] (7 default pipeline stages)
  ├── members[], owners[]
  └── Applicant[] (one per Talent applied)

Applicant (recruit:class:Applicant)
  ├── space = Vacancy (Vacancy IS a Space)
  ├── attachedTo = Person (Talent)
  ├── status = pipeline stage ref
  └── assignee = Employee ref (optional)

Wire-Verified Class References

Verified 2026-04-26 against Huly hcengineering/platform main branch and confirmed via wire probes against a live workspace.

RefPluginPurpose
contact:class:PersonContactBase person entity
contact:class:ChannelContactCommunication channel (email, phone, etc.)
contact:space:ContactsContactGlobal contacts space
recruit:class:VacancyRecruitJob opening (extends Project → IS a Space)
recruit:class:ApplicantRecruitTalent ↔ Vacancy link with pipeline stage
recruit:mixin:CandidateRecruitMixin that makes a Person a Talent
recruit:template:DefaultVacancyRecruitDefault vacancy template with 7 stages
contact:channelProvider:EmailContactEmail channel type
contact:channelProvider:PhoneContactPhone channel type
contact:channelProvider:LinkedInContactLinkedIn channel type
contact:channelProvider:HomepageContactGeneric URL channel (used for Drive links)

6. Path B — Document Storage Architecture

The MCP server follows "Path B": Huly stores metadata and links only. Durable artifacts (CVs, briefs, scorecards, contracts) live in Google Workspace.

Huly Stores (metadata)Google Workspace Stores (artifacts)
Talent name, city, title, sourceCV PDF in Google Drive
Channel links (email, phone, LinkedIn, Drive URLs)Candidate folder in Drive
Vacancy name, description, pipeline stagesFull vacancy brief in Google Docs
Application stage, assigneeInterview scorecards in Sheets

Drive URLs are stored as Homepage channels on the Person — the same mechanism a recruiter uses when pasting a link through the Huly UI. This ensures agents stay within capability parity with human users.

7. Seed Script

The repository includes a seed script that populates a complete demo workspace in ~12 seconds:

npm run seed:v3-demo

Creates:

Result: a fully populated Kanban board in Huly Recruit → Vacancies → V3.

8. Setup & Development

Prerequisites

Install & Run

git clone https://github.com/craig-agilex/huly-recruit-mcp.git
cd huly-recruit-mcp
npm install
cp .env.example .env.local  # fill in HULY_EMAIL, HULY_PASSWORD, HULY_WORKSPACE
npm run dev                  # starts MCP server on stdio

Test Individual Tools

npm run test:create-talent
npm run test:create-vacancy
npm run test:create-application
npm run seed:v3-demo          # full demo seed

Build

npm run build                # → dist/index.mjs (ESM, Node 22 target)

9. Technical Details

AspectDetail
RuntimeNode.js 22.12.0+ (ESM)
LanguageTypeScript 5.4 (strict)
MCP SDK@modelcontextprotocol/sdk ^1.29.0
Huly Client@hcengineering/api-client ^0.7.413
ValidationZod ^3.23.0
Transportstdio (JSON-RPC 2.0)
Buildtsup → ESM bundle
LicenseApache 2.0 (matches Huly upstream)
Total LOC1,149 (source + scripts)

Known Limitations (v0.0.1)


@agilex/huly-recruit-mcp · v0.0.1 · GitHub · AgileX · May 2026