Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"leaverequestmcpserverfordify": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
No description provided.
This server is thin — proceed with caution. Help improve this page →
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationBe the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in other
Pi Coding Agent extension (CLI-first) — routes bash/read/grep/find/ls through lean-ctx CLI for strong token savings. Optional MCP bridge can register advanced tools.
Apify MCP Server
97% token reduction for AI coding sessions — zero deps, 21 languages, MCP server
MCP proxy that compresses prose fields (tool descriptions, etc.) using caveman rules. Same accuracy, fewer context tokens.
MCP Security Weekly
Get CVE alerts and security updates for LeaveRequestMcpServerForDify and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
這是一個基於 Model Context Protocol (MCP) 的 ASP.NET Core 範例伺服器,提供請假管理相關的工具函數,並使用 Server-Sent Events (SSE) 作為傳輸協定。
本專案提供的主要功能:
McpServer/
├── Program.cs # 主程式與 MCP 工具實作 (LeaveRequestTool)
├── McpServer.csproj
├── McpServer.sln
├── appsettings.json
├── appsettings.Development.json
└── Properties/launchSettings.json
WebApplication 並設定日誌輸出(將 Trace 等級以上輸出到 stderr):var builder = WebApplication.CreateBuilder(args);
builder.Logging.AddConsole(consoleLogOptions =>
{
consoleLogOptions.LogToStandardErrorThreshold = LogLevel.Trace;
});
WithToolsFromAssembly() 自動掃描程式集中標註的工具:builder.Services
.AddMcpServer()
.WithHttpTransport()
.WithToolsFromAssembly();
MapMcp()):var app = builder.Build();
app.MapMcp();
app.Run();
LeaveRequestTool)目前所有 MCP 工具皆直接定義在 Program.cs 的靜態類別 LeaveRequestTool 中,並由 WithToolsFromAssembly() 自動掃描註冊。主要工具如下:
getRemainingLeaveDays(string employeeName):取得今年剩餘可請假天數(示範性模擬回傳)。getUsedLeaveDays(string employeeName):取得今年已請假的總天數(示範性模擬回傳)。LeaveRequest(string 請假起始日期, int 天數, string 請假事由, string 代理人, string 請假者姓名):提交請假申請,若欄位齊全回傳請假摘要字串,否則回傳錯誤訊息。GetCurrentDate():回傳目前時間(UTC+8,格式 yyyy-MM-dd HH:mm:ss)。範例(伺服器內部模擬):
david → 5 天,eric → 6 天,其他 → 3 天(此為示範資料,實務應查詢資料庫)。dotnet restore
dotnet run
預設會在 http://localhost:5177 啟動伺服器。
在 .vscode/mcp.json 中設定連線資訊:
{
"servers": {
"leave-request": {
"type": "sse",
"url": "https://your-server-url/sse"
}
}
}
透過支援 MCP 的客戶端可以自然語言呼叫工具,例如:
getRemainingLeaveDays("eric") → 回傳示範值 6getUsedLeaveDays("eric") → 回傳示範值 6LeaveRequest(...)GetCurrentDate()[McpServerToolType]:標記類別為 MCP 工具容器[McpServerTool]:標記方法為 MCP 工具函數[Description(...)]:提供工具或參數的說明,幫助 AI 理解用途本專案僅供學習與示範用途。