{"id":32593937,"url":"https://github.com/thoughtspot/mcp-server","last_synced_at":"2026-01-18T11:22:45.918Z","repository":{"id":290464493,"uuid":"968361803","full_name":"thoughtspot/mcp-server","owner":"thoughtspot","description":"The ThoughtSpot MCP Server","archived":false,"fork":false,"pushed_at":"2026-01-10T04:19:38.000Z","size":46501,"stargazers_count":24,"open_issues_count":4,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T01:20:50.018Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://agent.thoughtspot.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thoughtspot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-18T00:39:25.000Z","updated_at":"2026-01-10T13:04:40.000Z","dependencies_parsed_at":"2025-04-29T01:30:51.443Z","dependency_job_id":"a823153b-fe3f-473d-8dd2-c9829d74610f","html_url":"https://github.com/thoughtspot/mcp-server","commit_stats":null,"previous_names":["thoughtspot/mcp-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thoughtspot/mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtspot%2Fmcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtspot%2Fmcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtspot%2Fmcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtspot%2Fmcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoughtspot","download_url":"https://codeload.github.com/thoughtspot/mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtspot%2Fmcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28535162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-30T02:02:40.552Z","updated_at":"2026-01-18T11:22:45.909Z","avatar_url":"https://github.com/thoughtspot.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/thoughtspot/visual-embed-sdk/main/static/doc-images/images/ThoughtSpot_appicon.png\" width=120 align=\"center\" alt=\"ThoughtSpot\" /\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n# ThoughtSpot MCP Server \u003cbr/\u003e ![MCP Server](https://badge.mcpx.dev?type=server 'MCP Server') ![Static Badge](https://img.shields.io/badge/cloudflare%20worker-deployed-green?link=https%3A%2F%2Fdash.cloudflare.com%2F485d90aa3d1ea138ad7ede769fe2c35e%2Fworkers%2Fservices%2Fview%2Fthoughtspot-mcp-server%2Fproduction%2Fmetrics) ![GitHub branch check runs](https://img.shields.io/github/check-runs/thoughtspot/mcp-server/main) [![Coverage Status](https://coveralls.io/repos/github/thoughtspot/mcp-server/badge.svg?branch=main)](https://coveralls.io/github/thoughtspot/mcp-server?branch=main) \u003ca href=\"https://developer.thoughtspot.com/join-discord\" target=\"_blank\"\u003e \u003cimg alt=\"Discord: ThoughtSpot\" src=\"https://img.shields.io/discord/1143209406037758065?style=flat-square\u0026label=Chat%20on%20Discord\" /\u003e \u003c/a\u003e\n\n\nThe ThoughtSpot MCP Server provides secure OAuth-based authentication and a set of tools for querying and retrieving relevant data from your ThoughtSpot instance. It's a remote server hosted on Cloudflare.\n\nIf you do not have a Thoughtspot account, create one for free [here](https://thoughtspot.com/trial).\n\nLearn more about [ThoughtSpot](https://thoughtspot.com).\n\nJoin our [Discord](https://developers.thoughtspot.com/join-discord) to get support.\n\n## Table of Contents\n\n- [Connect](#connect)\n- [Usage](#usage)\n- [Demo video](#demo)\n- [Usage in APIs](#usage-in-apis)\n  - [OpenAI / ChatGPT](#openai-responses-api)\n  - [Claude](#claude-mcp-connector)\n  - [Gemini](#gemini-api)\n- [Features](#features)\n  - [Supported transports](#supported-transports)\n- [Manual client registration](#manual-client-registration)\n  - [Associating with a ThoughtSpot instance](#associate-with-a-thoughtspot-instance)\n- [Self hosted](#self-hosted)\n- [Stdio support (fallback)](#stdio-support-fallback)\n  - [How to obtain a TS_AUTH_TOKEN](#how-to-obtain-a-ts_auth_token)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n  - [Local Development](#local-development)\n  - [Endpoints](#endpoints)\n\n\n## Connect\n\nIf using a client which supports remote MCPs natively (Claude.ai etc) then just enter:\n\nMCP Server URL: \n\n```\nhttps://agent.thoughtspot.app/mcp\n```\nPreferred Auth method: Oauth\n\n- For OpenAI ChatGPT Deep Research, add the URL as:\n```js\nhttps://agent.thoughtspot.app/openai/mcp\n```\n\nTo configure this MCP server in your MCP client (such as Claude Desktop, Windsurf, Cursor, etc.) which do not support remote MCPs, add the following configuration to your MCP client settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"ThoughtSpot\": {\n      \"command\": \"npx\",\n      \"args\": [\n         \"mcp-remote\",\n         \"https://agent.thoughtspot.app/mcp\"\n      ]\n    }\n  }\n}\n```\n\nSee the [Troubleshooting](#troubleshooting) section for any errors / more details.\n\n## Usage\n\n1. Once the connection is done, ThoughtSpot datasources would show under the resources section.\n2. Select a datasource (resource), to set the context of your query.\n3. Now you could ask analytical questions, which claude can decide to use the relevant ThoughtSpot tools for.\n\nSee the video below for a complete demo.\n\n## Demo\n\nHere is a demo video using Claude Desktop.\n\nhttps://github.com/user-attachments/assets/72a5383a-7b2a-4987-857a-b6218d7eea22\n\nWatch on [Loom](https://www.loom.com/share/433988d98a7b41fb8df2239da014169a?sid=ef2032a2-6e9b-4902-bef0-57df5623963e)\n\n## Usage in APIs\n\nThoughtSpot's remote MCP server can be used in LLM APIs which support calling MCP tools. \n\nHere are examples with the common LLM providers:\n\n### OpenAI Responses API\n\n```bash\ncurl https://api.openai.com/v1/responses \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n  \"model\": \"gpt-4.1\",\n  \"tools\": [\n    {\n      \"type\": \"mcp\",\n      \"server_label\": \"thoughtspot\",\n      \"server_url\": \"https://agent.thoughtspot.app/bearer/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer $TS_AUTH_TOKEN\",\n        \"x-ts-host\": \"my-thoughtspot-instance.thoughtspot.cloud\"\n      }\n    }\n  ],\n  \"input\": \"How can I increase my sales ?\"\n}'\n```\n\nMore details on how can you use OpenAI API with MCP tool calling can be found [here](https://platform.openai.com/docs/guides/tools-remote-mcp).\n\n\n### Claude MCP Connector\n\n```bash\ncurl https://api.anthropic.com/v1/messages \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: $ANTHROPIC_API_KEY\" \\\n  -H \"anthropic-version: 2023-06-01\" \\\n  -H \"anthropic-beta: mcp-client-2025-04-04\" \\\n  -d '{\n    \"model\": \"claude-sonnet-4-20250514\",\n    \"max_tokens\": 1000,\n    \"messages\": [{\n      \"role\": \"user\", \n      \"content\": \"How do I increase my sales ?\"\n    }],\n    \"mcp_servers\": [\n      {\n        \"type\": \"url\",\n        \"url\": \"https://agent.thoughtspot.app/bearer/mcp\",\n        \"name\": \"thoughtspot\",\n        \"authorization_token\": \"$TS_AUTH_TOKEN@my-thoughtspot-instance.thoughtspot.cloud\"\n      }\n    ]\n  }'\n```\n\nNote: In the `authorization_token` field we have suffixed the ThoughtSpot instance host as well with the `@` symbol to the `TS_AUTH_TOKEN`.\n\nMore details on Claude MCP connector [here](https://docs.anthropic.com/en/docs/agents-and-tools/mcp-connector).\n\n\n### Gemini API\n\nMCP tools can be used with the Gemini Python/Typescript SDK. Here is an example using typescript:\n\n```typescript\nimport { GoogleGenAI, FunctionCallingConfigMode , mcpToTool} from '@google/genai';\nimport { Client } from \"@modelcontextprotocol/sdk/client/index.js\";\nimport { StreamableHTTPClientTransport } from \"@modelcontextprotocol/sdk/client/streamableHttp.js\";\n\n// Create server parameters for stdio connection\nconst serverParams = new StreamableHTTPClientTransport(new URL(\"https://agent.thoughtspot.app/bearer/mcp\"), {\n    requestInit: {\n        headers: {\n            \"Authorization\": \"Bearer $TS_AUTH_TOKEN\", // Read below how to get the $TS_AUTH_TOKEN\n            \"x-ts-host\": \"my-thoughtspot-instance.thoughtspot.cloud\"\n        },\n    }\n});\n\nconst client = new Client(\n  {\n    name: \"example-client\",\n    version: \"1.0.0\"\n  }\n);\n\n// Configure the client\nconst ai = new GoogleGenAI({});\n\n// Initialize the connection between client and server\nawait client.connect(serverParams);\n\n// Send request to the model with MCP tools\nconst response = await ai.models.generateContent({\n  model: \"gemini-2.5-flash\",\n  contents: `What is the weather in London in ${new Date().toLocaleDateString()}?`,\n  config: {\n    tools: [mcpToTool(client)],  // uses the session, will automatically call the tool\n    // Uncomment if you **don't** want the sdk to automatically call the tool\n    // automaticFunctionCalling: {\n    //   disable: true,\n    // },\n  },\n});\nconsole.log(response.text)\n\n// Close the connection\nawait client.close();\n```\n\nRead [this](https://ai.google.dev/gemini-api/docs/function-calling?example=meeting#mcp), for more details on Gemini API MCP tool calling.\n\nAn example using Google ADK + Python can be found [here](https://github.com/thoughtspot/developer-examples/tree/main/mcp/python-google-adk-trusted-auth).\n\n#### Gemini CLI extenstions\n\nThoughtSpot MCP server can also be installed as a Gemini CLI extension.\n\n```bash\ngemini extensions install https://github.com/thoughtspot/mcp-server\n```\n\nRead more about Gemini CLI [here](https://github.com/google-gemini/gemini-cli).\n\n\n### How to get TS_AUTH_TOKEN for APIs ?\n\nFor API usage, you would the token endpoints with a `secret_key` to generate the `API_TOKEN` for a specific user/role, more details [here](https://developers.thoughtspot.com/docs/api-authv2#trusted-auth-v2). \n\n\n## Features\n\n- **OAuth Authentication**: Access your data, as yourself.\n  - Dynamic Client Registration (DCR) support.\n  - Any MCP host is allowed. Let's make the world fact driven.\n- **Tools**:\n  - `ping`: Test connectivity and authentication.\n  - `getRelevantQuestions`: Get relevant data questions from ThoughtSpot analytics based on a user query.\n  - `getAnswer`: Get the answer to a specific question from ThoughtSpot analytics.\n  - `createLiveboard`: Create a liveboard from a list of answers.\n  - `getDataSourceSuggestions`: Get datasource suggestions for a given query.\n- **MCP Resources**:\n   - `datasources`: List of ThoughtSpot Data models the user has access to.\n\n### Supported transports\n\n- SSE [https://agent.thoughtspot.app/sse]()\n- Streamed HTTP [https://agent.thoughtspot.app/mcp]()\n\n\n## Manual client registration\n\nFor MCP hosts which do not(yet) support Dynamic client registration, or they require statically adding Oauth Client Id etc. Go to [this](https://agent.thoughtspot.app/clients) page, to register a new client and copy the details over. The most relevant values are `Oauth Client Id` and `Oauth Client Secret` which should be added when adding ThoughtSpot as an MCP connector in the MCP client (ChatGPT/Claude etc). The generated client details are only available when they are generated and are NOT available later for reference.\n\n### Associate with a ThoughtSpot instance\n\nManual client registration also allows to associate with a specific ThoughtSpot instance, so that your users do not have to enter the Thoughtspot instance URL when doing the authorization flow. While registering the Oauth client add `ThoughtSpot URL` to the appropriate value.\n\n## Self hosted\n\nUse the published docker image to deploy the MCP server in your own environment.\n\nSee [this](deploy/README.md) for details.\n\n## Stdio support (fallback)\n\nIf you are unable to use the remote MCP server due to connectivity restrictions on your Thoughtspot instance. You could use the `stdio` local transport using the `npm` package.\n\nHere is how to configure `stdio` with MCP Client:\n\n```json \n{\n  \"mcpServers\": {\n    \"ThoughtSpot\": {\n      \"command\": \"npx\",\n      \"args\": [\n         \"@thoughtspot/mcp-server\"\n      ],\n      \"env\": {\n         \"TS_INSTANCE\": \"\u003cyour Thoughtspot Instance URL\u003e\",\n         \"TS_AUTH_TOKEN\": \"\u003cThoughtSpot Access Token\u003e\"\n      }\n    }\n  }\n}\n```\n\n### How to obtain a `TS_AUTH_TOKEN` ?\n\n- Go to ThoughtSpot =\u003e _Develop_ =\u003e _Rest Playground v2.0_\n- _Authentication_ =\u003e _Get Full access token_\n- Scroll down and expand the \"body\"\n- Add your \"username\" and \"password\".\n- Put whatever \"validity_time\" you want the token to be.\n- Click on \"Try it out\" on the bottom right.\n- You should get a token in the response, thats the bearer token.\n\n#### Alternative way to get `TS_AUTH_TOKEN`\n- Login to the ThoughtSpot instance as you would normally.\n- Opem in a new tab this URL:\n  - https://your-ts-instance/api/rest/2.0/auth/session/token\n- You will see a JSON response, copy the \"token\" value (without the quotes).\n- This is the token you could use.\n\n### Troubleshooting\n\n\u003e Oauth errors due to CORS/SAML.\n\nMake sure to add the following entries in your ThoughtSpot instance:\n\n*CORS*\n\n- Go to ThoughtSpot =\u003e _Develop_ =\u003e Security settings\n- Click \"Edit\"\n- Add \"agent.thoughtspot.app\" to the the \"CORS whitelisted domains\". \n\n*SAML* (need to be Admin)\n\n- Go to ThoughtSpot =\u003e _Develop_\n- Go to \"All Orgs\" Tab on the left panel if there is one.\n- Click \"Security settings\"\n- Click \"Edit\"\n- Add \"agent.thoughtspot.app\" to the the \"SAML redirect domains\". \n\n\u003e MCP server install error due to node issues\n\n- Make sure node is installed on your machine.\n- Make sure the node version is \u003e=18\n- Check the node version by using the command `node -v`\n\n\u003e 500 error from MCP server\n\n- Make sure the ThoughtSpot cluster the MCP server is connected to is up and running.\n- If the error persists, please collect the logs that you get from the MCP client and the approximate time when the issue occurred.\n- Reach out on [Discord](https://developers.thoughtspot.com/join-discord) to get support.\n- Create a issue on this repository to get help.\n- Submit a [ThoughtSpot support case](https://community.thoughtspot.com/s/article/How-to-submit-a-ThoughtSpot-Support-Case) with all the artifacts.\n\n\u003e Stale MCP auth\n\n- If for some reason the ThoughtSpot MCP server is failing authentication repeatedly, you can do `rm -rf ~/.mcp-auth`.\n- This will remove all stale authentication info, and restart the auth flow again.\n\n## Contributing\n\n### Local Development\n\n1. **Install dependencies**:\n   ```sh\n   npm install\n   ```\n2. **Set up environment variables**:\n   - Copy `.dev.vars` and fill in your ThoughtSpot instance URL and access token.\n3. **Start the development server**:\n   ```sh\n   npm run dev\n   ```\n\n### Endpoints\n\n- `/mcp`: MCP HTTP Streaming endpoint\n- `/sse`: Server-sent events for MCP\n- `/api`: MCP tools exposed as HTTP endpoints\n- `/authorize`, `/token`, `/register`: OAuth endpoints\n- `/bearer/mcp`, `/bearer/sse`: MCP endpoints as bearer auth instead of Oauth, mainly for use in APIs or in cases where Oauth is not working.\n\nMCP Server, © ThoughtSpot, Inc. 2025\n","funding_links":[],"categories":["Data \u0026 Analytics","Data Analysis \u0026 Exploration Mcp Servers","📦 Other"],"sub_categories":["Data Platforms"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtspot%2Fmcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoughtspot%2Fmcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtspot%2Fmcp-server/lists"}