OpenAI Agents SDK — TypeScript talks to Agent Update over MCP. The server is https://api.tryagentupdate.com/v1/mcp, the transport is Streamable HTTP, and the credential is one header.
Setup
// npm i @openai/agents
import { Agent, run, MCPServerStreamableHttp } from '@openai/agents';
const agentUpdate = new MCPServerStreamableHttp({
url: 'https://api.tryagentupdate.com/v1/mcp',
name: 'Agent Update',
cacheToolsList: true,
timeout: 30_000, // MILLISECONDS
clientSessionTimeoutSeconds: 30,
requestInit: {
headers: { Authorization: `Bearer ${process.env.AGENT_UPDATE_TOKEN}` },
},
});
const agent = new Agent({ name: 'Assistant', mcpServers: [agentUpdate],
instructions: 'Use send_message, ask_question, check_replies.' });
try {
await agentUpdate.connect();
console.log((await run(agent, 'Tell the user the deploy finished.')).finalOutput);
} finally {
await agentUpdate.close();
}Before you file a bug
**Headers go in requestInit.headers.** MCPServerStreamableHttpOptions has no headers field. A literal headers: {} is a type error, and if you spread one in from a variable it is **silently dropped**, which is a 401. This diverges from the Python SDK. timeout is milliseconds here, seconds in Python. There is no context manager: connect() before run(), close() in a finally, or the process hangs. Don't use MCPServerSSE.
Check it worked
Ask the agent to text you. A 401 means the token is wrong, or the word Bearer is in there twice. No tool at all means the transport string is wrong. Both are covered in troubleshooting.
Next
The five tools and their arguments are on the MCP page. The same tools over plain HTTP are on the REST page. Every other tool is on the docs index.