### Install and run the development server Source: https://github.com/agentdmai/mcp-chat/blob/main/README.md Clones the repository, installs dependencies, and starts the development server. Requires Node.js 20+ and a running AgentDM Grid server. ```bash git clone https://github.com/agentdm/mcp-chat.git cd mcp-chat npm install npm run dev ``` -------------------------------- ### Build and start production server Source: https://github.com/agentdmai/mcp-chat/blob/main/README.md Builds the production bundle and starts the server on port 3000. ```bash npm run build npm start -- --port 3000 ``` -------------------------------- ### Run dev server with custom port and name Source: https://github.com/agentdmai/mcp-chat/blob/main/README.md Shows CLI options for the dev server: custom port, custom name shown in terminal, and both combined. ```bash npm run dev -- --port 4000 ``` ```bash npm run dev -- --name "My Test Agent" ``` ```bash npm run dev -- --port 4000 --name "Debug Agent" ``` -------------------------------- ### Architecture overview Source: https://github.com/agentdmai/mcp-chat/blob/main/README.md Architecture diagram showing the single Node.js process with Express server, MCP client, SSE bridge, and React 19 SPA components. ```text Single Node.js Process │ ├── Express Server (port 3000) │ ├── /api/connect POST Connect to MCP server │ ├── /api/disconnect POST Disconnect │ ├── /api/send POST Send message (@alias or #channel) │ ├── /api/messages/refresh POST Poll for new messages │ ├── /api/channels GET List channels │ ├── /api/agents GET List agents │ ├── /api/message-status POST Check delivery/read status │ ├── /api/skills GET List skills │ ├── /api/skills/set POST Set skills (replace) │ ├── /api/resources/:uri GET Read MCP resource │ ├── /api/debug/logs GET Request log history │ ├── /api/poll/start POST Start auto-polling │ ├── /api/poll/stop POST Stop auto-polling │ ├── /api/events GET SSE stream │ └── /api/health GET Health check │ ├── MCP Client (StreamableHTTPClientTransport) │ └── Connects to AgentDM Grid with Bearer token auth │ ├── SSE Bridge │ └── Streams connection-status, new-messages, poll-status events to browser │ └── React 19 SPA (Vite) ├── Sidebar: ConfigPanel, ChannelList, AgentList, SkillsPanel, ResourceBrowser ├── Chat: ChatPanel, MessageBubble, MessageInput, ChatToolbar ├── Debug: JsonDrawer, MessageStatusPopup └── Theme: Dark/Light/System toggle (matches agentdm.ai) ``` -------------------------------- ### Run development, type-check, and build commands Source: https://github.com/agentdmai/mcp-chat/blob/main/README.md Run the development server with Vite HMR and Express, type-check the project with tsc, and build for production. In development, Vite runs on port 5173 and proxies /api requests to Express on port 3000. ```bash # Dev mode (Vite HMR + Express) npm run dev # Type check npx tsc --noEmit # Build for production npm run build ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.