Skip to content
ATAI Today Brief
HomeNewsConceptsGuidesToolbox
AboutSubscribeUA
Subscribe

AI Today Brief

The daily AI-engineering brief. Built in public. EN · UA.

XTelegramLinkedInYouTubeRSS
NewsConceptsGuidesSubscribeAdvertiseAboutEditorial policyAI disclosurePrivacyTerms

© 2026 AI Today Brief. All rights reserved.

  1. Home/
  2. News/
  3. Agents & MCP/
  4. Build and Deploy a Lightweight Model Context Protocol Server on Edge Compute
Agents & MCP

Build and Deploy a Lightweight Model Context Protocol Server on Edge Compute

July 10, 2026· 4 min read
OKCurated by Oleksandr Kuzmenko, AI Product Engineer·Updated July 10, 2026·Sources cited on every story
AI-assisted · editor-reviewed·How we use AI
Build and Deploy a Lightweight Model Context Protocol Server on Edge Compute

Deploy a 167-line Python Model Context Protocol (MCP) server to Telnyx Edge Compute using only the standard library. The server exposes Telnyx APIs as native tools for Claude, Cursor, and other agentic systems without cold-starts.

Impact: Medium

Why it matters

It provides a blueprint to build production-grade, low-latency MCP servers running close to APIs without heavy frameworks like FastAPI or Express.

TL;DR

  • 01MCP tool discovery and execution are simple HTTP contracts reachable with standard library calls.
  • 02Deploying tool hosting closer to target APIs reduces round-trip network latency significantly.
  • 03Using ASGI directly avoids heavy external packages and decreases serverless function cold-starts.

Key facts

Code Volume
167 lines of Python
Dependencies
Standard library only (0 external packages)
Exposed MCP Tools
4 (SMS, Number Search, Inference, Number List)

ASGI-Based MCP Implementation

By bypassing heavy frameworks, this implementation defines a bare-bones ASGI handler handle(scope, receive, send) that intercepts HTTP requests directly. The contract requires handling two core MCP actions:

  • tools/list: Returns a JSON array of tool definitions outlining names, descriptions, and structural input schemas.
  • tools/call: Executes the tool matching the requested name, receiving arguments in either flat or nested formats.

Zero-Dependency Architecture

The backend code runs with zero dependencies beyond Python's standard library. The core tooling relies on urllib.request to communicate with underlying REST APIs and json to serialize payload responses. Environment variables securely inject secrets like TELNYX_API_KEY on boot, keeping them hidden from downstream agents.

Deployment Steps

To test the setup locally or deploy it to Telnyx Edge Compute, clone the official examples and configure your secrets:

git clone https://github.com/team-telnyx/telnyx-code-examples.git
cd telnyx-code-examples/edge-mcp-server-deploy-python
telnyx-edge secrets add TELNYX_API_KEY <your_key>

Try it in 2 minutes

async def handle(self, scope, receive, send):
    path = scope.get("path", "")
    method = scope.get("method", "")
    if path == "/mcp/tools/list" and method in ("GET", "POST"):
        await self._respond(send, 200, {"tools": TOOLS})

python

✓ When to use

  • When deploying low-latency AI agent tools that must run close to your telecom or database infrastructure.
  • When you want to avoid container overhead and cold starts using serverless edge runtimes.
  • When building lightweight MCP connectors without the footprint of FastAPI or Express.

✕ When NOT to use

  • When your tools require complex OAuth flows or third-party SDK dependencies not easily bundled.
  • If your environment lacks an ASGI-compliant web server or runner.

What to do today

  • →Clone the Telnyx MCP Python repository.
  • →Deploy the serverless function using the telnyx-edge CLI tool.
  • →Point your Claude Code or Cursor MCP configuration to the live edge URL.
#Claude Code#Cursor#FastAPI#Express

Sources

  • GitHub - Telnyx Edge MCP Server Python Example
  • Edge MCP Server Deploy Walkthrough
ShareShare on XShare on LinkedIn
← Previous storyOpen Science Desktop: A Model-Agnostic Open-Source Alternative to Claude ScienceNext story →Massive AI Bills Trigger Sudden Shift from Flat-Rate to Usage-Based LLM Economics

Related stories

  • Agents & MCPAI-Powered Job Application Framework Using Claude Code
  • Agents & MCPArchitectural Security for Agentic Systems: Guiding Identity, Delegation, and Audit Trails
  • Agents & MCPOpen Science Desktop: A Model-Agnostic Open-Source Alternative to Claude Science
  • Agents & MCPAnthropic Unveils Always-On Claude Cowork Mobile and Web Agents

Email digest

Get the morning AI brief

One email a day — the stories that matter for engineers, founders and tech leads. Human-edited, with links to primary sources.

  • ✓120+ sources scanned daily
  • ✓Edited by a human
  • ✓1 email per day
  • ✓EN + UA

By subscribing you agree to the privacy policy.