RudderStack Transformation
RudderStack Transformation API allows you to manage transformations and libraries for customer data pipelines. Use it to create, update, and delete transformations programmatically.
Verdict
Common use cases
- Draft event filtering logic during incident triage
- Audit which transformations touch PII fields
- Publish enrichment code after peer review in chat
- Retrieve transformation version history for debugging
- Create reusable libraries for common data mappings
Integration
- Vendor
- RudderStack Transformation
- Category
- developer-tools
- Auth
- OAUTH2
- Tools
- 12
- Composio slug
rudderstack_transformation
Tools
- Create Library
Tool to create a library in RudderStack Transformation. Use when you need to create reusable JavaScript or Python code that can be imported in transformations. Libraries enable code reusability and version maintenance.
- Create Transformation
Tool to create a RudderStack transformation. When publish=false (default), creates an unpublished transformation not available to event traffic. When publish=true, publishes the transformation making it live for incoming events and connecta
- Delete Transformationdestructive
Delete a published transformation by ID. Note that RudderStack never deletes a transformation revision. Use this when you need to remove a transformation from the system.
- Get library by ID
Retrieves a single published library by its unique identifier. Use when you need to fetch details of a specific library.
- Get Library Version
Tool to retrieve a single library version by library ID and version ID. Use when you need to fetch details of a specific library revision in RudderStack transformations.
- Get Transformation
Tool to retrieve a published transformation by its ID from RudderStack. Use when you need to fetch details about a specific transformation including its code, version, and associated destinations.
- Get Transformation Version
Retrieve a single transformation revision by transformation ID and version ID. Use when you need to get details about a specific version of a RudderStack transformation.
- List All Libraries
Tool to retrieve all published libraries for a workspace. Use when you need to list available libraries for transformations.
- List All Transformations
Tool to retrieve all published transformations for a workspace. Use when you need to list available transformations or find a specific transformation by name.
- List Library Versions
Tool to get all library revisions for a library ID. Use when you need to retrieve all versions of a specific library in RudderStack Transformation.
- List Transformation Versions
Tool to list all transformation versions (revisions) for a given transformation ID. Use when you need to retrieve the version history of a specific transformation.
- Update Transformation
Tool to update and optionally publish a RudderStack transformation. Use when you need to modify a transformation's name, description, or code. Updating creates a new revision and sets it as published if the publish flag is true.
Setup
Setup guide
- 11. Inside any Switchy Space, type '@RudderStack Transformation' and click 'Connect new integration' when prompted. 2. You'll be redirected to RudderStack's OAuth consent screen — sign in with your RudderStack account and select the workspace you want to connect. 3. Grant the requested scopes: read access to libraries and transformations, write access to create and update them, and publish permissions if you want to deploy changes directly from Switchy. 4. After authorizing, you'll return to Switchy and see a confirmation that RudderStack Transformation is connected. 5. Test the connection by asking '@RudderStack Transformation list all transformations in this workspace' — you should see your existing transformations appear in the response. 6. To invoke a tool, @mention the integration in any message and describe what you want to do; the AI will call the appropriate RudderStack API and return the result inline.
What teammates see: by default, memories from RudderStack Transformation are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Spaces have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
List Active Transformations
@RudderStack Transformation show me all published transformations in this workspace, including their names and which destinations they're connected toOpen in a Space →
Create Draft Transformation
@RudderStack Transformation create a new unpublished transformation called 'Filter Test Events' that drops any event where context.testMode is true, using JavaScriptOpen in a Space →
Fetch Transformation Code
@RudderStack Transformation get the transformation with ID 2gHk7pQxYzL3mN8r and show me its current code and version numberOpen in a Space →
Build Reusable Library
@RudderStack Transformation create a library called 'Email Validators' with a JavaScript function that checks if an email domain is in our allowed listOpen in a Space →
Compare Transformation Versions
@RudderStack Transformation get version 3 and version 5 of transformation ID 9xFt2kWqPmJ4sL7v so I can compare what changed between themOpen in a Space →
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@RudderStack Transformation list all published libraries in our workspace and show me which ones are used for user enrichment
Found 8 published libraries in your workspace. Three are tagged for user enrichment: 'geo-lookup' (v2.1, last updated 14 days ago), 'segment-classifier' (v1.3, updated 6 days ago), and 'email-validator' (v3.0, updated yesterday). The geo-lookup library is currently imported by 4 active transformations. The other enrichment-related libraries include 'currency-converter' and 'timezone-mapper', which might also be relevant depending on your use case.
This example demonstrates the MCP's read capabilities for workspace inventory. Requires OAuth2 with read:library scope. The response reflects your workspace's actual library state — if you have no published libraries, the list will be empty. Useful for auditing code reuse before creating new transformations.
@RudderStack Transformation create a new transformation called 'filter-test-events' that drops all events where context.testMode is true, but don't publish it yet
Created unpublished transformation 'filter-test-events' (ID: tr_8x4k2m9p). The transformation includes a JavaScript function that checks `event.context.testMode` and returns null to drop matching events. Since publish=false, this transformation is saved as a draft and won't process any live event traffic. You can test it in the RudderStack dashboard, then use the publish action when ready to activate it on your event pipelines.
This write example shows how to safely create transformations without immediately affecting production traffic. The default publish=false behavior is a safety feature — you must explicitly publish to route events through the transformation. Requires write:transformation scope. Once published, the transformation becomes immutable; edits create new versions.
@RudderStack Transformation get transformation tr_5n8j3k1m and analyze its code to suggest performance improvements for high-volume event streams
Retrieved transformation 'enrich-user-profiles' (v4, published 3 weeks ago). The code performs three external API calls per event: Clearbit lookup, IP geolocation, and company enrichment. For high-volume streams, this creates a bottleneck. Recommendations: (1) Move the Clearbit lookup to a library with caching to avoid redundant calls for known emails. (2) Batch the geolocation requests or use a local MaxMind database. (3) Consider async processing for company enrichment if real-time isn't required. The transformation currently has no error handling for API timeouts.
This synthesis example pairs the MCP's retrieval capability with AI reasoning to provide actionable insights. The AI can read transformation code and suggest optimizations, but cannot directly measure runtime performance — you'll need RudderStack's observability tools to validate improvements. Useful for code reviews before scaling event volumes.
Use-case deep-dives
When RudderStack Transformation MCP speeds up data QA
A 6-person growth team at a B2B SaaS company ships 3-5 event schema changes per sprint. Their data analyst needs to verify that transformations applied to Segment-style events are working before they hit the warehouse. This MCP is the right call: the analyst can query transformation code directly in Switchy, compare versions when a metric breaks, and pull library dependencies without opening the RudderStack UI. The 12-tool scope covers the full read-write loop—create, publish, fetch by ID, list libraries. The OAuth2 flow means the analyst authenticates once and the whole team inherits access. If your team ships fewer than 2 schema changes per month, the setup overhead outweighs the benefit. For teams iterating on event pipelines weekly, this MCP turns transformation audits from a 20-minute context-switch into a 2-minute Switchy query.
Using this MCP to audit PII handling in transformations
A 3-person data governance team at a fintech startup needs to prove to auditors that no PII leaks into third-party destinations. They run quarterly reviews of every RudderStack transformation that touches user events. This MCP fits: the compliance lead can list all published transformations, retrieve each one's code and version history, and cross-reference libraries that might contain redaction logic. The Get Transformation Version tool is critical here—auditors want to see what was live on a specific date. The MCP doesn't parse the JavaScript or Python for you, but it surfaces the code in Switchy where the team can grep for field names or run static analysis. If your compliance process is annual or ad-hoc, exporting CSVs from RudderStack is simpler. For quarterly or monthly reviews, this MCP cuts the audit prep from a full day to under an hour.
When this MCP helps new hires learn transformation patterns
A 10-person engineering team at a marketplace startup hires 2 junior backend engineers who need to understand how events are enriched before they reach analytics tools. The tech lead wants them to read existing transformations and libraries without giving them write access to production RudderStack. This MCP is borderline useful: the OAuth2 scope is workspace-wide, so you can't restrict juniors to read-only in Switchy unless RudderStack's own RBAC supports it. If it does, the MCP shines—juniors can search transformations by keyword, pull library code to see reusable patterns, and ask Switchy to explain what a transformation does. The List All Libraries and Get Library by ID tools make it easy to trace dependencies. If your RudderStack workspace lacks granular permissions, this MCP won't enforce read-only access. For teams with RBAC configured, it's a low-friction way to onboard engineers to your event pipeline in under a week.
Frequently asked
What does the RudderStack Transformation MCP do in Switchy?
It lets your team create, edit, and manage JavaScript or Python transformations that modify event data flowing through RudderStack pipelines. You can build reusable libraries, publish transformations to production, and retrieve specific versions — all from Switchy's chat interface instead of switching to the RudderStack dashboard.
Do I need admin access to connect RudderStack Transformation?
You need workspace-level permissions in RudderStack to authorize the OAuth2 connection. The MCP requests scopes to create, read, update, and delete transformations and libraries. If you only have read access in RudderStack, you won't be able to publish transformations or create libraries through Switchy.
Can this MCP deploy transformations to live event traffic?
Yes. The Create Transformation tool accepts a publish parameter — set it to true and the transformation goes live immediately, processing real event data. The default is false, which creates an unpublished draft. You can also delete published transformations, but RudderStack keeps all revision history even after deletion.
How is this different from editing transformations in the RudderStack UI?
Same underlying API, different interface. The RudderStack dashboard gives you syntax highlighting and a test console; Switchy gives you natural-language prompts and the ability to chain transformation edits with other workflow steps. Use the UI for initial development, Switchy for repetitive updates or cross-tool orchestration.
Who on the team should connect this MCP?
Whoever owns your RudderStack data pipeline — typically a data engineer or backend developer. They'll need to understand JavaScript or Python transformation logic to use the MCP effectively. Connecting it doesn't consume extra Switchy seats, but the person connecting must have RudderStack workspace admin rights.