{
  "id": "0QeJ4aIbMhFzRhu5",
  "meta": null,
  "name": "NPR Listening Service MCP Server",
  "tags": [],
  "nodes": [
    {
      "id": "7be9e88e-30f1-483c-bbb4-e7ed2e032c45",
      "name": "Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1380,
        -240
      ],
      "parameters": {
        "color": 4,
        "height": 1060,
        "content": "### \u2699\ufe0f Setup Instructions\n\n1. **Import Workflow**: \nLoad this workflow into your n8n instance\n\n2. **Configure Authentication**: \nSet up oauth2 credentials\n\n3. **Activate Workflow**:\nEnable the workflow to start the MCP server\n\n4. **Get MCP URL**: \nCopy the webhook URL from the MCP trigger\n\n5. **Connect AI Agent**:\nUse the MCP URL in your AI agent configuration\n\n\n### \ud83d\udca1 Usage Notes\n\u2022 Parameters are auto-populated by AI using $fromAI() expressions\n\u2022 With 9 API endpoints available as tools\n\u2022 Responses maintain original API structure\n\n\n### \ud83d\udee0\ufe0f Customization\n\u2022 Add data transformation nodes if needed\n\u2022 Implement custom error handling\n\u2022 Add logging or monitoring nodes\n\n\u2022 Modify parameter defaults in any HTTP request node as needed\n\n### \ud83d\udcac Need Help?\nPing me on [discord](https://discord.me/cfomodz) for integration guidance and custom automations. Check the [n8n documentation](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/) for more information."
      },
      "typeVersion": 1
    },
    {
      "id": "35cb901e-e854-419d-9992-91dc391d7d6e",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        -240
      ],
      "parameters": {
        "width": 420,
        "height": 1040,
        "content": "## \ud83d\udee0\ufe0f NPR Listening Service MCP Server \u2705 9 operations\n\n### About\nAudio recommendations tailored to a user's preferences\n\n### \ud83d\udd27 How it Works\n\nThis workflow converts the NPR Listening Service API into an MCP-compatible interface for AI agents.\n\n\u2022 **MCP Trigger**: Serves as your server endpoint for AI agent requests\n\u2022 **HTTP Request Nodes**: Handle API calls to https://listening.api.npr.org\n\u2022 **AI Expressions**: Automatically populate parameters via `$fromAI()` placeholders\n\u2022 **Native Integration**: Returns responses directly to the AI agent\n\n\n### \ud83d\udccb Available Operations (9 endpoints)\n\n**Aggregation (1 operations)**\nGet Aggregation Recommendations\n\n**Channels (1 operations)**\nList Available Channels\n\n**History (1 operations)**\nGet User Ratings History\n\n**Organizations (2 operations)**\nGet Category Recommendations, Get Organization Details\n\n**Promo (1 operations)**\nGet Recent Promo Audio\n\n**Ratings (1 operations)**\nSubmit Media Ratings\n\n**Recommendations (1 operations)**\nGet User Recommendations\n\n**Search (1 operations)**\nGet Search Recommendations\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "94246208-4692-4e28-955d-f2fe87637b67",
      "name": "NPR Listening Service MCP Server",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        -620,
        -240
      ],
      "parameters": {
        "path": "npr-listening-service-mcp"
      },
      "typeVersion": 1
    },
    {
      "id": "3d2a0011-7dc6-45c5-82c6-019ce5d1853e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        -100
      ],
      "parameters": {
        "color": 2,
        "width": 300,
        "height": 200,
        "content": "## Aggregation"
      },
      "typeVersion": 1
    },
    {
      "id": "0c87620d-9608-4a9d-97d6-ff26d6dba51f",
      "name": "Get Aggregation Recommendations",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        -60
      ],
      "parameters": {
        "url": "=https://listening.api.npr.org/v2/aggregation/{{ $fromAI('aggId', 'ID of an aggregation such as a program or podcast. If the specified ID is a program that publishes rundowns, the latest rundown will be returned.', 'number') }}/recommendations",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "startNum",
              "value": "={{ $fromAI('startNum', 'The result to start with. Allows paging through the episodes of a podcast or program, with the default, `startNum=0`, being the most recent episode. Ignored for programs that publish a rundown.', 'number', 0) }}"
            }
          ]
        },
        "toolDescription": "Get a set of recommendations for an aggregation independent of the user's listening history\n\nParameters:\n- Path parameters:\n  \u2022 aggId (required) - ID of an aggregation such as a program or podcast. If the specified ID is a program that publishes rundowns, the latest rundown will be returned.\n- Query parameters:\n  \u2022 startNum (optional) - Result to start with. Allows paging through the episodes of a podcast or program, with the default, `startNum=0`, being the most recent episode. Ignored for programs that publish a rundown."
      },
      "typeVersion": 4.2
    },
    {
      "id": "1818abb9-4238-4613-ba90-485e8082a524",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        140
      ],
      "parameters": {
        "color": 3,
        "width": 300,
        "height": 200,
        "content": "## Channels"
      },
      "typeVersion": 1
    },
    {
      "id": "8813ca45-f2a6-4ea3-a377-c4b3319b18d4",
      "name": "List Available Channels",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        180
      ],
      "parameters": {
        "url": "=https://listening.api.npr.org/v2/channels",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "exploreOnly",
              "value": "={{ $fromAI('exploreOnly', 'If set to `true`, this call will return only channels that should be shown in the client's `Explore` view', 'boolean', false) }}"
            }
          ]
        },
        "toolDescription": "Get the list of available channels\n\nParameters:\n- Query parameters:\n  \u2022 exploreOnly (optional) - If set to `true`, this call will return only channels that should be shown in the client's `Explore` view"
      },
      "typeVersion": 4.2
    },
    {
      "id": "5bf3f584-bbef-4723-9b69-db04b68d2180",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        380
      ],
      "parameters": {
        "color": 4,
        "width": 300,
        "height": 200,
        "content": "## History"
      },
      "typeVersion": 1
    },
    {
      "id": "a3f83689-9dad-45a0-a62c-9b8a01e0b50f",
      "name": "Get User Ratings History",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        420
      ],
      "parameters": {
        "url": "=https://listening.api.npr.org/v2/history",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "toolDescription": "Get recent ratings the logged-in user has submitted"
      },
      "typeVersion": 4.2
    },
    {
      "id": "3ba30a59-c094-416e-b648-aabe01452835",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        620
      ],
      "parameters": {
        "color": 5,
        "width": 500,
        "height": 200,
        "content": "## Organizations"
      },
      "typeVersion": 1
    },
    {
      "id": "d2eaa3a7-d899-4f7c-bf26-1083381cc6ba",
      "name": "Get Category Recommendations",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        660
      ],
      "parameters": {
        "url": "=https://listening.api.npr.org/v2/organizations/{{ $fromAI('orgId', 'ID of an organization, such as an NPR One station', 'number') }}/categories/{{ $fromAI('category', 'One of the three categories of content - newscast, story, or podcast', 'string', 'story') }}/recommendations",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "toolDescription": "Get a list of recommendations from a category of content from an organization\n\nParameters:\n- Path parameters:\n  \u2022 orgId (required) - ID of an organization, such as an NPR One station\n  \u2022 category (required) - One of the three categories of content - newscast, story, or podcast"
      },
      "typeVersion": 4.2
    },
    {
      "id": "b1dd969e-1876-4a98-abad-99147e288205",
      "name": "Get Organization Details",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -320,
        660
      ],
      "parameters": {
        "url": "=https://listening.api.npr.org/v2/organizations/{{ $fromAI('orgId', 'ID of an organization, such as an NPR One station', 'number') }}/recommendations",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "toolDescription": "Get a variety of details about an organization including various lists of recent audio items\n\nParameters:\n- Path parameters:\n  \u2022 orgId (required) - ID of an organization, such as an NPR One station"
      },
      "typeVersion": 4.2
    },
    {
      "id": "46e7450f-306b-4a58-9acd-ec2a589eb9cf",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        860
      ],
      "parameters": {
        "color": 6,
        "width": 300,
        "height": 200,
        "content": "## Promo"
      },
      "typeVersion": 1
    },
    {
      "id": "29c7a041-9715-4df9-9d49-88fa9074393e",
      "name": "Get Recent Promo Audio",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        900
      ],
      "parameters": {
        "url": "=https://listening.api.npr.org/v2/promo/recommendations",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "toolDescription": "Retrieve the most recent promo audio heard by the logged-in user"
      },
      "typeVersion": 4.2
    },
    {
      "id": "66444861-da4a-43ec-9531-d73311199c4c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        1100
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 200,
        "content": "## Ratings"
      },
      "typeVersion": 1
    },
    {
      "id": "615674ac-500a-4537-8377-abc20c62af57",
      "name": "Submit Media Ratings",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        1140
      ],
      "parameters": {
        "url": "=https://listening.api.npr.org/v2/ratings",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "recommend",
              "value": "={{ $fromAI('recommend', 'If set to `false`, this call will return a blank document; otherwise it will return a new recommendation object', 'boolean', true) }}"
            }
          ]
        },
        "toolDescription": "Collect new ratings for media previously recommended to the logged-in user\n\nParameters:\n- Query parameters:\n  \u2022 recommend (optional) - If set to `false`, this call will return a blank document; otherwise it will return a new recommendation object"
      },
      "typeVersion": 4.2
    },
    {
      "id": "1979c204-f489-4e07-a148-91a8934a89af",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        1340
      ],
      "parameters": {
        "color": 2,
        "width": 300,
        "height": 200,
        "content": "## Recommendations"
      },
      "typeVersion": 1
    },
    {
      "id": "9fd1c14b-044c-4300-98f4-eb880b7ccaa1",
      "name": "Get User Recommendations",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        1380
      ],
      "parameters": {
        "url": "=https://listening.api.npr.org/v2/recommendations",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "sharedMediaId",
              "value": "={{ $fromAI('sharedMediaId', 'This media was shared directly with the user; if provided, the service will add this recommendation to the top of the list', 'string') }}"
            },
            {
              "name": "notifiedMediaId",
              "value": "={{ $fromAI('notifiedMediaId', 'The user received a push notification about this media; if provided, the service will add this recommendation to the top of the list', 'string') }}"
            }
          ]
        },
        "toolDescription": "Get a list of media for the logged-in user from NPR's recommendation engine\n\nParameters:\n- Query parameters:\n  \u2022 sharedMediaId (optional) - Media was shared directly with the user; if provided, the service will add this recommendation to the top of the list\n  \u2022 notifiedMediaId (optional) - User received a push notification about this media; if provided, the service will add this recommendation to the top of the list"
      },
      "typeVersion": 4.2
    },
    {
      "id": "87d8ade4-eaea-48f4-bf93-f2053f3e9989",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        1580
      ],
      "parameters": {
        "color": 3,
        "width": 300,
        "height": 200,
        "content": "## Search"
      },
      "typeVersion": 1
    },
    {
      "id": "fc72a50c-1408-4931-ae30-103a15a160de",
      "name": "Get Search Recommendations",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        1620
      ],
      "parameters": {
        "url": "=https://listening.api.npr.org/v2/search/recommendations",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "searchTerms",
              "value": "={{ $fromAI('searchTerms', 'Search terms to search on; can include URL-encoded punctuation', 'string') }}"
            }
          ]
        },
        "toolDescription": "Get a list of recent audio and aggregation items associated with search terms\n\nParameters:\n- Query parameters:\n  \u2022 searchTerms (required) - Search terms to search on; can include URL-encoded punctuation"
      },
      "typeVersion": 4.2
    }
  ],
  "active": false,
  "shared": [
    {
      "role": "workflow:owner",
      "project": {
        "id": "G5fce9xGuBAsWBXe",
        "icon": null,
        "name": "David Ashby <david.ashby.lds@gmail.com>",
        "type": "personal",
        "createdAt": "2025-06-04T02:55:02.013Z",
        "updatedAt": "2025-06-04T02:56:01.361Z",
        "projectRelations": [
          {
            "role": "project:personalOwner",
            "user": {
              "id": "715c1c00-cb48-4712-9a32-f1f4b6db2b30",
              "role": "global:owner",
              "email": "david.ashby.lds@gmail.com",
              "disabled": false,
              "lastName": "Ashby",
              "settings": {
                "npsSurvey": {
                  "responded": true,
                  "lastShownAt": 1749357655581
                },
                "userActivated": true,
                "userActivatedAt": 1749075994495,
                "easyAIWorkflowOnboarded": true,
                "firstSuccessfulWorkflowId": "3N3vVikZb3MckFYm"
              },
              "createdAt": "2025-06-04T02:55:01.745Z",
              "firstName": "David",
              "isPending": false,
              "updatedAt": "2025-06-08T04:40:58.399Z",
              "mfaEnabled": false,
              "personalizationAnswers": {
                "version": "v4",
                "personalization_survey_n8n_version": "1.95.3",
                "personalization_survey_submitted_at": "2025-06-04T02:56:07.075Z"
              }
            },
            "userId": "715c1c00-cb48-4712-9a32-f1f4b6db2b30",
            "createdAt": "2025-06-04T02:55:02.013Z",
            "projectId": "G5fce9xGuBAsWBXe",
            "updatedAt": "2025-06-04T02:55:02.013Z"
          }
        ]
      },
      "createdAt": "2025-07-03T17:14:16.781Z",
      "projectId": "G5fce9xGuBAsWBXe",
      "updatedAt": "2025-07-03T17:14:16.781Z",
      "workflowId": "0QeJ4aIbMhFzRhu5"
    }
  ],
  "settings": {
    "timezone": "America/New_York"
  },
  "createdAt": "2025-07-03T17:14:16.779Z",
  "updatedAt": "2025-07-03T17:16:45.000Z",
  "versionId": "70864a9e-7be4-434a-8c53-ef487233d2ce",
  "isArchived": false,
  "staticData": null,
  "connections": {
    "Submit Media Ratings": {
      "ai_tool": [
        [
          {
            "node": "NPR Listening Service MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Recent Promo Audio": {
      "ai_tool": [
        [
          {
            "node": "NPR Listening Service MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "List Available Channels": {
      "ai_tool": [
        [
          {
            "node": "NPR Listening Service MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Organization Details": {
      "ai_tool": [
        [
          {
            "node": "NPR Listening Service MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get User Ratings History": {
      "ai_tool": [
        [
          {
            "node": "NPR Listening Service MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get User Recommendations": {
      "ai_tool": [
        [
          {
            "node": "NPR Listening Service MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Search Recommendations": {
      "ai_tool": [
        [
          {
            "node": "NPR Listening Service MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Category Recommendations": {
      "ai_tool": [
        [
          {
            "node": "NPR Listening Service MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Aggregation Recommendations": {
      "ai_tool": [
        [
          {
            "node": "NPR Listening Service MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "triggerCount": 0
}