WeWork MCP Server
# WeWork MCP Server
A Model Context Protocol (MCP) server that provides access to WeWork project management data through Claude and other LLM clients. This server exposes WeWork project information, task analysis, and project management tools.
## Features
🔍 **Project Search**
- Search projects by name with fuzzy matching
- Find best matching projects using cosine similarity
- Get list of all available projects
📊 **Project Analysis**
- Detailed task analysis within projects
- Completion progress statistics
- Task categorization by status and assignee
- Export data to CSV files
📋 **Information Management**
- Get detailed project information
- Track deadlines and completion dates
- Analyze task failure reasons
## Prerequisites
- Python 3.12+
- WeWork API access token
- uv package manager
## Installation
1. Clone this repository:
```bash
git clone <repository-url>
cd wework-mcp-server
```
2. Install dependencies:
```bash
uv sync
```
## Configuration
### Local Setup
#### 1. WeWork Access Token
**Option A: Environment Variable (Recommended)**
Create a `.env` file in the project root:
```env
WEWORK_ACCESS_TOKEN=your_actual_wework_token_here
```
**Option B: Direct Configuration**
Update the `WEWORK_ACCESS_TOKEN` in `wework_mcp_server.py` with your actual WeWork API token.
#### 2. Claude Desktop Configuration (Local)
Add this server to your Claude Desktop configuration file:
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Linux**: `~/.config/claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"WeWork Task Analysis Server": {
"command": "uv",
"args": [
"--directory",
"/path/to/wework-mcp-server",
"run",
"wework_mcp_server.py"
]
}
}
}
```
#### 3. Restart Claude Desktop
After adding the configuration, restart Claude Desktop to apply changes.
### Remote Deployment 🚀
Deploy the server to cloud platforms for remote access by Claude.
#### Quick Deploy với Railway (Khuyến nghị)
```bash
# Install Railway CLI
npm install -g @railway/cli
# Deploy
chmod +x deploy_scripts.sh
./deploy_scripts.sh
# Choose option 1 (Railway)
```
#### Deploy Options
- **Railway**: `./deploy_scripts.sh` → option 1
- **Docker**: `docker-compose up --build`
- **Heroku**: `./deploy_scripts.sh` → option 4
- **Manual**: Xem `DEPLOY_GUIDE.md`
#### Remote Claude Configuration
Sau khi deploy, cập nhật Claude config:
```json
{
"mcpServers": {
"wework-remote": {
"command": "curl",
"args": ["-X", "GET", "https://your-app.railway.app/api/test"]
}
}
}
```
📖 **Chi tiết**: Xem `DEPLOY_GUIDE.md` cho hướng dẫn deploy đầy đủ.
## Usage
### Example Prompts
- "Show me all available projects"
- "Find project 'marketing campaign'"
- "Analyze tasks for project ID 12345"
- "Get statistics for the development project"
- "Export task analysis to CSV"
## Available Resources
- `file://projects/available` - List all available WeWork projects
## Available Tools
### MCP Tools (Local)
- `search_projects` - Search for projects by name
- `find_project_by_name` - Find project with similarity matching
- `get_project_details` - Get detailed information about a specific project
- `analyze_project_tasks` - Analyze tasks within a project
- `get_project_statistics` - Get comprehensive project statistics
### HTTP Endpoints (Remote)
- `GET /health` - Health check
- `GET /api/test` - Test WeWork connection
- `GET /api/projects?search=<text>` - Search projects
- `POST /api/project/details` - Get project details
- `POST /api/project/analyze` - Analyze project tasks
## Development
### Run Server for Testing
```bash
# Using uv
uv run wework_mcp_server.py
# Or with Python
python wework_mcp_server.py
# Run tests
python test_wework_server.py
```
### Data Structure
#### Task Analysis DataFrame Columns
| Column | Description |
| ------------------ | ------------------------------------- |
| `Loại công việc` | Task category |
| `Tên công việc` | Task name |
| `Công việc con` | Subtask (if any) |
| `Người thực hiện` | Assignee |
| `Người liên quan` | Related people |
| `Mô tả công việc` | Task description |
| `Trạng thái` | Status (Completed/In Progress/Failed) |
| `Kết quả đạt được` | Achievement results |
| `Lí do thất bại` | Failure reason |
| `Ngày bắt đầu` | Start date |
| `Deadline` | Due date |
| `Ngày hoàn thành` | Completion date |
## Troubleshooting
### Common Issues
1. **Access token expired**: Update token in `.env` file or `wework_mcp_server.py`
2. **Dependencies not found**: Run `uv sync` to install all dependencies
3. **Claude Desktop doesn't recognize server**: Check file paths in config and restart Claude Desktop
4. **CSV encoding issues**: Files are exported with UTF-8-BOM encoding
### Debug Mode
```bash
python wework_mcp_server.py --debug
```
## Security Notes
⚠️ **Important**: For production use:
- **Always use environment variables** (`.env` file) instead of hardcoding tokens
- Add `.env` to your `.gitignore` to prevent committing sensitive data
- Do not commit access tokens to git repository
- Use only in trusted environments
- Regularly rotate your access tokens
## License
This project is licensed under the MIT License.
## Acknowledgments
- WeWork for providing the project management platform and API
- Model Context Protocol team for the MCP framework
TDQS
Scored across 6 tools
Most tools have distinct purposes: analyze_project_tasks focuses on task analysis, find_project_by_name and search_projects handle project discovery (though these two could be confused), get_project_details and get_project_statistics provide different project information, and test_connection is clearly separate. The main ambiguity is between find_project_by_name and search_projects, which both search projects by name with slightly different approaches.
Tool names follow a consistent snake_case pattern with clear verb_noun structure (analyze_project_tasks, find_project_by_name, get_project_details, etc.). The only minor deviation is test_connection, which uses a simpler verb_noun pattern but still fits the overall naming convention.
With 6 tools, this is well-scoped for a project management server focused on WeWork. The count is appropriate as it covers core operations (project discovery, details, statistics, task analysis) without being overwhelming or too sparse for the domain.
The toolset covers project discovery and analysis well but has notable gaps in project lifecycle management. There are no tools for creating, updating, or deleting projects or tasks, which limits agents to read-only operations. However, for analysis and monitoring purposes, the existing tools provide reasonable coverage.