mcp-chat
by PipedreamHQ
Overview
A reference open-source AI chat application leveraging Pipedream's Model Context Protocol (MCP) to integrate with thousands of APIs and tools, supporting conversational AI, automatic tool discovery, and document creation/editing with real-time feedback.
Installation
pnpm devEnvironment Variables
- PIPEDREAM_CLIENT_ID
- PIPEDREAM_CLIENT_SECRET
- PIPEDREAM_PROJECT_ID
- PIPEDREAM_PROJECT_ENVIRONMENT
- AUTH_SECRET
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
- OPENAI_API_KEY
- EXA_API_KEY
- POSTGRES_URL
Security Notes
The application demonstrates good security practices including Auth.js for authentication (with Drizzle Adapter and password hashing), Drizzle ORM for database interactions (parameterized queries), Zod for file upload validation, and server-only enforcement for sensitive operations. Authorization checks are present in API routes to ensure user ownership of chats and documents. Datadog RUM is configured to mask user input by default. However, there are notable concerns: 1. Client-side Python code execution via Pyodide: LLM-generated code running in the browser introduces a significant risk. While prompts attempt to restrict network/file access, an imperfect sandbox or LLM output deviation could lead to client-side exploits. 2. Google OAuth `allowDangerousEmailAccountLinking: true`: This setting can lead to account hijacking if not accompanied by robust email verification by NextAuth, which may not be the default behavior of the Drizzle adapter. 3. Debug logging in production: The `/api/chat` endpoint logs `fullSession` details under a 'DEBUG' flag. If exposed, this could leak sensitive session data. 4. `ignoreBuildErrors: true` in `next.config.ts`: This can mask critical type errors that might introduce runtime vulnerabilities or unexpected behavior. 5. Reliance on MCP Server: The security and integrity of the external MCP server are critical; compromise of this service could impact the chat application's security.
Similar Servers
mcp-openapi-server
Exposes OpenAPI endpoints as Model Context Protocol (MCP) tools, enabling Large Language Models (LLMs) to discover and interact with REST APIs through a standardized protocol.
mcp-chat-client
A modern chat client that integrates with Model Context Protocol (MCP) servers to provide AI-powered conversations with access to various tools and resources.
dx-mcp-server
Empowers AI applications to interact with and query a user-provided Postgres database via the Model Context Protocol (MCP).
fastchat-mcp
A Python client for integrating Language Models with Model Context Protocol (MCP) servers, allowing natural language interaction with external tools, resources, and prompts.