openapi: 3.0.3
info:
title: Pipedream MCP Server Accounts API
version: v3
description: 'Pipedream''s Model Context Protocol (MCP) server exposes 2,800+ integrated apps and 10,000+ tools as a hosted MCP endpoint. The server supports both SSE and streamable HTTP transports dynamically with no client configuration required. Authentication uses OAuth 2.0 client credentials; per-request context is supplied via x-pd-project-id, x-pd-environment, x-pd-external-user-id, and x-pd-app-slug headers. Source: https://pipedream.com/docs/connect/mcp/developers'
contact:
name: Pipedream
url: https://pipedream.com/docs/connect/mcp
license:
name: Proprietary
url: https://pipedream.com/terms
servers:
- url: https://remote.mcp.pipedream.net/v3
description: Hosted Pipedream MCP server
security:
- bearerAuth: []
tags:
- name: Accounts
paths:
/v1/connect/{project_id}/accounts:
parameters:
- name: project_id
in: path
required: true
description: The project ID, which starts with `proj_`.
schema:
type: string
pattern: ^proj_[a-zA-Z0-9]+$
x-fern-sdk-variable: project_id
- name: external_user_id
in: query
required: false
schema:
type: string
- name: oauth_app_id
in: query
required: false
description: The OAuth app ID to filter by, if applicable
schema:
type: string
pattern: ^oa_[0-9a-zA-Z]+$
get:
summary: List Accounts
description: Retrieve all connected accounts for the project with optional filtering
parameters:
- name: x-pd-environment
in: header
required: true
description: The environment in which the server client is running
schema:
$ref: '#/components/schemas/ProjectEnvironment'
- name: after
in: query
required: false
description: The cursor to start from for pagination
schema:
type: string
- name: before
in: query
required: false
description: The cursor to end before for pagination
schema:
type: string
- name: limit
in: query
required: false
description: The maximum number of results to return
schema:
type: integer
- name: app
in: query
required: false
description: The app slug or ID to filter accounts by.
schema:
type: string
- name: include_credentials
in: query
description: Whether to retrieve the account's credentials or not
schema:
type: boolean
operationId: listAccounts
x-fern-sdk-group-name: accounts
x-fern-sdk-method-name: list
x-fern-pagination:
cursor: $request.after
next_cursor: $response.page_info.end_cursor
results: $response.data
security:
- ConnectToken: []
- OAuth2: []
responses:
'200':
description: accounts listed
content:
application/json:
schema:
$ref: '#/components/schemas/ListAccountsResponse'
'429':
description: too many requests
headers:
Retry-After:
description: Number of seconds until the rate limit resets
schema:
type: integer
X-RateLimit-Limit:
schema:
type: integer
description: The rate limit threshold
X-RateLimit-Remaining:
schema:
type: integer
description: Number of requests remaining (always 0 when throttled)
X-RateLimit-Reset:
schema:
type: integer
description: Unix timestamp when the rate limit resets
content:
application/json:
schema:
type: object
properties:
error:
type: string
example: Throttled
x-codeSamples:
- lang: java
label: Java SDK
source: "package com.example.usage;\n\nimport com.pipedream.api.BaseClient;\nimport com.pipedream.api.resources.accounts.requests.AccountsListRequest;\n\npublic class Example {\n public static void main(String[] args) {\n BaseClient client = BaseClient\n .builder()\n .clientId(\"<clientId>\")\n .clientSecret(\"<clientSecret>\")\n .projectId(\"YOUR_PROJECT_ID\")\n .build();\n\n client.accounts().list(\n AccountsListRequest\n .builder()\n .build()\n );\n }\n}\n"
- lang: typescript
label: TypeScript SDK
source: "import { PipedreamClient } from \"@pipedream/sdk\";\n\nconst client = new PipedreamClient({\n clientId: \"YOUR_CLIENT_ID\",\n clientSecret: \"YOUR_CLIENT_SECRET\",\n projectEnvironment: \"YOUR_PROJECT_ENVIRONMENT\",\n projectId: \"YOUR_PROJECT_ID\"\n});\nconst response = await client.accounts.list({\n externalUserId: \"external_user_id\",\n oauthAppId: \"oauth_app_id\",\n after: \"after\",\n before: \"before\",\n limit: 1,\n app: \"app\",\n includeCredentials: true\n});\nfor await (const item of response) {\n console.log(item);\n}\n\n// Or you can manually iterate page-by-page\nlet page = await client.accounts.list({\n externalUserId: \"external_user_id\",\n oauthAppId: \"oauth_app_id\",\n after: \"after\",\n before: \"before\",\n limit: 1,\n app: \"app\",\n includeCredentials: true\n});\nwhile (page.hasNextPage()) {\n page = page.getNextPage();\n}\n"
- lang: python
label: Python SDK
source: "from pipedream import Pipedream\n\nclient = Pipedream(\n project_id=\"YOUR_PROJECT_ID\",\n project_environment=\"YOUR_PROJECT_ENVIRONMENT\",\n client_id=\"YOUR_CLIENT_ID\",\n client_secret=\"YOUR_CLIENT_SECRET\",\n)\nresponse = client.accounts.list(\n external_user_id=\"external_user_id\",\n oauth_app_id=\"oauth_app_id\",\n after=\"after\",\n before=\"before\",\n limit=1,\n app=\"app\",\n include_credentials=True,\n)\nfor item in response:\n yield item\n# alternatively, you can paginate page-by-page\nfor page in response.iter_pages():\n yield page\n"
tags:
- Accounts
post:
summary: Create Account
description: Connect a new account for an external user in the project
parameters:
- name: x-pd-environment
in: header
required: true
description: The environment in which the server client is running
schema:
$ref: '#/components/schemas/ProjectEnvironment'
operationId: createAccount
x-fern-sdk-group-name: accounts
x-fern-sdk-method-name: create
security:
- ConnectToken: []
responses:
'200':
description: account created
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
'429':
description: too many requests
headers:
Retry-After:
description: Number of seconds until the rate limit resets
schema:
type: integer
X-RateLimit-Limit:
schema:
type: integer
description: The rate limit threshold
X-RateLimit-Remaining:
schema:
type: integer
description: Number of requests remaining (always 0 when throttled)
X-RateLimit-Reset:
schema:
type: integer
description: Unix timestamp when the rate limit resets
content:
application/json:
schema:
type: object
properties:
error:
type: string
example: Throttled
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAccountOpts'
x-codeSamples:
- lang: java
label: Java SDK
source: "package com.example.usage;\n\nimport com.pipedream.api.BaseClient;\nimport com.pipedream.api.resources.accounts.requests.CreateAccountOpts;\n\npublic class Example {\n public static void main(String[] args) {\n BaseClient client = BaseClient\n .builder()\n .clientId(\"<clientId>\")\n .clientSecret(\"<clientSecret>\")\n .projectId(\"YOUR_PROJECT_ID\")\n .build();\n\n client.accounts().create(\n CreateAccountOpts\n .builder()\n .appSlug(\"app_slug\")\n .cfmapJson(\"cfmap_json\")\n .connectToken(\"connect_token\")\n .build()\n );\n }\n}\n"
- lang: typescript
label: TypeScript SDK
source: "import { PipedreamClient } from \"@pipedream/sdk\";\n\nconst client = new PipedreamClient({\n clientId: \"YOUR_CLIENT_ID\",\n clientSecret: \"YOUR_CLIENT_SECRET\",\n projectEnvironment: \"YOUR_PROJECT_ENVIRONMENT\",\n projectId: \"YOUR_PROJECT_ID\"\n});\nawait client.accounts.create({\n externalUserId: \"external_user_id\",\n oauthAppId: \"oauth_app_id\",\n appSlug: \"app_slug\",\n cfmapJson: \"cfmap_json\",\n connectToken: \"connect_token\"\n});\n"
- lang: python
label: Python SDK
source: "from pipedream import Pipedream\n\nclient = Pipedream(\n project_id=\"YOUR_PROJECT_ID\",\n project_environment=\"YOUR_PROJECT_ENVIRONMENT\",\n client_id=\"YOUR_CLIENT_ID\",\n client_secret=\"YOUR_CLIENT_SECRET\",\n)\nclient.accounts.create(\n external_user_id=\"external_user_id\",\n oauth_app_id=\"oauth_app_id\",\n app_slug=\"app_slug\",\n cfmap_json=\"cfmap_json\",\n connect_token=\"connect_token\",\n)\n"
tags:
- Accounts
/v1/connect/{project_id}/accounts/{account_id}:
parameters:
- name: project_id
in: path
required: true
description: The project ID, which starts with `proj_`.
schema:
type: string
pattern: ^proj_[a-zA-Z0-9]+$
x-fern-sdk-variable: project_id
- name: account_id
in: path
required: true
schema:
type: string
get:
summary: Retrieve Account
description: Get the details for a specific connected account
parameters:
- name: x-pd-environment
in: header
required: true
description: The environment in which the server client is running
schema:
$ref: '#/components/schemas/ProjectEnvironment'
- name: include_credentials
in: query
description: Whether to retrieve the account's credentials or not
schema:
type: boolean
operationId: retrieveAccount
x-fern-sdk-group-name: accounts
x-fern-sdk-method-name: retrieve
security:
- ConnectToken: []
- OAuth2: []
responses:
'200':
description: account retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
'429':
description: too many requests
headers:
Retry-After:
description: Number of seconds until the rate limit resets
schema:
type: integer
X-RateLimit-Limit:
schema:
type: integer
description: The rate limit threshold
X-RateLimit-Remaining:
schema:
type: integer
description: Number of requests remaining (always 0 when throttled)
X-RateLimit-Reset:
schema:
type: integer
description: Unix timestamp when the rate limit resets
content:
application/json:
schema:
type: object
properties:
error:
type: string
example: Throttled
x-codeSamples:
- lang: java
label: Java SDK
source: "package com.example.usage;\n\nimport com.pipedream.api.BaseClient;\nimport com.pipedream.api.resources.accounts.requests.AccountsRetrieveRequest;\n\npublic class Example {\n public static void main(String[] args) {\n BaseClient client = BaseClient\n .builder()\n .clientId(\"<clientId>\")\n .clientSecret(\"<clientSecret>\")\n .projectId(\"YOUR_PROJECT_ID\")\n .build();\n\n client.accounts().retrieve(\n \"account_id\",\n AccountsRetrieveRequest\n .builder()\n .includeCredentials(true)\n .build()\n );\n }\n}\n"
- lang: typescript
label: TypeScript SDK
source: "import { PipedreamClient } from \"@pipedream/sdk\";\n\nconst client = new PipedreamClient({\n clientId: \"YOUR_CLIENT_ID\",\n clientSecret: \"YOUR_CLIENT_SECRET\",\n projectEnvironment: \"YOUR_PROJECT_ENVIRONMENT\",\n projectId: \"YOUR_PROJECT_ID\"\n});\nawait client.accounts.retrieve(\"account_id\", {\n includeCredentials: true\n});\n"
- lang: python
label: Python SDK
source: "from pipedream import Pipedream\n\nclient = Pipedream(\n project_id=\"YOUR_PROJECT_ID\",\n project_environment=\"YOUR_PROJECT_ENVIRONMENT\",\n client_id=\"YOUR_CLIENT_ID\",\n client_secret=\"YOUR_CLIENT_SECRET\",\n)\nclient.accounts.retrieve(\n account_id=\"account_id\",\n include_credentials=True,\n)\n"
tags:
- Accounts
delete:
summary: Delete Account
description: Remove a connected account and its associated credentials
parameters:
- name: x-pd-environment
in: header
required: true
description: The environment in which the server client is running
schema:
$ref: '#/components/schemas/ProjectEnvironment'
operationId: deleteAccount
x-fern-sdk-group-name: accounts
x-fern-sdk-method-name: delete
security:
- ConnectToken: []
- OAuth2: []
responses:
'204':
description: account deleted
'429':
description: too many requests
headers:
Retry-After:
description: Number of seconds until the rate limit resets
schema:
type: integer
X-RateLimit-Limit:
schema:
type: integer
description: The rate limit threshold
X-RateLimit-Remaining:
schema:
type: integer
description: Number of requests remaining (always 0 when throttled)
X-RateLimit-Reset:
schema:
type: integer
description: Unix timestamp when the rate limit resets
x-codeSamples:
- lang: java
label: Java SDK
source: "package com.example.usage;\n\nimport com.pipedream.api.BaseClient;\n\npublic class Example {\n public static void main(String[] args) {\n BaseClient client = BaseClient\n .builder()\n .clientId(\"<clientId>\")\n .clientSecret(\"<clientSecret>\")\n .projectId(\"YOUR_PROJECT_ID\")\n .build();\n\n client.accounts().delete(\"account_id\");\n }\n}\n"
- lang: typescript
label: TypeScript SDK
source: "import { PipedreamClient } from \"@pipedream/sdk\";\n\nconst client = new PipedreamClient({\n clientId: \"YOUR_CLIENT_ID\",\n clientSecret: \"YOUR_CLIENT_SECRET\",\n projectEnvironment: \"YOUR_PROJECT_ENVIRONMENT\",\n projectId: \"YOUR_PROJECT_ID\"\n});\nawait client.accounts.delete(\"account_id\");\n"
- lang: python
label: Python SDK
source: "from pipedream import Pipedream\n\nclient = Pipedream(\n project_id=\"YOUR_PROJECT_ID\",\n project_environment=\"YOUR_PROJECT_ENVIRONMENT\",\n client_id=\"YOUR_CLIENT_ID\",\n client_secret=\"YOUR_CLIENT_SECRET\",\n)\nclient.accounts.delete(\n account_id=\"account_id\",\n)\n"
tags:
- Accounts
/v1/connect/{project_id}/apps/{app_id}/accounts:
parameters:
- name: project_id
in: path
required: true
description: The project ID, which starts with `proj_`.
schema:
type: string
pattern: ^proj_[a-zA-Z0-9]+$
x-fern-sdk-variable: project_id
- name: app_id
in: path
required: true
schema:
type: string
delete:
summary: Delete Accounts by App
description: Remove all connected accounts for a specific app
parameters:
- name: x-pd-environment
in: header
required: true
description: The environment in which the server client is running
schema:
$ref: '#/components/schemas/ProjectEnvironment'
operationId: deleteAccountByApp
x-fern-sdk-group-name: accounts
x-fern-sdk-method-name: deleteByApp
security:
- ConnectToken: []
- OAuth2: []
responses:
'204':
description: accounts deleted
'429':
description: too many requests
headers:
Retry-After:
description: Number of seconds until the rate limit resets
schema:
type: integer
X-RateLimit-Limit:
schema:
type: integer
description: The rate limit threshold
X-RateLimit-Remaining:
schema:
type: integer
description: Number of requests remaining (always 0 when throttled)
X-RateLimit-Reset:
schema:
type: integer
description: Unix timestamp when the rate limit resets
x-codeSamples:
- lang: java
label: Java SDK
source: "package com.example.usage;\n\nimport com.pipedream.api.BaseClient;\n\npublic class Example {\n public static void main(String[] args) {\n BaseClient client = BaseClient\n .builder()\n .clientId(\"<clientId>\")\n .clientSecret(\"<clientSecret>\")\n .projectId(\"YOUR_PROJECT_ID\")\n .build();\n\n client.accounts().deleteByApp(\"app_id\");\n }\n}\n"
- lang: typescript
label: TypeScript SDK
source: "import { PipedreamClient } from \"@pipedream/sdk\";\n\nconst client = new PipedreamClient({\n clientId: \"YOUR_CLIENT_ID\",\n clientSecret: \"YOUR_CLIENT_SECRET\",\n projectEnvironment: \"YOUR_PROJECT_ENVIRONMENT\",\n projectId: \"YOUR_PROJECT_ID\"\n});\nawait client.accounts.deleteByApp(\"app_id\");\n"
- lang: python
label: Python SDK
source: "from pipedream import Pipedream\n\nclient = Pipedream(\n project_id=\"YOUR_PROJECT_ID\",\n project_environment=\"YOUR_PROJECT_ENVIRONMENT\",\n client_id=\"YOUR_CLIENT_ID\",\n client_secret=\"YOUR_CLIENT_SECRET\",\n)\nclient.accounts.delete_by_app(\n app_id=\"app_id\",\n)\n"
tags:
- Accounts
/v1/connect/{project_id}/users/{external_user_id}:
parameters:
- name: project_id
in: path
required: true
description: The project ID, which starts with `proj_`.
schema:
type: string
pattern: ^proj_[a-zA-Z0-9]+$
x-fern-sdk-variable: project_id
- name: external_user_id
in: path
required: true
schema:
type: string
delete:
summary: Delete External User
description: Remove an external user and all their associated accounts and resources
parameters:
- name: x-pd-environment
in: header
required: true
description: The environment in which the server client is running
schema:
$ref: '#/components/schemas/ProjectEnvironment'
operationId: deleteUserExternalUser
x-fern-sdk-group-name: users
x-fern-sdk-method-name: deleteExternalUser
security:
- ConnectToken: []
- OAuth2: []
responses:
'204':
description: external user deleted
'429':
description: too many requests
headers:
Retry-After:
description: Number of seconds until the rate limit resets
schema:
type: integer
X-RateLimit-Limit:
schema:
type: integer
description: The rate limit threshold
X-RateLimit-Remaining:
schema:
type: integer
description: Number of requests remaining (always 0 when throttled)
X-RateLimit-Reset:
schema:
type: integer
description: Unix timestamp when the rate limit resets
x-codeSamples:
- lang: java
label: Java SDK
source: "package com.example.usage;\n\nimport com.pipedream.api.BaseClient;\n\npublic class Example {\n public static void main(String[] args) {\n BaseClient client = BaseClient\n .builder()\n .clientId(\"<clientId>\")\n .clientSecret(\"<clientSecret>\")\n .projectId(\"YOUR_PROJECT_ID\")\n .build();\n\n client.users().deleteExternalUser(\"external_user_id\");\n }\n}\n"
- lang: typescript
label: TypeScript SDK
source: "import { PipedreamClient } from \"@pipedream/sdk\";\n\nconst client = new PipedreamClient({\n clientId: \"YOUR_CLIENT_ID\",\n clientSecret: \"YOUR_CLIENT_SECRET\",\n projectEnvironment: \"YOUR_PROJECT_ENVIRONMENT\",\n projectId: \"YOUR_PROJECT_ID\"\n});\nawait client.users.deleteExternalUser(\"external_user_id\");\n"
- lang: python
label: Python SDK
source: "from pipedream import Pipedream\n\nclient = Pipedream(\n project_id=\"YOUR_PROJECT_ID\",\n project_environment=\"YOUR_PROJECT_ENVIRONMENT\",\n client_id=\"YOUR_CLIENT_ID\",\n client_secret=\"YOUR_CLIENT_SECRET\",\n)\nclient.users.delete_external_user(\n external_user_id=\"external_user_id\",\n)\n"
tags:
- Accounts
components:
schemas:
AppAuthType:
type: string
enum:
- keys
- oauth
- none
description: The authentication type used by the app
nullable: true
ProjectEnvironment:
type: string
description: The environment in which the server client is running
enum:
- development
- production
CreateAccountOpts:
type: object
description: Request object for creating an account
required:
- app_slug
- cfmap_json
- connect_token
properties:
app_slug:
type: string
description: The app slug for the account
cfmap_json:
type: string
description: JSON string containing the custom fields mapping
connect_token:
type: string
description: The connect token for authentication
name:
type: string
description: Optional name for the account
account_id:
type: string
description: An existing account ID to reconnect. When provided, the account's credentials are updated instead of creating a new account. Must belong to the same external user and project environment as the connect token, and match the app identified by app_slug.
ListAccountsResponse:
type: object
description: Response received when listing accounts
required:
- data
- page_info
properties:
data:
type: array
items:
$ref: '#/components/schemas/Account'
page_info:
$ref: '#/components/schemas/PageInfo'
AccountId:
type: string
description: The unique ID of the account.
pattern: ^apn_[a-zA-Z0-9]+$
App:
type: object
description: Response object for a Pipedream app's metadata
required:
- name_slug
- name
- img_src
- custom_fields_json
- categories
- featured_weight
properties:
id:
type: string
description: ID of the app. Only applies for OAuth apps.
nullable: true
name_slug:
type: string
description: The name slug of the target app (see https://pipedream.com/docs/connect/quickstart#find-your-apps-name-slug)
name:
type: string
description: The human-readable name of the app
auth_type:
$ref: '#/components/schemas/AppAuthType'
description:
type: string
description: A short description of the app
nullable: true
img_src:
type: string
description: The URL to the app's logo
custom_fields_json:
type: string
description: A JSON string representing the custom fields for the app
nullable: true
categories:
type: array
items:
type: string
description: Categories associated with the app
featured_weight:
type: number
description: A rough directional ordering of app popularity, subject to changes by Pipedream
PageInfo:
type: object
properties:
count:
type: integer
description: Number of items returned
example: 10
total_count:
type: integer
description: Total number of items
example: 120
start_cursor:
type: string
description: Used to fetch the previous page of items
nullable: true
end_cursor:
type: string
description: Used to fetch the next page of items
nullable: true
Account:
type: object
description: End user account data, returned from the API.
required:
- id
properties:
id:
$ref: '#/components/schemas/AccountId'
name:
type: string
description: The custom name of the account if set.
nullable: true
external_id:
type: string
description: The external ID associated with the account.
healthy:
type: boolean
description: Indicates if the account is healthy. Pipedream will periodically retry token refresh and test requests for unhealthy accounts
dead:
type: boolean
nullable: true
description: Indicates if the account is no longer active
app:
$ref: '#/components/schemas/App'
created_at:
type: string
description: The date and time the account was created, an ISO 8601 formatted string
format: date-time
updated_at:
type: string
description: The date and time the account was last updated, an ISO 8601 formatted string
format: date-time
authorized_scopes:
type: array
items:
type: string
description: The OAuth scopes effectively granted to this account. Empty for non-OAuth apps.
credentials:
type: object
description: The credentials associated with the account, if the `include_credentials` parameter was set to true in the request (only applicable for BYOA apps). In addition to the well-known OAuth fields listed below, this object may contain app-specific custom fields (e.g. `base_url`).
nullable: true
additionalProperties: true
properties:
oauth_client_id:
type: string
description: The OAuth client ID for the app, if applicable
oauth_access_token:
type: string
description: The OAuth access token
oauth_refresh_token:
type: string
description: The OAuth refresh token
oauth_uid:
type: string
description: The unique OAuth user identifier
oauth_signer_uri:
type: string
description: The OAuth signer URI, if the app uses a custom OAuth signer
expires_at:
type: string
description: The date and time the account's credentials expiration, an ISO 8601 formatted string
format: date-time
error:
type: string
description: The error message if the account is unhealthy or dead, null otherwise
nullable: true
last_refreshed_at:
type: string
description: The date and time the account was last refreshed, an ISO 8601 formatted string
format: date-time
nullable: true
next_refresh_at:
type: string
description: The date and time the account will next be refreshed, an ISO 8601 formatted string
format: date-time
nullable: true
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: OAuth access token