Tanda Workforce MCP Server
Integrates Tanda Workforce API with AI assistants to manage employee schedules, timesheets, leave requests, clock in/out operations, and workforce analytics through natural language with OAuth2 authentication.
README
Tanda Workforce MCP Server
A production-ready MCP (Model Context Protocol) server for integrating Tanda Workforce API with AI assistants like Claude. Features OAuth2 authentication with PKCE support and comprehensive workforce management tools.
Features
- OAuth2 Authentication - Secure authentication with Tanda including PKCE (RFC 7636)
- Claude.ai & Desktop Support - Works with both Claude.ai (OAuth flow) and Claude Desktop (JWT tokens)
- Dynamic Client Registration - RFC 7591 support for Claude MCP integration
- SSE Real-time Transport - Server-Sent Events for MCP remote transport
- MCP Protocol Support - Full JSON-RPC 2.0 implementation (protocol version 2024-11-05)
- 25+ Workforce Tools - Users, schedules, timesheets, leave, clock-in/out, and more
- Production Ready - Docker support, rate limiting, security headers, logging
- TypeScript - Fully typed codebase
Quick Start
1. Clone and Install
git clone https://github.com/hakeemrabiuDFW/Tanda-Workforce-MCP-Server.git
cd Tanda-Workforce-MCP-Server
npm install
2. Configure Environment
cp .env.example .env
# Edit .env with your Tanda OAuth credentials
Required environment variables:
TANDA_CLIENT_ID- Your Tanda OAuth client IDTANDA_CLIENT_SECRET- Your Tanda OAuth client secretTANDA_REDIRECT_URI- OAuth callback URL (e.g.,https://your-domain.com/auth/callback)SESSION_SECRET- Random 32+ character stringJWT_SECRET- Random 32+ character string
3. Run
# Development
npm run dev
# Production
npm run build
npm start
# Docker
docker-compose up -d
Connecting to Claude
Option 1: Claude.ai (Recommended)
Claude.ai uses OAuth 2.0 with Dynamic Client Registration. Simply provide your MCP server URL:
https://your-domain.com/mcp
Claude.ai will:
- Discover OAuth endpoints via
/.well-known/oauth-authorization-server - Register as a client via
/oauth/register - Initiate OAuth flow with PKCE via
/authorize - Exchange code for token via
/token - Connect via SSE to
/mcpfor real-time communication
Option 2: Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"tanda-workforce": {
"url": "https://your-domain.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_JWT_TOKEN"
}
}
}
}
Getting a JWT Token
- Navigate to
https://your-domain.com/auth/login - Authenticate with your Tanda account
- Copy the returned JWT token
Team Member Access
Each team member can connect to the same MCP server:
- Individual Authentication: Each person authenticates with their own Tanda credentials
- Separate Sessions: Each authenticated user gets their own session
- Permission-Based Access: Tool access depends on each user's Tanda permissions
Note: Sessions are stored in-memory. For production deployments with multiple server instances, consider implementing a shared session store (e.g., Redis).
API Endpoints
Core Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Server info and endpoint listing |
/health |
GET | Health check |
/docs |
GET | API documentation |
/stats |
GET | Server statistics |
OAuth 2.0 Endpoints
| Endpoint | Method | Description |
|---|---|---|
/.well-known/oauth-authorization-server |
GET | OAuth discovery (RFC 8414) |
/oauth/register |
POST | Dynamic Client Registration (RFC 7591) |
/authorize |
GET | OAuth2 authorization endpoint |
/token |
POST | OAuth2 token endpoint (supports PKCE) |
Authentication Endpoints
| Endpoint | Method | Description |
|---|---|---|
/auth/login |
GET | Start OAuth flow (browser) |
/auth/callback |
GET | OAuth callback handler |
/auth/status |
GET | Check authentication status |
/auth/logout |
POST | Logout and invalidate session |
/api/authenticate |
POST | Exchange code for JWT token |
/api/me |
GET | Get current user (protected) |
MCP Endpoints
| Endpoint | Method | Description |
|---|---|---|
/mcp |
GET | SSE endpoint for real-time transport |
/mcp |
POST | MCP JSON-RPC 2.0 endpoint |
/ |
POST | MCP endpoint (Claude compatibility) |
Available Tools
User Management
tanda_get_current_user- Get current user profiletanda_get_users- List all employeestanda_get_user- Get specific user details
Scheduling
tanda_get_schedules- Get scheduled shiftstanda_create_schedule- Create new shifttanda_update_schedule- Update shifttanda_delete_schedule- Delete shifttanda_publish_schedules- Publish schedules
Timesheets
tanda_get_shifts- Get worked shiftstanda_get_timesheets- Get timesheetstanda_approve_shift- Approve shifttanda_approve_timesheet- Approve timesheet
Leave Management
tanda_get_leave_requests- Get leave requeststanda_create_leave_request- Create leave requesttanda_approve_leave- Approve leavetanda_decline_leave- Decline leavetanda_get_leave_balances- Get leave balances
Clock In/Out
tanda_clock_in- Clock operationstanda_get_clock_ins- Get clock records
Organization
tanda_get_departments- List departmentstanda_get_locations- List locationstanda_get_qualifications- List qualificationstanda_get_user_qualifications- Get user qualifications
Costs & Awards
tanda_get_roster_costs- Get labor coststanda_get_award_interpretation- Get pay calculations
Docker Deployment
# Build and run
docker-compose up -d --build
# View logs
docker-compose logs -f
# Stop
docker-compose down
Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Run linter
npm run lint
# Run tests
npm test
Project Structure
├── src/
│ ├── auth/ # OAuth and authentication
│ │ ├── middleware.ts
│ │ └── oauth.ts
│ ├── config/ # Environment configuration
│ │ └── environment.ts
│ ├── mcp/ # MCP protocol handlers
│ │ ├── handler.ts
│ │ └── tools.ts
│ ├── server/ # Express server setup
│ │ └── app.ts
│ ├── tanda/ # Tanda API client
│ │ ├── client.ts
│ │ └── types.ts
│ ├── utils/ # Utilities
│ │ └── logger.ts
│ └── index.ts # Entry point
├── tests/ # Test files
├── Dockerfile
├── docker-compose.yml
├── DEPLOYMENT.md # Full deployment guide
└── package.json
Documentation
See DEPLOYMENT.md for comprehensive deployment instructions including:
- OAuth setup with Tanda
- Cloud deployment guides (AWS, GCP, Railway)
- Testing procedures
- Troubleshooting
License
MIT License - see LICENSE file
Author
hakeemrabiuDFW
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。