Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.28.0"
".": "5.28.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 921
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx%2Ftelnyx-139139a61ab836ff7de71d0c6111592d91006af4bb23ddd2c41ac65e07f3f554.yml
openapi_spec_hash: b17de900dc1a361c5e273136dade72a1
config_hash: f988dc81794e1f58a39055ee99dac184
config_hash: c107dfddc6890662b4d04b3c5793a4f3
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.28.1 (2026-02-13)

Full Changelog: [v5.28.0...v5.28.1](https://github.com/team-telnyx/telnyx-node/compare/v5.28.0...v5.28.1)

### Chores

* **internal:** improve layout of generated MCP server files ([75f4091](https://github.com/team-telnyx/telnyx-node/commit/75f4091d2670c4c70449c52fdb7bff25d8015c55))

## 5.28.0 (2026-02-13)

Full Changelog: [v5.27.0...v5.28.0](https://github.com/team-telnyx/telnyx-node/compare/v5.27.0...v5.28.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "telnyx",
"version": "5.28.0",
"version": "5.28.1",
"description": "Telnyx API SDK for global Voice, SMS, MMS, WhatsApp, Fax, Wireless IoT, SIP Trunking, and Call Control.",
"author": "Telnyx <support@telnyx.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "telnyx-mcp",
"version": "5.28.0",
"version": "5.28.1",
"description": "The official MCP Server for the Telnyx API",
"author": "Telnyx <support@telnyx.com>",
"types": "dist/index.d.ts",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/mcp-server/src/code-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { McpTool, Metadata, ToolCallResult, asErrorResult, asTextContentResult } from './types';
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { readEnv } from './server';
import { readEnv } from './util';
import { WorkerInput, WorkerOutput } from './code-tool-types';
import { SdkMethod } from './methods';
import { Telnyx } from 'telnyx';
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/docs-search-tool.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { Metadata, asTextContentResult } from './types';
import { readEnv } from './server';
import { readEnv } from './util';

import { Tool } from '@modelcontextprotocol/sdk/types.js';

Expand Down
5 changes: 3 additions & 2 deletions packages/mcp-server/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import { McpServer } from '@modelcontextprotocol/sdk/server/mcp';
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
import { ClientOptions } from 'telnyx';
import express from 'express';
import morgan from 'morgan';
import morganBody from 'morgan-body';
import { parseAuthHeaders } from './auth';
import { McpOptions } from './options';
import { ClientOptions, initMcpServer, newMcpServer } from './server';
import { parseAuthHeaders } from './headers';
import { initMcpServer, newMcpServer } from './server';

const newServer = async ({
clientOptions,
Expand Down
2 changes: 2 additions & 0 deletions packages/mcp-server/src/methods.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { McpOptions } from './options';

export type SdkMethod = {
Expand Down
2 changes: 2 additions & 0 deletions packages/mcp-server/src/options.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import qs from 'qs';
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
Expand Down
30 changes: 2 additions & 28 deletions packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import docsSearchTool from './docs-search-tool';
import { McpOptions } from './options';
import { blockedMethodsForCodeTool } from './methods';
import { HandlerFunction, McpTool } from './types';

export { McpOptions } from './options';
export { ClientOptions } from 'telnyx';
import { readEnv } from './util';

async function getInstructions() {
// This API key is optional; providing it allows the server to fetch instructions for unreleased versions.
Expand Down Expand Up @@ -58,7 +56,7 @@ export const newMcpServer = async () =>
new McpServer(
{
name: 'telnyx_api',
version: '5.28.0',
version: '5.28.1',
},
{
instructions: await getInstructions(),
Expand Down Expand Up @@ -169,27 +167,3 @@ export async function executeHandler(
) {
return await handler(client, args || {});
}

export const readEnv = (env: string): string | undefined => {
if (typeof (globalThis as any).process !== 'undefined') {
return (globalThis as any).process.env?.[env]?.trim();
} else if (typeof (globalThis as any).Deno !== 'undefined') {
return (globalThis as any).Deno.env?.get?.(env)?.trim();
}
return;
};

export const readEnvOrError = (env: string): string => {
let envValue = readEnv(env);
if (envValue === undefined) {
throw new Error(`Environment variable ${env} is not set`);
}
return envValue;
};

export const requireValue = <T>(value: T | undefined, description: string): T => {
if (value === undefined) {
throw new Error(`Missing required value: ${description}`);
}
return value;
};
25 changes: 25 additions & 0 deletions packages/mcp-server/src/util.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export const readEnv = (env: string): string | undefined => {
if (typeof (globalThis as any).process !== 'undefined') {
return (globalThis as any).process.env?.[env]?.trim();
} else if (typeof (globalThis as any).Deno !== 'undefined') {
return (globalThis as any).Deno.env?.get?.(env)?.trim();
}
return;
};

export const readEnvOrError = (env: string): string => {
let envValue = readEnv(env);
if (envValue === undefined) {
throw new Error(`Environment variable ${env} is not set`);
}
return envValue;
};

export const requireValue = <T>(value: T | undefined, description: string): T => {
if (value === undefined) {
throw new Error(`Missing required value: ${description}`);
}
return value;
};
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '5.28.0'; // x-release-please-version
export const VERSION = '5.28.1'; // x-release-please-version