Telnyx MCP connector
OAuth 2.1/DCRCommunicationAITelnyx is a communications platform for voice, messaging, and AI. This MCP connector lets AI agents manage phone numbers, send SMS and MMS, place and...
Telnyx MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'telnyxmcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Telnyx MCP:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'telnyxmcp_list_api_endpoints',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "telnyxmcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Telnyx MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="telnyxmcp_list_api_endpoints",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Get api endpoint schema — Get the JSON schema for a named Telnyx API endpoint
- Endpoint invoke api — Invoke any Telnyx API endpoint by name
- List api endpoints — List or search all endpoints in the Telnyx API
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
telnyxmcp_get_api_endpoint_schema#Get the JSON schema for a named Telnyx API endpoint. Call this after finding an endpoint with list_api_endpoints; the returned schema tells you which arguments invoke_api_endpoint expects.1 param
Get the JSON schema for a named Telnyx API endpoint. Call this after finding an endpoint with list_api_endpoints; the returned schema tells you which arguments invoke_api_endpoint expects.
endpointstringrequiredThe name of the endpoint to get the schema for, as returned by list_api_endpoints.telnyxmcp_invoke_api_endpoint#Invoke any Telnyx API endpoint by name. This is a generic executor that dispatches to the underlying Telnyx REST API: first find the endpoint with list_api_endpoints, fetch its argument schema with get_api_endpoint_schema, then call this tool with the endpoint name and matching args. Can perform writes (create, update, delete), so use with care.2 params
Invoke any Telnyx API endpoint by name. This is a generic executor that dispatches to the underlying Telnyx REST API: first find the endpoint with list_api_endpoints, fetch its argument schema with get_api_endpoint_schema, then call this tool with the endpoint name and matching args. Can perform writes (create, update, delete), so use with care.
argsobjectrequiredArguments for the endpoint, matching the schema returned by get_api_endpoint_schema. Pass as a JSON object of parameter names to values.endpoint_namestringrequiredThe name of the Telnyx API endpoint to invoke, as returned by list_api_endpoints.telnyxmcp_list_api_endpoints#List or search all endpoints in the Telnyx API. Use this to discover available endpoints by name, resource, operation, or tag before fetching an endpoint's schema with get_api_endpoint_schema and invoking it with invoke_api_endpoint.1 param
List or search all endpoints in the Telnyx API. Use this to discover available endpoints by name, resource, operation, or tag before fetching an endpoint's schema with get_api_endpoint_schema and invoking it with invoke_api_endpoint.
search_querystringoptionalOptional search query to filter endpoints. Provide a partial name, resource, operation, or tag (e.g. 'messages', 'phone numbers', 'create call').