今日已更新 205 条资讯 | 累计 23788 条内容
关于我们

Deploy an MCP Server to Edge Compute: Expose Telnyx APIs as Tools for AI Agents

Harpreet Singh Seehra 2026年07月10日 20:23 1 次阅读 来源:Dev.to

Deploy an MCP Server to Edge Compute: Expose Telnyx APIs as Tools for AI Agents The Model Context Protocol (MCP) has become the standard way for AI agents to call external tools. Claude, Cursor, and a growing ecosystem of agent frameworks speak MCP natively, they discover tools via a tools/list endpoint and call them via tools/call . Any HTTP service that implements that contract becomes a tool provider the agent can use. This walkthrough deploys a working MCP server to Telnyx Edge Compute. The whole server is 167 lines of Python in function/func.py , uses Python's standard library for the HTTP layer, and exposes four Telnyx APIs ( send_sms , search_numbers , run_inference , list_phone_numbers ) as MCP tools. There is no Express, no FastAPI, no SDK, just urllib , json , os , and an ASGI handler. The canonical code example lives in the Telnyx code examples repo: https://github.com/team-telnyx/telnyx-code-examples/tree/main/edge-mcp-server-deploy-python What This Example Builds A single ASGI function deployed to Telnyx Edge Compute that exposes four MCP tools: Tool Telnyx API Purpose send_sms POST /v2/messages Send an SMS message to an E.164 number search_numbers GET /v2/available_phone_numbers Search available phone numbers by country and area code run_inference POST /v2/ai/chat/completions Run LLM inference via Telnyx AI (OpenAI-compatible) list_phone_numbers GET /v2/phone_numbers List phone numbers on the account The function exposes four HTTP endpoints: Method Path Purpose GET , POST /mcp/tools/list Return the tool catalog POST /mcp/tools/call Execute a tool by name with arguments GET /health Health check (tool count, API key presence) GET / Service info (name, tool list, endpoint paths) Once deployed, an AI agent that supports MCP can be pointed at the deployed URL and immediately call Telnyx APIs as part of its reasoning loop. Why Edge Compute Edge Compute runs serverless functions co-located with the Telnyx private network, the same network that handles voice,

本文内容来源于互联网,版权归原作者所有
查看原文