home / mcp / mailscript mcp server
MCP Server generated by mcp.ag2.ai
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-mailscript": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "JSON_STRING_CONFIG_OR_EMPTY",
"SECURITY": "SECURITY_PARAMETERS_OR_EMPTY",
"CONFIG_PATH": "PATH_TO_CONFIG.json or empty to use CONFIG"
}
}
}
}You run an MCP (Model Context Protocol) server that exposes the mailscript OpenAPI integration for clients to connect, query, and perform actions through a standardized interface. This server helps you host and manage MCP connections locally or remotely, enabling consistent client interactions with the mailscript API surface.
Start the server in a Standard Input/Output (stdio) mode to interact with MCP clients directly from your development environment. Use the runtime as your entry point and configure access through environment variables when needed. The server accepts commands from an MCP client and exposes the mailscript API surface for standardized client interactions.
Prerequisites you need before installing and running the server are Python 3.9 or higher, and the ability to install Python dependencies with pip and uv.
# 1. Clone the repository
git clone <repository-url>
cd mcp-server
# 2. Install development dependencies
pip install -e ".[dev]"
# Alternatively, if you use uv to manage dependencies:
uv pip install --editable ".[dev]"3. Run the MCP server in stdio mode to start serving MCP requests.
python mcp_server/main.py stdio
```
Environment variables you can use to configure the server include:
- CONFIG_PATH: Path to a JSON configuration file (for example, mcp_server/mcp_config.json)
- CONFIG: A JSON string containing the configuration
- SECURITY: Environment variables for security parameters (for example, API keys)
Review the __main__ block in the server script to understand how these values are loaded and used.Configuration is controlled through environment variables or a JSON configuration file loaded by the server at startup. You can tailor the server behavior by supplying a configuration file path or a JSON string via the CONFIG environment variable. For security, you can provide API keys or other credentials using the SECURITY variables. The server supports different transport modes, with stdio being the default for direct CLI usage.
Building and publishing tooling are handled via Hatch. To build and publish the project locally, you can use the following commands. These steps are optional for running the server but useful when you contribute or package the server for distribution.
# Build the project
hatch build
# Publish the project (if you have publishing credentials configured)
hatch publish