Discovering apps
Search for available apps
import { PipedreamClient } from "@pipedream/sdk";
// Initialize the Pipedream SDK client
const client = new PipedreamClient({
projectEnvironment: PIPEDREAM_ENVIRONMENT,
clientId: PIPEDREAM_CLIENT_ID,
clientSecret: PIPEDREAM_CLIENT_SECRET,
projectId: PIPEDREAM_PROJECT_ID
});
// Search for Google Sheets apps, sorted by featured weight
const apps = await client.apps.list({
q: "google sheets",
sortKey: "featured_weight",
sortDirection: "desc"
});
Check out the full API reference for listing apps
Automatic app discovery
If using Pipedream MCP, you can enable Pipedream to automatically identify relevant apps from a given prompt.Check out how this works at chat.pipedream.com
Enabling app discovery
Add theappDiscovery=true parameter to your MCP server requests:
| Header | Query Param | Value | Required? |
|---|---|---|---|
x-pd-app-discovery | appDiscovery | true | No |
App discovery currently requires full-config mode to be enabled
How it works
When app discovery is enabled:- Pipedream analyzes the incoming prompt to identify which apps are most relevant
- The initial tool call responses with an array of relevant apps
- When the client reload its available tools, it will now have tools for the relevant apps
Examples
Basic setup with app discovery
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { PipedreamClient } from "@pipedream/sdk";
// Get access token
const client = new PipedreamClient({
projectEnvironment: PIPEDREAM_ENVIRONMENT,
clientId: PIPEDREAM_CLIENT_ID,
clientSecret: PIPEDREAM_CLIENT_SECRET,
projectId: PIPEDREAM_PROJECT_ID
});
const accessToken = await client.rawAccessToken;
// Configure MCP transport with app discovery enabled
const transport = new StreamableHTTPClientTransport(new URL(serverUrl), {
requestInit: {
headers: {
"Authorization": `Bearer ${accessToken}`,
"x-pd-project-id": PIPEDREAM_PROJECT_ID,
"x-pd-environment": PIPEDREAM_ENVIRONMENT,
"x-pd-external-user-id": EXTERNAL_USER_ID,
"x-pd-app-discovery": "true",
"x-pd-tool-mode": "full-config"
}
}
});
How app discovery works with different prompts
App discovery automatically detects which apps are referenced in user prompts:| User Input | Apps Detected |
|---|---|
| "Send a message to the #general channel in Slack" | slack |
| "Create a task in Notion and send a notification to Slack" | notion, slack |
| "Add this email to my spreadsheet" | google_sheets, microsoft_excel, airtable_oauth, zoho_sheet, smartsheet |
| "Schedule a meeting and update my CRM" | google_calendar, zoho_crm, hubspot |
Limitations
- App discovery currently requires
full-configmode to be enabled - Detection accuracy depends heavily on the clarity of the prompt