A minimal TypeScript CLI agent that connects to the Junction Engine MCP server over Streamable HTTP and uses an OpenAI model for tool selection + answer synthesis.
bun- Engine running locally with MCP endpoint at
http://localhost:3000/mcp
cp .env.example .env
bun installIn .env, set:
MCP_BASE_URL=http://localhost:3000/mcpOPENAI_API_KEY=...OPENAI_MODEL=gpt-5-mini(or your preferred model)
bun run list-toolsbun run dev -- --call search_courses '{"department":"COS","term":1262}'bun run chat- The client maintains a single
mcp-session-idfor the lifetime of the process. - Tool calls are allowlisted to the MVP tool surface defined in the project
plan.md.