ECL MCP Server
This project integrates China Mobile Cloud Logging (ECL) with MCP (Model Context Protocol), providing tool capabilities for log querying, log overview, log group management, log topic management, alarm management, dashboards, and data processing.
Tools
| Module | Tool Name | Description |
|---|---|---|
| default | get_current_datetime | Get current datetime |
| get_log | Query raw log content | |
| query_alarm_product_topn | Query top 5 alarm resource types | |
| query_alarm_trend | Query 7-day alarm trends | |
| query_alarm_log_group_topn | Query top 5 alarm log topics | |
| group | create_log_group | Create new log group |
| update_log_group | Edit log group | |
| delete_log_group | Delete log group | |
| query_log_group_list | Query log group list | |
| theme | create_index_set | Create new log topic |
| update_index_set | Edit log topic | |
| delete_index_set | Delete log topic | |
| query_log_theme_list | Query log topic list | |
| alarm | query_alarm_policy_detail | Query alarm policy details |
| query_alarm_policy_list | Query alarm policy list | |
| query_alarm_record_list | Query real-time alarm records | |
| query_alarm_record_list_history | Query historical alarm records | |
| confirm_alarm_record | Acknowledge real-time alarms | |
| delete_alarm_policy | Delete alarm policy | |
| dashboard | query_dashboard_statistics | Query dashboard list |
| create_dashboard | Create new dashboard | |
| delete_dashboard | Delete dashboard | |
| query_dashboard_chart | Query charts under dashboard | |
| edit_dashboard | Edit chart | |
| delete_dashboard_chart | Delete chart | |
| query_chart_data | Query chart data | |
| etl | list_log_fn | Query data processing rules list |
| query_log_fn | Query data processing rule details | |
| delete_log_fn | Delete data processing rule | |
| update_log_fn_status | Modify data processing rule enable/disable status |
Installation
Using uv (recommended)
When using uv no specific installation is needed. We will
use uvx to directly run ecl-mcp-server.
uvx ecl-mcp-server
Using PIP
Alternatively you can install ecl-mcp-server via pip:
pip install ecl-mcp-server
After installation, you can run it as a script using:
python -m ecl-mcp-server
Configuration
Configure for Cursor.app
One-Click Installation
Manual Configuration
Configure the MCP Server in Cursor.app's settings page,
Using uvx
{
"mcpServers": {
"ecl-journal": {
"command": "uvx",
"args": [
"ecl-mcp-server",
"your_access_key",
"your_secret_key"
]
}
}
}
Using pip Installation
{
"mcpServers": {
"ecl-journal": {
"command": "python",
"args": [
"-m",
"ecl-mcp-server",
"your_access_key",
"your_secret_key"
]
}
}
}
Other MCP Client
- Cline. Click configuring-mcp-servers to learn how to configure.
- Cherry Studio. Click mcp-config to learn how to configure.
Customization - Launching ecl-mcp-server with Custom Arguments
ecl-mcp-server supports custom launch arguments or reading parameters from environment variables.
Usage: ecl-mcp-server [OPTIONS] ACCESS_KEY SECRET_KEY
Available arguments:
| Argument | Required | Env Variable Key | Description | Default |
|---|---|---|---|---|
| access_key | Yes | ECLOUD_JOURNAL_ACCESS_KEY | AccessKey required for China Mobile Cloud API gateway. See: https://ecloud.10086.cn/op-help-center/doc/article/42472 Recommended to pass via environment variable. |
/ |
| secret_key | Yes | ECLOUD_JOURNAL_SECRET_KEY | SecretKey required for China Mobile Cloud API gateway. See: https://ecloud.10086.cn/op-help-center/doc/article/42472 Recommended to pass via environment variable. |
/ |
| --port | No | / | Port number for ecl-mcp-server. | 8000 |
| --transport | No | / | Transport protocol. Options: [stdio, sse, streamable-http] | stdio |
| --log-level | No | / | Logging level. Options: [DEBUG, INFO, WARNING, ERROR, CRITICAL] | INFO |
| --preferred-pool-id | No | ECLOUD_JOURNAL_PREFERRED_POOL_ID | Default resource pool ID when accessing ecl-mcp-server. Some requests require explicit pool ID specification, otherwise needs to be specified in conversation. | None |
| --module -m | No | / | Only load tools from specified modules. Options: [default, group, theme, alarm, dashboard, etl, all]. Options' meanings, please see Available Tools. Can be specified multiple times: --module group --module theme |
default |
| --timezone -tz | No | / | Set timezone. Can be float for offset (e.g. 8 or -5.5) or timezone name (e.g. Asia/Shanghai) | 8 |
For more usage help, you can view the help documentation using the --help parameter: uvx ecl-mcp-server --help
Interaction Examples
-
How many log themes do I have?
-
Query original logs for a specific theme
Dependencies
This project relies on the following open source components. Many thanks to the open source community for their contributions! All dependencies follow their official licenses (see License Section).
- fastmcp
- mcp[cli]
- pydantic
- python-dateutil
- pytz
- typer
License
- This project is licensed under Apache-2.0. See LICENSE file for details.
- Licenses for dependencies: All dependencies follow their respective official licenses. See dependencies-licenses for details. Also refer to the project's licenses directory, which is included in the distribution package.
Metadata
Release files for ecl-mcp-server 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ecl_mcp_server-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Release files / ecl_mcp_server-0.1.5-py3-none-any.whl
| Download URL | ecl_mcp_server-0.1.5-py3-none-any.whl |
|---|---|
| Size | 79.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c6c6094f5cb42f4552898c4579b7c2e9d810b74fec41e0e84536beb19150cda
|
|
BLAKE2b-256 checksum How to use checksums |
0b79ddca75a1e0f33eb7e21b8f861544e408b54828428efacded4dbfb2a0fa0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Security for ecl-mcp-server 0.1.5
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.