Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 1, 2026

Adds a standalone TypeScript chatbot project based on PR #1348 to the typescript-sdk, demonstrating multi-server MCP connections with LLM integration.

Structure

simple-chatbot/
├── src/simpleChatbot.ts          # Multi-server chatbot with tool discovery
├── test/simpleChatbot.test.ts    # Integration tests (10 passing)
├── package.json                  # build, test, test:watch scripts
├── vitest.config.ts
├── tsconfig.json
├── servers_config.json           # MCP server configuration
└── README.md

Key Adaptations

  • SDK imports: Updated from split packages (@modelcontextprotocol/client, @modelcontextprotocol/core, @modelcontextprotocol/server) to unified @modelcontextprotocol/sdk with subpath exports
  • Module resolution: Changed tsconfig from "node" to "bundler" for proper SDK import handling
  • Test imports: Using McpServer from sdk/server/mcp.js instead of base Server class

Features

  • Connects to multiple MCP servers via StdioClientTransport
  • Discovers and executes tools across all connected servers
  • Integrates with OpenAI-compatible LLM APIs (OpenAI, Groq, etc.)
  • Maintains conversation state and handles tool execution flow

Usage

cd simple-chatbot
npm install && npm run build
export LLM_API_KEY=your_key
npm start
Original prompt

This repo is a monorepo for multiple different ai projects. The first project i want to add is basically the same example that i created a pr for here modelcontextprotocol/typescript-sdk#1348. But i want it as a standalone example, ie a folder called in this repo with the simpleChatbot.ts and its corresponding integration test. it should have a package.json file with scripts such as build, test, test:watch. Just like in the example i want to use vitest.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 1, 2026 18:41
Co-authored-by: vippelina <6304004+vippelina@users.noreply.github.com>
Co-authored-by: vippelina <6304004+vippelina@users.noreply.github.com>
Copilot AI changed the title [WIP] Add standalone simple chatbot example with integration tests Add standalone simple-chatbot project to monorepo Jan 1, 2026
Copilot AI requested a review from vippelina January 1, 2026 18:45
@vippelina vippelina marked this pull request as ready for review January 1, 2026 19:52
@vippelina vippelina merged commit 8af68b1 into main Jan 1, 2026
@vippelina vippelina deleted the copilot/add-standalone-chatbot-example branch January 1, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants