home / mcp / twilio routes mcp server
MCP Server generated by mcp.ag2.ai
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-twilio---routes": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "JSON string containing the configuration",
"SECURITY": "Environment variables for security parameters (e.g., API keys)",
"CONFIG_PATH": "Path to JSON configuration file (e.g., mcp_server/mcp_config.json)"
}
}
}
}You run an MCP (Model Context Protocol) Server that provides a structured, scalable interface to a defined API spec. This enables clients to query the server for context and actions against the OpenAPI-described surface, with consistent transport and tooling to verify, lint, test, and run.
To use the MCP server, start it in the transport mode you prefer and connect your MCP client to the exposed endpoints. You can access the server through a remote MCP URL when you need an HTTP-based connection, or run a local stdio instance for development and testing against your local environment.
Once running, your MCP client can request context data and perform the supported actions defined by the OpenAPI surface. The server serves as a bridge between your client and the API surface, adhering to MCP conventions to ensure consistent behavior across different clients and transports.
Prerequisites: Python 3.9+
git clone <repository-url>
cd mcp-serverInstall dependencies (development scope) using pip in editable mode. You can also use the uv runner to install the package in editable mode.
pip install -e ".[dev]"
```
```sh
uv pip install --editable ".[dev]"Starting the MCP server in stdio mode is a straightforward development workflow. Use the following command to run the server in stdio mode.
python mcp_server/main.py stdioEnvironment variables that influence server configuration include the path to a JSON configuration, an inline JSON configuration, and security settings. You can set these as follows:
export CONFIG_PATH=mcp_server/mcp_config.json
export CONFIG='{"openapiUrl": "https://api.apis.guru/v2/specs/twilio.com/twilio_routes_v2/1.42.0/openapi.json"}'
export SECURITY='YOUR_SECURITY_SETTINGS'This MCP server exposes two explicit connection methods based on the information provided: an HTTP connection via a remote OpenAPI URL and a local stdio connection for development. Use the HTTP method when you want a remote server endpoint that clients can reach, and use the stdio method for local testing and integration in your development workflow.
Configure security parameters to control access to the MCP server. You can pass security-related settings through environment variables or a JSON configuration. Typical parameters may include API keys or tokens, depending on your deployment requirements.
If you encounter issues starting the server, verify the following: the Python version is 3.9 or newer, the dependencies are installed in editable dev mode, and the environment variables are correctly supplied. Check that the OpenAPI URL is accessible and that the server process starts without errors in stdio mode.
You’ll use development tooling to maintain quality and reliability during local development and CI workflows. Common tools include a linter and formatter, static type checks, and tests.