tayr.ma — Model Context Protocol (MCP)
POST/GET/DELETE https://tayr.ma/mcpThe Model Context Protocol (MCP) is an open standard that lets AI tools like Claude connect directly to real data sources through clearly described tools, instead of manual copy/paste. The tayr.ma MCP server exposes the platform's public environmental and municipal-issue report data as tools any MCP client can call.
Claude Code (CLI):
claude mcp add --transport http tayr https://tayr.ma/mcp
Registers the server for your user, available across all your projects.
Custom connector on claude.ai:
https://tayr.ma/mcpNo authentication needed. All responses are UTF-8 JSON.
list_reportspublic
Lists public reports, optionally filtered by status, category, city, and date range.
| Param | Type | Required | Description |
|---|---|---|---|
status | string | — | not_yet | pending | in_progress | resolved | rejected | approved |
category | string | — | environment | water_electricity | infrastructure | waste | lighting | graffiti | roads | other |
city | string | — | Partial match on normalized city or location field |
from_date / to_date | string | — | YYYY-MM-DD or ISO |
limit | number | — | Max results (default 20, max 50) |
{
"total": 131,
"count": 1,
"reports": [{
"id": 26, "title": "...", "category": "other", "status": "pending",
"location": "Smara", "latitude": "26.7384", "longitude": "-11.6874",
"severity": 1, "upvotes": 0,
"createdAt": "2026-05-30 01:30:07.764", "resolvedAt": null
}]
}
get_reportpublic
Full details of a single report by id — reporter phone/email/name are never included.
| Param | Type | Required | Description |
|---|---|---|---|
id | string | number | yes | Report id |
{
"id": 47, "title": "...", "category": "water_electricity", "status": "pending",
"location": "Agadir", "description": "...", "address": null,
"problemType": "maintenance", "mood": "😐", "imageUrl": "/uploads/reports/....webp",
"timeline": [], "lastUpdate": null, "assignedAuthority": null, "year": 2025
}
get_statspublic
Aggregate stats: totals, by status/category/city, avg resolution time, this week/month.
No parameters.
{
"total": 131,
"byStatus": { "pending": 33, "resolved": 22, "rejected": 6, "in_progress": 11, "approved": 17 },
"byCategory": { "roads": 27, "waste": 23, "lighting": 21, "water_electricity": 20 },
"byCity": { "Inezgane": 21, "Smara": 19, "Dakhla": 16 },
"avgResolutionHours": 24, "thisWeek": 0, "thisMonth": 0
}
search_reports_by_locationpublic
Finds reports within a given radius (km) of a lat/lng point, sorted by distance.
| Param | Type | Required | Description |
|---|---|---|---|
lat | number | yes | Latitude |
lng | number | yes | Longitude |
radius_km | number | — | Default 5, max 100 |
{
"count": 2,
"reports": [
{ "id": 67, "title": "...", "location": "Laayoune", "distanceKm": 0 },
{ "id": 86, "title": "...", "location": "Laayoune", "distanceKm": 1.49 }
]
}
get_municipality_performancepublic
Per-municipality performance: totals, status breakdown, resolution rate, avg resolution/first-response hours, most common category.
| Param | Type | Required | Description |
|---|---|---|---|
city | string | — | Partial match for one city; omit to return all cities |
{
"count": 1,
"municipalities": [{
"city": "Smara", "total": 19,
"byStatus": { "pending": 8, "resolved": 6, "in_progress": 1 },
"resolutionRatePercent": 31.6,
"avgResolutionHours": 24, "avgFirstResponseHours": 3.2,
"mostCommonCategory": "water_electricity"
}]
}
search_reportspublic
Full-text search across report title and description — case-insensitive, tolerant of common Arabic spelling variants (diacritics, alef/hamza forms, alef maksura, taa marbuta).
| Param | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search text, at least 2 characters |
status | string | — | Filter by status |
category | string | — | Filter by category |
limit | number | — | Default 20, max 50 |
{
"total": 3,
"count": 3,
"reports": [
{ "id": 12, "title": "...", "category": "roads", "status": "pending" }
]
}
Two protected tools exist for updating a report's status (update_report_status)
and adding an official response (add_official_response). They are restricted
to authorized partners (municipalities, competent authorities) via a private access key.
Contact us for write access.