IT Onboarding Automator MCP Server

IT Onboarding Automator MCP Server

Enables AI assistants to inspect employee access, list failed onboarding events, and retry provisioning operations.

Category
访问服务器

README

Mock IT Onboarding Automator

Project Overview

The Mock IT Onboarding Automator is a backend service that automates employee onboarding based on HR webhook events.

When a new employee is hired, the HR system sends an onboarding event to the service. The system validates the event, determines which applications the employee should receive based on their role, provisions access records, records audit information, and ensures duplicate events are handled safely through idempotent processing.

The project also exposes an MCP (Model Context Protocol) server that allows AI assistants and operators to inspect employee access, review failed onboarding events, and retry failed provisioning operations.


Features

Webhook Processing

Supports HR onboarding events via:

POST /webhooks/hris

Supported event type:

employee.hired

Role-Based Access Provisioning

Application access is automatically assigned based on employee role.

engineer

  • slack
  • google_workspace
  • jira

sales

  • slack
  • google_workspace
  • salesforce

it_admin

  • slack
  • google_workspace
  • jira
  • salesforce

Idempotent Event Processing

Duplicate webhook deliveries using the same event_id are safely ignored.

The system guarantees:

  • No duplicate employees
  • No duplicate access grants
  • No duplicate provisioning actions

Audit Logging

Every successful provisioning operation creates an audit log containing:

  • event_id
  • role
  • granted applications
  • idempotency status

MCP Server

The MCP server exposes the following tools:

get_employee_access

Retrieve employee details and provisioned application access.

list_failed_events

List failed onboarding events.

retry_provision

Retry a previously failed onboarding event.


Architecture Summary

flowchart TB
    HR[HR System]

    HR -->|POST /webhooks/hris| WEBHOOK[FastAPI Webhook]
    WEBHOOK --> PROV[Provisioning Service]

    PROV --> EMP[Employees]
    PROV --> ACCESS[Access Grants]
    PROV --> AUDIT[Audit Log]

    DB[(SQLite Database)]

    EMP --> DB
    ACCESS --> DB
    AUDIT --> DB

    MCP[MCP Server]

    MCP --> TOOL1[get_employee_access]
    MCP --> TOOL2[list_failed_events]
    MCP --> TOOL3[retry_provision]

    TOOL1 --> DB
    TOOL2 --> DB
    TOOL3 --> DB

Technology Stack

Component Technology
Language Python 3.12+
API Framework FastAPI
ORM SQLAlchemy 2.0
Database SQLite
MCP Official Python MCP SDK
Testing pytest
Package Management uv

Prerequisites

Install:

  • Python 3.12+
  • uv
  • Git

Verify installation:

python --version
uv --version
git --version

Installation

Clone repository:

git clone https://github.com/Aman3786/IT-Onboarding-Automator.git
cd IT-Onboarding-Automator

Install dependencies:

uv sync

OR

uv pip install -r requirements.txt

Initialize Database

Create tables and seed initial role mappings:

uv run python setup_db.py

Expected output:

Database initialized successfully

Database location:

data/onboarding.db

Run API

Start FastAPI server:

uv run uvicorn api.main:app --reload

API available at:

http://localhost:8000

Interactive documentation:

http://localhost:8000/docs

Run MCP Server

Start MCP server (Prequisite: Nodejs Should be installed for MCP Inspector)

npx @modelcontextprotocol/inspector uv run python -m mcp_server.server

OR

uv run mcp dev mcp_server/server.py

OR

uv run python -m mcp_server.server
npx -y @modelcontextprotocol/inspector

The MCP server uses stdio transport and is intended to be consumed by MCP Inspector, cursor and other MCP-compatible clients.


Configure Cursor MCP

Create:

.cursor/mcp.json

Configuration:

{
  "mcpServers": {
    "onboarding-automator": {
      "command": "uv",
      "args": [
        "run",
        "python",
        "-m",
        "mcp_server.server"
      ]
    }
  }
}

Restart Cursor after creating the configuration.

The following tools should become available through MCP Inspector/Cursor:

  • get_employee_access
  • list_failed_events
  • retry_provision

Run Tests

Run all tests:

uv run pytest

Run verbose output:

uv run pytest -v

Run a specific test file:

uv run pytest tests/test_webhook.py -v

Example Requests

Successful Employee Onboarding

curl -X POST http://localhost:8000/webhooks/hris \
-H "Content-Type: application/json" \
-d '{
  "event_id":"evt_hire_001",
  "event_type":"employee.hired",
  "email":"alex.chen@example.com",
  "full_name":"Alex Chen",
  "role":"engineer"
}'

Example response:

{
  "event_id": "evt_hire_001",
  "status": "completed",
  "idempotent": false,
  "employee": {
    "email": "alex.chen@example.com",
    "role": "engineer"
  },
  "granted_apps": [
    "slack",
    "google_workspace",
    "jira"
  ]
}

Duplicate Event

Submitting the same request again:

{
  "event_id": "evt_hire_001",
  "status": "completed",
  "idempotent": true
}

Invalid Role

curl -X POST http://localhost:8000/webhooks/hris \
-H "Content-Type: application/json" \
-d '{
  "event_id":"evt_invalid_role",
  "event_type":"employee.hired",
  "email":"bad@example.com",
  "full_name":"Bad User",
  "role":"unknown_role"
}'

Response:

{ 
  "event_id":"evt_invalid_role",
  "status":"failed",
  "error":"Unknown role: 'unknown_role'"
}

Assumptions

  1. Employee email addresses are unique.
  2. Roles are predefined and managed internally.
  3. Application provisioning is simulated through database records.
  4. SQLite is sufficient for local execution and evaluation.
  5. Duplicate webhook deliveries reuse the same event_id.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选