Add Tableau embedding support to MCP app#400
Open
jarhun88 wants to merge 7 commits into
Open
Conversation
Extracted getOAuthToken logic from mcp-app.ts into a separate lib/getOAuthTokenToolClient module. This improves code reusability and testability by isolating the token retrieval logic. Also enabled mcp-apps feature flag in features.json.
Implement full-screen Tableau visualization embedding using the Embedding API v3. The app retrieves OAuth tokens via the get-oauth-token tool and embeds views received from MCP tool results. Key changes: - Add tableau:views:embed scope to get-oauth-token tool for embedding auth - Create embedTableauViz utilities for creating and managing viz elements - Create getOAuthTokenToolClient for retrieving OAuth tokens from MCP - Simplify app UI to full-screen layout with no loading state - Dynamically load Embedding API from configured Tableau server - Add comprehensive tests for embedding and token retrieval (19 tests) - Install jsdom for DOM testing The app now extracts view URLs from tool results, fetches OAuth tokens, and renders visualizations in a full-viewport container.
Remove all console.log, console.info, console.warn, and console.error statements from the MCP app client code for a cleaner runtime with no console output. The app now runs silently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements full-screen Tableau visualization embedding in the MCP app using the Embedding API v3. The app now retrieves OAuth tokens via the
get-oauth-tokentool and embeds Tableau views received from MCP tool results.Key changes:
tableau:views:embedscope toget-oauth-tokentool for embedding authenticationembedTableauVizutilities for creating and managing viz elementsgetOAuthTokenToolClientmodule for retrieving OAuth tokens from MCP serverMotivation and Context
The MCP app needed the ability to embed Tableau visualizations when users request views through MCP tools. This enables a seamless experience where tool results are automatically rendered as interactive visualizations rather than just returning metadata.
The critical fix was adding the
tableau:views:embedscope to the OAuth token, which is required by Tableau's Embedding API. Without this scope, the embedding API prompts for login instead of accepting the token.Type of Change
How Has This Been Tested?
getOAuthTokenToolClient.test.ts)embedTableauViz.test.ts)tableau:views:embedscopeRelated Issues
Related to the MCP apps feature development.
Checklist
npm run version. For example, usenpm run version:patchfor a patch version bump.Contributor Agreement
By submitting this pull request, I confirm that: