Discover and configure available MCP servers programmatically, with automatic app extraction from prompts.

Overview

Pipedream provides + APIs as MCP servers. Each server corresponds to an app integration (like Notion, Gmail, or Slack) and has its own specific set of tools. This page covers how to discover available apps and enable automatic app discovery from prompts.

Discovering available MCP servers

List all available apps

import { createBackendClient } from "@pipedream/sdk/server";
 
// Initialize the Pipedream SDK client
const pd = createBackendClient({
  environment: PIPEDREAM_ENVIRONMENT,
  credentials: {
    clientId: PIPEDREAM_CLIENT_ID,
    clientSecret: PIPEDREAM_CLIENT_SECRET,
  },
  projectId: PIPEDREAM_PROJECT_ID
});
 
// Get all available apps (paginated)
const apps = await pd.getApps();
 
// Each app has these key properties:
// - name_slug: Used in the MCP server URL (e.g., "notion", "gmail", "slack")
// - name: Display name (e.g., "Notion", "Gmail", "Slack")

Automatic app discovery

Enable Pipedream to automatically extract relevant apps from a given prompt using the appDiscovery parameter.

Try this out for yourself at chat.pipedream.com

App discovery currently requires full-config mode to be enabled.

Enabling app discovery

Add the appDiscovery=true parameter to your MCP server requests:

HeaderQuery ParamValueRequired?
x-pd-app-discoveryappDiscoverytrueNo

How it works

When app discovery is enabled:

  1. Pipedream analyzes the incoming prompt to identify which apps are most relevant
  2. The initial tool call responses with an array of relevant apps
  3. 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 { createBackendClient } from "@pipedream/sdk/server";

// Get access token
const pd = createBackendClient({
  environment: PIPEDREAM_ENVIRONMENT,
  credentials: {
    clientId: PIPEDREAM_CLIENT_ID,
    clientSecret: PIPEDREAM_CLIENT_SECRET,
  },
  projectId: PIPEDREAM_PROJECT_ID
});

const accessToken = await pd.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 InputApps 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-config mode to be enabled
  • Detection accuracy depends heavily on the clarity of the prompt