How zaidmukaddam/scira-mcp-chat works
Project type and purpose
• This is a full-stack, open-source AI chatbot application built with Next.js (App Router) and the Vercel AI SDK.
• It integrates with external Model Context Protocol (MCP) servers (via SSE or stdio) to expand AI tool capabilities, while persisting chat history in a SQL database using Drizzle ORM.
File structure
• Top-level “app” directory: Next.js App Router pages, layouts, global styles, and API endpoints under app/api/chat and app/api/chats.
• “components” and “components/ui”: React UI building blocks (shadcn/ui + Tailwind CSS) for chat, sidebar, model picker, theme, etc.
• “lib”: shared utilities, React contexts, custom hooks (chat-store, local storage, scroll, etc.), database initialization (lib/db), and user-id generation.
• “ai/providers.ts”: abstraction over AI SDK providers and MCP transports.
• “drizzle” + drizzle.config.ts: database migrations and schema (SQL files and snapshot metadata).
• Config files: next.config.ts, tsconfig.json, postcss.config.mjs, railpack.json, eslint.config.mjs, package.json.
README for insights
• Confirms use of Next.js, Vercel AI SDK, MCP servers (SSE and stdio), Drizzle ORM, shadcn/ui + Tailwind.
• Describes runtime flows (adding MCP servers, streaming responses).
Final recommendations
• Both synchronous API calls and streaming data flows.
• Customization points (adding MCP servers, switching transports).
• Iterate with developers: update as new features or transports are added.