Leave Manager
Leave Manager MCPサーバー
このプロジェクトは、SQLiteを使用して従業員、休暇残高、休暇申請を管理するPython MCPサーバーです。
1. プロジェクトを作成する
PowerShellを開き、プロジェクトディレクトリを作成してください:
mkdir D:\Coding\mcpserver\LeaveManager
cd D:\Coding\mcpserver\LeaveManagerleave_manager_server 内に uv Pythonプロジェクトを作成してください:
uv init leave_manager_server
cd leave_manager_server
uv add "mcp[cli]>=2.1.1"このプロジェクトにはPython 3.14以降が必要です。uv は pyproject.toml、uv.lock、およびサーバーの実行に使用する仮想環境を作成します。
Related MCP server: leave_manager
2. サーバーを実装する
server.py を作成し、次の各部分を追加します:
mcp.server.mcpserverからMCPServerをインポートします。MCPServer("Leave Manager")でサーバーを作成します。EmployeeとLeaveRequestデータモデルを定義します。絶対パスを使用して
server.pyと同じディレクトリにSQLiteデータベースを作成します。起動時に
employeesとleave_requestsテーブルを初期化し、サンプルデータを挿入します。従業員ディレクトリと休暇申請用のリソースを追加します。
休暇の申請・承認、残高の確認、未承認申請の一覧取得、データベース統計の取得、従業員の追加を行うツールを追加します。
__main__ブロックからサーバーを起動します:
if __name__ == "__main__":
init_database()
mcp.run()このプロジェクトはMCP 2.xを使用します。古いMCP 1.xのインポートは、この依存関係では動作しません:
from mcp.server.fastmcp import FastMCP有効なMCP 2.xの形式は次のとおりです:
from mcp.server.mcpserver import MCPServer
mcp = MCPServer("Leave Manager")3. サーバーを直接実行する
プロジェクトディレクトリから:
cd D:\Coding\mcpserver\LeaveManager\leave_manager_server
uv run server.pyサーバーはMCP通信に標準入出力を使用するため、MCPクライアントが接続されている間は実行を続けます。停止するには Ctrl+C を押します。
長時間実行されるサーバーを起動せずに、モジュールが正しくインポートされることを検証します:
uv run python -c "import server; print('Server import valid')"4. MCP Inspectorでテストする
サポートされている開発コマンドは次のとおりです:
cd D:\Coding\mcpserver\LeaveManager\leave_manager_server
uv run mcp dev server.pyMCP InspectorはNode.jsを使用します。最新のInspectorを使用する前に、Node.js 22.19.0以降をインストールしてください。バージョンは次のコマンドで確認します:
node --version
npm --versionこのPythonプロジェクトディレクトリには package.json がないため、npm i を実行しないでください。Inspectorがネイティブバインディングの欠落を報告した場合は、一時的な npx キャッシュをクリアして再試行してください:
Remove-Item "$env:LOCALAPPDATA\npm-cache\_npx" -Recurse -Force
uv run mcp dev server.py5. Claude Desktopを接続する
Claude Desktopは次の場所から設定を読み取ります:
%APPDATA%\Claude\claude_desktop_config.jsonこのサーバーエントリを追加します。プロジェクトが別の場所に保存されている場合は、パスを置き換えてください:
{
"mcpServers": {
"leave-manager": {
"command": "uv",
"args": [
"run",
"--directory",
"D:\\Coding\\mcpserver\\LeaveManager\\leave_manager_server",
"server.py"
]
}
}
}設定を保存した後、Claude Desktopを再起動します。サーバーは初回起動時に server.py と同じディレクトリに leave_manager.db を作成します。
利用可能なMCP機能
リソース:
employees://allemployee://{employee_id}leave-requests://allleave-requests://employee/{employee_id}leave-requests://status/{status}
ツール:
submit_leave_requestapprove_leave_requestcheck_leave_balanceget_pending_approvalsget_database_statsadd_employeeThis will add my Config file automaticuv run mcp install server.py --name "leave_manager"
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server exposing klokin time-tracking operations (employees, time entries, stores) to AI clients.
Create, schedule, and publish social posts, manage accounts, and read analytics as MCP tools.
Remote MCP for AI waiver checks, exception approvals, expiry review, and audit receipts.
MCP server for public_holidays_mcp
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage employee leave by checking balances, applying for leave, and viewing history via MCP tools.
- FlicenseNot gradedqualityCmaintenanceEnables natural-language-based employee leave management including leave balance checks, leave applications, approvals, and history retrieval through an MCP-compatible client.
- FlicenseAqualityCmaintenanceExposes employee leave-management operations (add employees, check balance, apply/cancel leave, view history) as MCP tools for AI clients like Claude Desktop to call directly.6
- FlicenseNot gradedqualityBmaintenanceEnables managing employee information, tasks (todos), and company policies via MCP tools and resources.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AniketDonode/LeaveManager'
If you have feedback or need assistance with the MCP directory API, please join our Discord server