TypeScript/React chat UI for interacting with agents and MCP tools via WebSocket. This project is not just a Chat UI — it is a boilerplate for building Model Context Protocol (MCP) servers and easily testing their capabilities by chatting with them. The architecture enables rapid development, extension, and interactive experimentation with MCP agents and tools.
mcpdemo4.mp4
Agents are run using the OpenAI Agents SDK for seamless integration with MCP. The current implementation uses Gemini LLM for agent responses, but you can easily switch to OpenAI LLM by updating the agent configuration. This flexibility allows you to experiment with different large language models as needed.
- Chat with AI agents and tools in real time
- Extensible tool system (register new tools by asking Copilot)
- During chat, users can see all tool calls with their arguments and responses for debugging purposes
- Chart rendering and data visualization
- Coding AI Canvas implementation, allowing users to create designs and interactive visualizations by providing a natural language description (like Gemini Canvas). 'f.e. a user could say "visualize inserting sorting algorithm" and the system would generate and show a interactive visual representation of the algorithm.'
- Google authentication integration
- Hot reload and fast development with Vite
- Node.js (v18+ recommended)
- npm
- Copy
.env.template
to.env
:cp .env.template .env
- Set your
GEMINI_API_KEY
in the.env
file to enable Gemini LLM features. - (Optional) Set
GOOGLE_CLIENT_ID
in.env
to enable Google authentication for the chat UI.
# In project root
npm install
cd client
npm install
# or
npm run install_all
# In project root
npm run dev
open http://localhost:5173/
# In project root
npm run start
open http://localhost:3000/
# In project root
npm run inspect
You can add new server-side tools by simply asking Copilot:
register new tool with name
my_tool_name
, input parametersparam1: string
,param2: number
, output fieldsresult: string
Copilot will generate the file and code for you. See .github/copilot-instructions.md
for full details.
You can add new external MCP servers by editing the mcp.json
file in the project root. List your server configuration in this file to make them available for selection in the chat UI.
client/
— React UI, organized by feature (chat, chart, common, ui)src/server/
— WebSocket server, agent/tool orchestrationsrc/tools/
— MCP tools (auto-registered)src/agents/
— Agent logic.github/copilot-instructions.md
— AI agent instructions and conventions
This project demonstrates a flexible, extensible chat UI for agent/tool workflows, and serves as a boilerplate for building and interactively testing MCP servers and tools. Developer productivity is powered by Copilot and clear conventions for rapid extension.