Yala Events MCP Server
A Model Context Protocol (MCP) server that provides programmatic access to the yala.events API, enabling event management, user roles, permissions, and organizational features.
Overview
This MCP server wraps the yala.events API, providing a set of tools for managing events, organizations, user roles, permissions, and more. It's built using FastMCP and provides asynchronous API access with comprehensive error handling and logging.
Requirements
- Python >= 3.11
- MCP CLI >= 1.6.0
- HTTPX >= 0.28.1
Installation
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
Configuration
The server requires the following environment variables:
YALA_EVENTS_API_TOKEN: Your yala.events API authentication tokenBASE_URL: The base URL for the yala.events API
Create a .env file in the project root:
YALA_EVENTS_API_TOKEN=your_token_here
BASE_URL=https://api.yala.events
Available Tools
Events Management
list_events: List events with optional date filteringcreate_event: Create a new event with full detailsget_event_details: Get comprehensive information about a specific event
Organizations Management
get_organizations: List all organizationslist_public_organizations: Get SEO-optimized list of public organizations
Module Management
list_modules: List all modules with search capabilitycreate_module: Create a new moduleupdate_module: Modify an existing moduledelete_module: Remove a moduleget_module_histories: View module change history
Permissions Management
list_permissions: List all permissionscreate_permission: Create a new permissionupdate_permission: Modify existing permissionsdelete_permission: Remove a permissionget_permission_histories: Track permission changes
Role Management
list_roles: List all roles with user countscreate_role: Create a new role with permissionsupdate_role: Modify role details and permissionsdelete_role: Remove a roleget_role_histories: View role modification history
Favorites Management
list_favorites_events: View favorited eventscreate_favorite_event: Add an event to favoritesupdate_favorite_event: Modify favorite event detailsdelete_favorite_event: Remove an event from favoritesget_favorites_events_histories: Track favorites changes
Personal Access Tokens
list_personal_access_tokens: View all access tokenscreate_personal_access_token: Generate new access tokenupdate_personal_access_token: Modify token detailsdelete_personal_access_token: Revoke access tokenget_personal_access_token_histories: Track token changes
System Tools
get_app_version: Retrieve application version infohealth_check: Verify system health status
Usage Examples
List Events
events = await list_events(date="2024-04-07")
print(events)
Create New Event
event = await create_event(
title="Tech Conference 2024",
content="Annual technology conference",
date="2024-05-15T09:00:00Z",
organization_id=1,
type_id=1,
category_id=1,
format_id=1,
covers=["https://example.com/cover.jpg"],
is_private=False
)
print(event)
Manage Roles
# List all roles
roles = await list_roles()
# Create new role with permissions
role = await create_role(
name="Event Manager",
permissions_per_module=[
{"moduleId": 1, "permissionId": 1},
{"moduleId": 2, "permissionId": 2}
]
)
Error Handling
The server includes comprehensive error handling with detailed logging. All API requests include:
- Timeout handling (30-second default)
- HTTP status error handling
- Detailed error messages in logs
- Graceful error responses
Logging
The server uses Python's built-in logging module with INFO level by default. All API requests and responses are logged for debugging purposes.
Health Monitoring
Use the health_check tool to verify the system status:
status = await health_check()
print(status) # "Application is healthy"
Contributing
Contributions are welcome! Please ensure you:
- Write tests for new features
- Follow existing code style
- Update documentation as needed
- Add logging for new functionality
Metadata
Release files for yala-events 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| yala_events-0.1.2.tar.gz | 18.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yala_events-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.5 kB
Release files / yala_events-0.1.2.tar.gz
| Download URL | yala_events-0.1.2.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b851eb970a01a75bb0b19e4808d9a73510ab11cf681855efe874c4817f10ca7
|
|
BLAKE2b-256 checksum How to use checksums |
ace2c1d371db0ac2c172dc635cc1d7cb6c4afd63bcb48b1d20e851fba3ad867a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.29
|
Release files / yala_events-0.1.2-py3-none-any.whl
| Download URL | yala_events-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1290e6fea302583fc87156ae4bc5d49dc5bf6b553eabf2196037684883723f82
|
|
BLAKE2b-256 checksum How to use checksums |
8c66648fbd65a0b29b0ef96f6fe964b9dd05dbcbfec8c0cec1d54f5d46b8b84d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.29
|
Security for yala-events 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.