Back to Home
HuangJingwang icon

ChatBot-MCP

by HuangJingwang

Overview

A frontend AI chatbot application supporting multiple AI models and tool integration via the Model Context Protocol (MCP).

Installation

Run Command
npm run dev

Environment 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

Stats

Interest Score0
Security Score4
Cost ClassMedium
Avg Tokens2500
Stars0
Forks0
Last Update2025-11-27

Tags

AIChatbotVue3ViteMulti-modelMCPTooling