Mind Spark is an open-source AI collaboration workspace. It brings chat, shareable agents, visual workflows, and MCP-powered tools together so teams can collaborate with large language models in real time.
- Multi-provider chat with OpenAI, Anthropic, Google, Groq, xAI, Ollama, and more
- Multimodal prompts with inline file attachments (images, PDFs, and audio) routed through OpenRouter
- Team workspaces for inviting members, sharing MCP servers, and tracking usage analytics
- Drag-and-drop workflows that mix LLM reasoning with MCP tool execution
- Custom agents that package instructions, toolkits, and presets for specific tasks
- Voice-ready assistant powered by the OpenAI Realtime API
- Self-host friendly with Docker, PostgreSQL, and straightforward environment configuration
git clone https://github.com/dwickyfp/mindspark-ai.git
cd mindspark-ai
pnpm install- Duplicate
.env.exampleto.env.localand add yourPOSTGRES_URLplus at least one LLM provider key (e.g.,OPENAI_API_KEY,ANTHROPIC_API_KEY,GOOGLE_GENERATIVE_AI_API_KEY). - Start PostgreSQL locally (or edit the connection string to point to your own instance).
- Launch Mind Spark:
pnpm build:local && pnpm start # production-style run # or pnpm dev # hot reload for development
- Visit http://localhost:3000 and complete the onboarding flow.
To run everything in containers:
pnpm docker-compose:upThis command starts PostgreSQL, Redis, and the Mind Spark app using docker/compose.yml.
Mind Spark is built with Next.js (App Router) and the Vercel AI SDK. Core components include:
| Layer | Description |
|---|---|
| UI | React components with Tailwind, Radix, and SWR. |
| API | Next.js route handlers for chat, agents, workflows, MCP, and organizations. |
| AI | Model registry, MCP client manager, workflow executor, and tool adapters. |
| Data | Drizzle ORM with PostgreSQL for chats, agents, workflows, and usage logs. |
| Optional | Redis for multi-instance synchronization. |
Source layout highlights:
src/app– application routes, API handlers, authentication, and layout scaffoldingsrc/components– dashboards, editors, dialogs, and reusable UI elementssrc/lib/ai– model definitions, MCP manager, workflow engine, and promptssrc/lib/db– Drizzle schema, migrations, and repository layersrc/types– shared TypeScript contracts between server and client
- Visual workflows that expose complex tool chains as
@workflow_namecommands inside chat. - Browser automation by connecting third-party MCP servers such as Microsoft’s Playwright connector.
- Task-specific agents that bundle instructions, context, and tool permissions for your team.
- Voice-enabled assistants that converse while orchestrating MCP tool calls in the background.
- Tool presets and mentions so operators can toggle between minimal and full capability sets.
- Organization analytics that aggregate token usage, tool favorites, and member activity.
| Variable | Purpose |
|---|---|
POSTGRES_URL |
PostgreSQL connection string (required). |
BETTER_AUTH_SECRET |
Secret used by Better Auth (required). |
OPENAI_API_KEY, ANTHROPIC_API_KEY, etc. |
Enable individual model providers. |
NOT_ALLOW_ADD_MCP_SERVERS |
Set to 1 to restrict MCP server management. |
DISABLE_SIGN_UP |
Set to 1 to prevent self-service account creation. |
See .env.example for the complete list.
docs/tips-guides/mcp-server-setup-and-tool-testing.md– add and validate MCP serversdocs/tips-guides/docker.md– containerized deployment walkthroughdocs/tips-guides/vercel.md– deploy Mind Spark to Verceldocs/tips-guides/system-prompts-and-customization.md– tune prompts, preferences, and workflow instructionsdocs/tips-guides/oauth.md– enable Google, GitHub, and Microsoft sign-indocs/tips-guides/e2e-testing-guide.md– run end-to-end tests with Playwright
- File upload and multimodal responses
- Collaborative document editing and shared canvases
- Retrieval-augmented generation with your own knowledge base
- WebContainer integration for browser-contained compute
Have an idea? Open an issue or share it in the community Discord.
We welcome contributions of all sizes. Before you start:
- Review
CONTRIBUTING.mdfor coding and workflow guidelines. - Create an issue to discuss significant features or architectural changes.
- Run
pnpm lint,pnpm check-types, andpnpm testbefore submitting a PR.
- Star the repository to follow releases and new features
- Share your workflows, MCP integrations, and automation stories!
© 2025 Mind Spark. Built with ❤️ by the community.