Encephalon Lab
MCP-aware AI agent playground. Chat with Gemini-backed agents that have plug-and-play tool access — Alpaca for trading, GitHub for repos, Slack/Notion for work. SSE streaming, model picker, MCP server registry.
By Aditya Singh Khichi, Full Stack Engineer, New Delhi, India.
Tech stack: Next.js, TypeScript, LangChain, Gemini 2.5, MCP, Prisma.
agent platform: MCP-native
Problem
ChatGPT-style chat UIs don't naturally compose with the Model Context Protocol. You either hardcode tool integrations into the prompt scaffolding, or you spin up separate agents per tool. Neither matches how engineers actually want to use agents in practice: pick a model, pick which tools it has access to this session, then chat.
Approach
Built a chat platform where MCP servers (Alpaca trading, GitHub, Slack, Notion, others) are first-class registered entities. Frontend has an mcp-servers page that lets users browse and add servers. Chat backend uses LangChain over Gemini 2.5 Flash by default, with a model picker for switching. Two parallel chat endpoints — /api/chat (LangChain-orchestrated) and /api/chat/without-langchain (raw Gemini) — so the LangChain overhead can be measured directly. SSE streaming for character-by-character output. SIMULATE_RESPONSES env flag for offline iteration.
Outcome
An MCP-native agent playground where the tool selection is per-session, not per-deployment. The dual-pipeline pattern paid off in a non-obvious way: being able to A/B the same prompt against LangChain vs raw provider calls made the cost of every abstraction layer visible. Several latency assumptions I had about LangChain turned out to be wrong; some it added, some it didn't.
Live link: https://github.com/Raghav-45/encephalon-lab