# Mela MCP

> Mela connects your AI agent directly to your operational workspace data. It lets you query job site statuses, track material consumption, record labor hours, and send updates—all without leaving your editor. Stop switching between field apps, spreadsheets, and chat tools; manage the entire project lifecycle through natural conversation.

## Overview
- **Category:** communication-messaging
- **Price:** Free
- **Tags:** team-chat, project-updates, workspace-sync, message-summarization, real-time-collaboration

## Description

You're tired of jumping between spreadsheets, field apps, and chat tools just to manage a single job site? This Mela MCP Server hooks your agent directly into your operational workspace data. You don't have to switch anything; you talk to your AI client, and it handles the entire project lifecycle for you.

When you need an overview of what's going on, start by calling `list_activities`—it gives you a list of every active job site and project recorded in the system. If you want deep details on any single site, use `get_activity`; that pulls all the core data points for one particular location or activity.

To make sure nothing critical is missed when starting up, your agent can run `list_checklists`, which retrieves all mandatory checklists tied to a specific type of job. You also need to know who's working there and what teams are involved; calling `list_users` gives you every member in the workspace, while `list_teams` provides a breakdown of the defined operational teams.

Tracking costs requires multiple steps. When you run `get_accounting_data`, it pulls detailed cost and accounting figures for an active project activity. If you need to know exactly what materials were used on site, use `log_materials`; this tracks consumption right where it happened. For labor tracking, calling `log_work_hours` records man-hours worked by personnel against a specific activity.

When the job status changes, you update it with `update_activity_status`. You can switch a site's state—say, moving it from 'In Progress' to 'On Hold'—using this tool. If you need to set up a brand new operation, run `create_activity` to generate a fresh record for the job site or activity.

For keeping people in the loop, your agent can send status updates using `post_message`, dropping text notes or updates right into the project feed. Need to talk about who's running the current agent? Use `get_me`; it gives you info on the user currently operating the tool. You can also check out basic team structure by calling `list_teams` and listing all members via `list_users`. This server lets your AI client manage everything from logging resource usage to updating job site status, all within a single chat interface.

## Tools

### create_activity
Creates a new job site or activity record in the system.

### get_accounting_data
Retrieves cost and accounting data for a specific project activity.

### get_activity
Pulls all core details for one particular job site or activity.

### get_me
Provides information about the user currently running the agent.

### list_activities
Lists every active job site and project on record.

### list_checklists
Retrieves all mandatory checklists associated with a specific activity type.

### list_teams
Provides a list of teams defined within the workspace structure.

### list_users
Lists every member who belongs to the workspace.

### log_materials
Tracks and records how much material was consumed at the job site.

### log_work_hours
Records man-hours worked by personnel for an activity.

### post_message
Sends a text note or update to a specific project activity feed.

### update_activity_status
Changes the current status of a job site (e.g., from 'In Progress' to 'On Hold').

## Prompt Examples

**Prompt:** 
```
Send an update to the 'Engineering' channel saying the build is fixed.
```

**Response:** 
```
Message posted successfully to the 'Engineering' channel.
```

**Prompt:** 
```
Summarize the latest tasks completed in Project Alpha.
```

**Response:** 
```
In Project Alpha, 3 tasks were completed today: 'DB Migration', 'Fix CSS on mobile', and 'Update README'.
```

**Prompt:** 
```
List all team members currently online.
```

**Response:** 
```
Currently online: Sarah, Marcus, John, and Elena.
```

## Capabilities

### Log Labor and Materials
Records man-hours worked or tracks physical material usage on any job site.

### Retrieve Activity Details
Pulls specific records about a given activity, including status, teams, and history.

### Get Financial Data
Retrieves detailed cost and accounting figures tied to an active job site or project.

### Manage Team Communication
Posts text updates, notes, or status changes directly into a specific activity feed or channel.

### View Project Scope
Lists all active job sites and provides an overview of available checklists for any project.

## Use Cases

### The Daily Status Report
A PM needs to send an end-of-day report. Instead of opening `list_activities` and then manually checking the status, they ask their agent: 'Give me a summary of all sites that are yellow/at risk.' The agent calls `get_activity` for each site, pulls the latest `post_message`, and drafts the full executive summary.

### Cost Overrun Investigation
The finance team flags a cost overrun. Instead of digging through invoices, they ask: 'What is the total accounting data for Site 3?' The agent executes `get_accounting_data` and cross-references it with recent inputs from `log_materials` to pinpoint where resources went wrong.

### Crew Roster Check
A foreman needs to know who is assigned to a job site and if they are current employees. They prompt: 'List all users for Site X.' The agent runs `list_users`, filters by the required role, and confirms availability before starting work.

### Process Documentation
The PM needs to ensure the crew follows protocol. They ask the agent: 'What are the mandatory steps for this type of activity?' The agent calls `list_checklists`, providing the required documentation so they can enforce compliance immediately.

## Benefits

- Consolidate Project Data: Instead of querying three separate databases for status, cost, and personnel, your agent uses `list_activities` and then pulls related data via tools like `get_accounting_data`. You get one answer.
- Real-Time Field Logging: Manually entering hours or materials is slow. With Mela, logging time (`log_work_hours`) or resources (`log_materials`) happens instantly through a single prompt to the agent.
- Single Source of Truth: When an activity status changes, don't update it in three places. Use `update_activity_status` and have your AI client record that change immediately across all connected records.
- Team Clarity: Need to know who’s available? Running `list_users` gives you the full roster instantly. You can then query specific team roles (`get_me`) to confirm permissions or status.
- Centralized Communication: Posting an update via `post_message` ensures that critical notes—like a delay or issue—land in the official activity feed, not lost in personal emails.

## How It Works

The bottom line is... your AI client calls multiple tools in sequence—like listing users, getting costs, and then logging time—to build a single, cohesive answer without you having to click through any menus.

1. Start by asking your agent to list activities (e.g., 'List all current job sites'). The tool returns the scope of work.
2. Next, tell it what data you need for one site (e.g., 'What's the cost and who is working on Site B?'). It calls `get_accounting_data` and `list_users`.
3. Finally, ask it to perform an action (e.g., 'Log 8 hours of work today for Site B'). The agent executes `log_work_hours` and confirms the update.

## Frequently Asked Questions

**Can the AI send messages to a specific channel?**
Yes, just mention the channel name or ID, and the AI will post the message directly on your behalf.

**How do I fetch the latest updates from my team?**
You can ask the agent to summarize recent activity in a specific project or channel.

**Does it support reading project task boards?**
Yes, the agent can list tasks, check assignees, and verify current statuses in your Mela projects.

**How does using get_accounting_data help me track job site costs?**
The AI agent retrieves cost and accounting data for a specific activity. It pulls metrics like material expenses and labor hours, giving you a full financial picture without manual spreadsheet work.

**What is the process when I need to log_materials on an active job site?**
The agent tracks material consumption directly against your project. When you call `log_materials`, it records exactly what was used and where, keeping your inventory data current for accounting.

**Do I need to run list_users before I can send updates?**
You should run `list_users` first. This provides the full directory of workspace members and confirms valid user IDs you'll need if your prompt requires addressing a specific team member.

**What happens if I try to update_activity_status with invalid data?**
The tool validates the input status against established activity protocols. If the provided status is invalid or incomplete, it returns a precise error message detailing what needs correction.

**How can list_activities help me manage multiple sites?**
It lists every job site or activity in your workspace. You can pass this full list to the agent so it knows all possible project contexts, letting you query statuses across many locations at once.