ChatBot-MCP
by HuangJingwang
Overview
A frontend AI chatbot application supporting multiple AI models and tool integration via the Model Context Protocol (MCP).
Installation
npm run devEnvironment Variables
- VITE_AI_PROVIDER
- VITE_OPENAI_API_KEY
- VITE_OPENAI_BASE_URL
- VITE_OPENAI_MODEL
- VITE_CLAUDE_API_KEY
- VITE_CLAUDE_BASE_URL
- VITE_CLAUDE_MODEL
- VITE_CUSTOM_API_URL
- VITE_CUSTOM_API_KEY
- VITE_MCP_SERVER_URL
- VITE_MCP_API_KEY
- VITE_MCP_COOKIE_ID
- VITE_MCP_ENABLE_TOOLS
- VITE_MCP_ENABLE_RESOURCES
- VITE_ENABLE_MCP_TOOLS
- VITE_MEMORY_SERVER_URL
- VITE_ENABLE_SERVER_MEMORY
Security Notes
The `src/services/authService.js` file contains a hardcoded default `cookieId` ('65921143afdf8e07dbf16189') which is used if `localStorage` doesn't provide one. This ID is crucial for authentication with MCP and server memory services, and hardcoding a default authentication identifier is a significant security vulnerability, potentially allowing unauthorized access or session hijacking if not properly managed or if the backend accepts this default as valid for multiple users. Additionally, while `JSON.parse` itself is not inherently dangerous, its extensive use on `toolCall.function.arguments` (from AI responses) and extracted user message values (`extractValueFromMessage`) requires rigorous server-side validation on the MCP service to prevent malformed JSON inputs from causing unexpected behavior or denial of service.
Similar Servers
mcp-chat
An AI chat application that leverages Pipedream's Model Context Protocol (MCP) to integrate with thousands of APIs and perform tool-based actions, serving as a reference for building powerful AI chat solutions.
mcp-toolkit
Develop a Model Context Protocol (MCP) server directly within a Nuxt application, allowing AI agents to interact with application functionalities, access data, and utilize predefined prompts.
tiny-robot
A Vue 3 component library and AI interaction kit for building AI-powered frontend applications, providing UI components and a unified API interface to interact with various large AI models.
MCP-buddy
A local desktop or web application to manage and interact with multiple MCP (Model Context Protocol) servers, offering optional AI orchestration and enhancement for responses.