@sousaalex1605/message_mcp_server
v0.0.3
Published
MCP message Server
Readme
Message Service (message.py)
This module implements a simple messaging service for integration with the MCP ecosystem, using the FastMCP infrastructure.
Overview
The message.py file defines a tool called message_notify_dev, which allows sending messages to developers without requiring a response. It is ideal for progress notifications, receipt acknowledgments, task completion reports, or explanations of changes in approach.
Features
- Notification sending: Allows sending messages in Markdown format to developers.
- Unique identifier generation: Each message sent receives a unique ID based on UUID.
- Timestamp recording: Messages include a timestamp in UTC ISO8601 format.
- Structured format: Messages are structured in a dictionary with status and content information.
How it works
- The service is initialized with the name
messagesusingFastMCP. - The
message_notify_devfunction is registered as an MCP tool and can be called by other system components. - When called,
message_notify_devreceives a Markdown text, generates a unique ID, records the sending time, and returns a structured dictionary with the message information. - The server can be run directly from the command line using
stdiotransport.
Usage Example
from message.message import message_notify_dev
response = message_notify_dev("Process completed successfully!")
print(response)Response Structure
The message_notify_dev function returns a dictionary in the following format:
{
"type": "message_notify_dev",
"id": "notify_<uuid>",
"timestamp": "<UTC ISO8601 datetime>",
"content": {
"format": "markdown",
"body": "<markdown message>"
},
"success": true,
"delivered": true
}Running the Server
To run the service as an MCP server:
python message.pyRequirements
- Python 3.7+
- Dependencies:
mcp.server.fastmcpuuiddatetime
Author
Developed by Alex Fonseca.
