### Start Stdio Transport with Inspector Source: https://github.com/pipedreamhq/pipedream/blob/master/modelcontextprotocol/README.md Use this command to run the Stdio transport example with the MCP Inspector. This setup has only been tested with the MCP Inspector. ```bash npx @modelcontextprotocol/inspector bun src/stdio.ts ``` -------------------------------- ### Install Dependencies with npm Source: https://github.com/pipedreamhq/pipedream/blob/master/types/README.md Use this command to install project dependencies. It is required before running tests or building the project. ```bash npm install ``` -------------------------------- ### Create a Demo Action Source: https://github.com/pipedreamhq/pipedream/blob/master/README.md This action accepts a 'name' as input and returns a greeting. It's useful for demonstrating custom action creation. ```javascript export default { name: "Action Demo", description: "This is a demo action", key: "action_demo", version: "0.0.1", type: "action", props: { name: { type: "string", label: "Name", }, }, async run() { return `hello ${this.name}!`; }, }; ``` -------------------------------- ### AWS IAM Policy for CloudWatch Logs Insights Source: https://github.com/pipedreamhq/pipedream/blob/master/components/aws/sources/new-records-returned-by-cloudwatch-logs-insights-query/README.md This IAM policy grants the necessary permissions to start, describe, get, and stop CloudWatch Logs Insights queries. Ensure your IAM user has at least these permissions. ```json { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "logs:StartQuery", "Resource": "arn:aws:logs:*:*:log-group:*" }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action": "logs:DescribeLogGroups", "Resource": "arn:aws:logs:*:*:log-group:*" }, { "Sid": "VisualEditor2", "Effect": "Allow", "Action": ["logs:GetQueryResults", "logs:StopQuery"], "Resource": "*" } ] } ``` -------------------------------- ### Basic OpenAI Tool Integration with @pipedream/ai Source: https://github.com/pipedreamhq/pipedream/blob/master/packages/ai/README.md This example demonstrates how to initialize and use the OpenAiTools class to fetch tools for a specific application (e.g., Slack) and then handle an OpenAI completion that utilizes these tools. Ensure you replace '' with a unique identifier for your user. ```typescript import { OpenAiTools } from "@pipedream/ai" import { OpenAI } from "openai" const openai = new OpenAI() // Replace with a unique identifier for your user const userId = const openAiTools = new OpenAiTools(userId) const tools = await openAiTools.getTools({ app: "slack", }) const completion = await openai.chat.completions.create({ messages: [ { role: "user", content: "Send a joke to #random channel", }, ], model: "gpt-4o", tools, }) const results = await openAiTools.handleCompletion(completion) console.log(JSON.stringify(results, null, 2)) ``` -------------------------------- ### Build Project with npm Source: https://github.com/pipedreamhq/pipedream/blob/master/types/README.md Run this command to build the project. This is typically done after making code changes or before publishing. ```bash npm run build ```