This repo contains examples to highlight how you can build an AI chat app using Pipedream's MCP server.
Check out the chat app in production at: chat.pipedream.com
Most traditional MCP implementations provide only a fixed set of tools. Pipedream's MCP server offers the ability to identify and load tools dynamically, which means tools can either be pre-defined or discovered and configured on-demand, based on the user's query.
This type of tool discovery is defined in the MCP spec, but most MCP clients don't support yet provide support for it.
This repo contains examples of how you, as the developer of an MCP client, can use Pipedream's app-level or dynamic MCP server by manually reloading the list of tools on each turn.
This repo includes three examples showing different approaches to integrating with Pipedream's dynamic MCP server:
- The Chat App Example is a full-featured web application demonstrating MCP integration in a real-world chat interface
- The AI SDK Example uses Vercel's AI SDK with automatic tool handling
- The OpenAI SDK Example uses OpenAI SDK directly with manual tool conversion for full control
Install dependencies:
pnpm install
To set up your environment, you'll need:
- A Pipedream account
- A Pipedream project. Accounts connected via MCP will be stored here.
- Pipedream OAuth credentials
- An OpenAI API key
Copy the example environment file and add your credentials:
cp .env.example .env
Learn more about environments in Pipedream Connect.
You can run the examples using the following commands from the root directory:
The chat app is a full-featured Next.js web application that demonstrates MCP integration in a production-ready environment:
pnpm chat
The chat app includes:
- MCP integrations: Connect to thousands of APIs through Pipedream's MCP server with built-in auth
- Flexible LLM and framework support: Works with any LLM provider or framework
- Tool discovery: Execute tool calls across different APIs via chat
For development, you can disable user sign-in and chat storage by setting these env vars:
# In .env
DISABLE_AUTH=true
DISABLE_PERSISTENCE=true
EXTERNAL_USER_ID=your-dev-user-id
pnpm ai-sdk -u <external-user-id> "<prompt>"
pnpm openai-sdk -u <external-user-id> "<prompt>"
For example:
pnpm ai-sdk -u <uuid> "Send a funny joke to the #random channel in Slack"
pnpm openai-sdk -u <uuid> "Send a funny joke to the #random channel in Slack"