Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(mcp): hide LinkedIn from the connector catalog (#9163)

Chaitanya Agarwal4e3a4065f84d
diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts
index e82c9087bc..22ab28616d 100644
--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts
+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts
@@ -1123,7 +1123,7 @@ export type SpelledColumnType = string;
export type DiscoveryRequest =
| {
/**
- * App name, e.g. "LinkedIn" or "Linear", not a task description.
+ * App name, e.g. "Notion" or "Linear", not a task description.
*/
query: string;
operation: 'search';
diff --git a/crates/pipedream_mcp/AGENTS.md b/crates/pipedream_mcp/AGENTS.md
index e6a8e4002a..1114a1bd59 100644
--- a/crates/pipedream_mcp/AGENTS.md
+++ b/crates/pipedream_mcp/AGENTS.md
@@ -14,7 +14,8 @@ AI loop calls their tools through Pipedream's remote MCP server.
- `src/outbound/api.rs`: the Pipedream HTTP API client, including the
Connect API proxy (`ConnectedAppProxy`) that calls an app's own REST API
with the account's credentials; catalog entries preserve Pipedream category
- labels for clients to group without a local taxonomy.
+ labels for clients to group without a local taxonomy. `HIDDEN_APP_SLUGS`
+ are never offered.
- `src/outbound/pg_connection_repo.rs`: the `pipedream_mcp_connections` table,
and the `mcp_overlays` table (`ConnectorOverlays`): catalog apps that connect
through their own MCP server on the native stack instead of Pipedream.
diff --git a/crates/pipedream_mcp/src/domain/ports.rs b/crates/pipedream_mcp/src/domain/ports.rs
index 7cb2f92e97..5cf1861480 100644
--- a/crates/pipedream_mcp/src/domain/ports.rs
+++ b/crates/pipedream_mcp/src/domain/ports.rs
@@ -147,7 +147,7 @@ pub trait ConnectorDirectory: Send + Sync + 'static {
/// the opaque pagination cursor from a previous page. Implementations
/// return entries most-popular-first, and only apps that can actually be
/// connected and used (i.e. apps with an auth flow and at least one
- /// action to expose as a tool).
+ /// action to expose as a tool) and that the catalog doesn't hide.
fn search(
&self,
search: Option<&str>,
@@ -158,8 +158,9 @@ pub trait ConnectorDirectory: Send + Sync + 'static {
/// Look up one app by its name slug.
///
/// `Ok(None)` when Pipedream has no connectable app under that exact slug:
- /// unknown, or an app with no auth flow (nothing to connect). A lookup
- /// that cannot be completed is an error, not a miss.
+ /// unknown, an app with no auth flow (nothing to connect), or one the
+ /// catalog hides. A lookup that cannot be completed is an error, not a
+ /// miss.
fn retrieve(
&self,
app_slug: &str,
diff --git a/crates/pipedream_mcp/src/domain/service/discovery.rs b/crates/pipedream_mcp/src/domain/service/discovery.rs
index 21d2053e1d..1844fb0ec9 100644
--- a/crates/pipedream_mcp/src/domain/service/discovery.rs
+++ b/crates/pipedream_mcp/src/domain/service/discovery.rs
@@ -22,7 +22,7 @@ const MAX_TOOLS: usize = 100;
pub enum DiscoveryRequest {
/// Find connectable apps by name.
Search {
- /// App name, e.g. "LinkedIn" or "Linear", not a task description.
+ /// App name, e.g. "Notion" or "Linear", not a task description.
query: String,
},
/// Verify capabilities and connection status for one catalog app.
diff --git a/crates/pipedream_mcp/src/outbound/api.rs b/crates/pipedream_mcp/src/outbound/api.rs
index d720b9f87c..fd824839b3 100644
--- a/crates/pipedream_mcp/src/outbound/api.rs
+++ b/crates/pipedream_mcp/src/outbound/api.rs
@@ -349,15 +349,7 @@ impl ConnectorDirectory for PipedreamClient {
let entries = body
.data
.into_iter()
- // Apps without an auth flow have nothing to connect.
- .filter(|app| app.auth_type.as_deref() != Some("none"))
- .map(|app| CatalogEntry {
- categories: app.categories,
- app_slug: app.name_slug,
- display_name: app.name,
- description: app.description.filter(|d| !d.is_empty()),
- icon_url: Some(app.img_src).filter(|u| u.starts_with("https://")),
- })
+ .filter_map(offered_catalog_entry)
.collect();
Ok(CatalogPage {
@@ -513,10 +505,24 @@ fn is_app_slug(slug: &str) -> bool {
.all(|ch| ch.is_ascii_lowercase() || ch.is_ascii_digit() || ch == '-' || ch == '_')
}
-/// An app the catalog would offer to connect: the slug we asked for, with an
-/// auth flow. Apps with `auth_type: none` have nothing to connect.
+/// Apps the catalog never offers. `linkedin` can only post and look up
+/// profiles by ID, not search people or read a feed as users expect.
+const HIDDEN_APP_SLUGS: &[&str] = &["linkedin"];
+
+/// The app the catalog would offer under `requested_slug`, if that is the app.
fn connectable_catalog_entry(requested_slug: &str, app: AppResponse) -> Option<CatalogEntry> {
- if app.auth_type.as_deref() == Some("none") || app.name_slug != requested_slug {
+ if app.name_slug != requested_slug {
+ return None;
+ }
+ offered_catalog_entry(app)
+}
+
+/// An app the catalog offers to connect: one with an auth flow that isn't
+/// hidden. Apps with `auth_type: none` have nothing to connect.
+fn offered_catalog_entry(app: AppResponse) -> Option<CatalogEntry> {
+ if app.auth_type.as_deref() == Some("none")
+ || HIDDEN_APP_SLUGS.contains(&app.name_slug.as_str())
+ {
return None;
}
Some(CatalogEntry {
diff --git a/crates/pipedream_mcp/src/outbound/api/test.rs b/crates/pipedream_mcp/src/outbound/api/test.rs
index 5e8b58e731..f14ee554a6 100644
--- a/crates/pipedream_mcp/src/outbound/api/test.rs
+++ b/crates/pipedream_mcp/src/outbound/api/test.rs
@@ -38,6 +38,11 @@ fn a_different_slug_than_the_one_asked_for_is_not_that_app() {
assert!(connectable_catalog_entry("linear", app("slack", Some("oauth"))).is_none());
}
+#[test]
+fn a_hidden_app_is_not_connectable() {
+ assert!(connectable_catalog_entry("linkedin", app("linkedin", Some("oauth"))).is_none());
+}
+
#[test]
fn app_categories_are_optional_for_older_directory_responses() {
let app: AppResponse = serde_json::from_str(r#"{"name_slug":"linear","name":"Linear"}"#)
diff --git a/docs/agent-guide/settings.md b/docs/agent-guide/settings.md
index 4ecda87394..c6a48d5b91 100644
--- a/docs/agent-guide/settings.md
+++ b/docs/agent-guide/settings.md
@@ -605,7 +605,8 @@ dot sits beside the name.
The search filters every row by name, description and category and also searches
the catalog. **Add custom** sits beside it. Gmail, Google Calendar and Google
Sheets are hidden from the catalog because Macro syncs email and calendars
-natively. Scrolling toward the end loads the next catalog page; a failed page
+natively. LinkedIn never appears in the catalog or its search: the backend
+hides it. Scrolling toward the end loads the next catalog page; a failed page
keeps loaded apps and offers Retry.
Overlaid catalog apps (the `mcp_overlays` table, served at
`GET /pipedream/mcp/overlays`) look the same in the catalog but never open