{
  "markdown": "# Sisense MCP Server\n\nA Model Context Protocol (MCP) server that provides integration with Sisense analytics platform. This server enables LLMs to interact with Sisense data models and create charts programmatically.\n\n## Features\n\n- **Transport**: Streamable HTTP (`streamable-http`) for HTTP-based MCP clients (for example Claude Desktop, Cursor)\n- **MCP tools** (three by default; optional fourth when enabled):\n  - `getDataSources`: Retrieve Sisense data sources (or data models)\n  - `getDataSourceFields`: List all available fields for a specific data source\n  - `buildChart`: Build charts from natural language prompts\n  - `buildQuery` (optional): Run analytics queries when `TOOL_BUILD_QUERY_ENABLED` / `toolBuildQueryEnabled` is enabled\n- **MCP Apps**: When used in MCP Apps–capable clients (for example Claude), `buildChart` exposes an interactive View that renders the chart in an iframe within the app.\n- **Per-session authentication**: Sisense credentials via URL parameters and/or server environment variables\n- **TypeScript**: Full type safety and modern ESM support\n- **Lightweight**: Pure Node.js HTTP server, no heavy frameworks\n- **Fast**: Optimized for Bun runtime, also runs on Node.js\n\n## Documentation\n\n- [Quick start](docs/guides/quickstart.md) — clone, `.env`, run, MCP client setup\n- [Configuration](docs/guides/configuration.md) — credentials, tunneling, feature flags, URL examples\n- [FAQ](docs/guides/faq.md) — common questions and troubleshooting\n- [Usage examples](docs/guides/usage-examples.md) — prompts and workflows\n\n## Prerequisites\n\n- **Node.js >= 18.0.0** (required for local development and `npm`)\n- **Bun** for running project scripts (`dev`, `build`, `start`, tests): the `bun` package is a **devDependency**, so after `npm install` or `bun install` the Bun binary is available under `node_modules/.bin`—a global Bun install is not required. A global [Bun](https://bun.sh) install is optional.\n- Sisense instance with API access\n- Sisense API token\n- **Cloud-Linked Features** enabled on your Sisense instance (and an LLM provider configured if using Bring Your Own Key (BYOK)). Required for natural-language tools such as `buildChart` and `buildQuery`. See [Generative AI (Cloud-Linked Features)](https://docs.sisense.com/main/SisenseLinux/genai.htm). This is separate from your MCP client's LLM (e.g. Claude in Cursor).\n- Playwright Chromium (installed automatically by `bun install` / `npm install` via `postinstall`)\n\n## Installation\n\n```bash\nbun install\n# or\nnpm install\n```\n\n## Usage\n\nStart the server:\n\n```bash\n# Development mode (hot reload)\nbun run dev\n# or\nnpm run dev\n\n# Production mode\nbun run build && bun run start\n# or\nnpm run build && npm run start\n```\n\nSessions are in-memory — chart state is lost if the server restarts.\n\nThe server prints something like the following (port defaults to **3001**, or `PORT` if set):\n\n```text\nSisense MCP Server running on http://localhost:3001\n\nConnect with:\n  http://localhost:3001/mcp?sisenseUrl=<SISENSE_URL>&sisenseToken=<SISENSE_TOKEN>\n  Or set SISENSE_URL and SISENSE_TOKEN in the environment and use http://localhost:3001/mcp\n\nOptional feature-flag query params (override env vars per connection):\n  mcpAppEnabled=true|false, toolBuildQueryEnabled=true|false, toolBuildChartNarrativeEnabled=true|false\n\nEndpoints:\n  Health: http://localhost:3001/health\n  Screenshots: http://localhost:3001/screenshots/\n```\n\n### Connecting your MCP client\n\nUse an MCP **streamable HTTP** URL. For Cursor, Claude Desktop, and similar clients, add a server entry with the MCP path (not a shell command such as `bun run dev` or `npm run dev`).\n\nIf `SISENSE_URL` and `SISENSE_TOKEN` are set in the **server** environment (for example in `.env` loaded by the process that runs `bun run dev` or `npm run dev`), the client URL does not need to include credentials:\n\n```json\n{\n  \"mcpServers\": {\n    \"sisense-analytics\": {\n      \"url\": \"http://localhost:3001/mcp\"\n    }\n  }\n}\n```\n\n**Note:** Depending on your network or client environment, the localhost HTTP setup may not connect. In those cases, you will need to expose your local server publicly via HTTPS using a proxy service such as [ngrok](https://ngrok.com/). Point the client at your HTTPS tunnel URL with the same `/mcp` path (and query parameters if you are not using server env credentials).\n\n**Credentials:** If you do not use server env vars, put `sisenseUrl` and `sisenseToken` on the MCP URL as query parameters (URL params take precedence over env when both are present). Always percent-encode each value — see [Configuration: URL encoding](docs/guides/configuration.md#url-encoding-query-params) for details and examples.\n\nAlternative connection patterns (placeholders only; use encoded values for real credentials):\n\n```text\nhttp://localhost:3001/mcp?sisenseUrl=https://your-instance.sisense.com&sisenseToken=your-api-token\n```\n\nWith `SISENSE_URL` and `SISENSE_TOKEN` in the server environment only:\n\n```text\nhttp://localhost:3001/mcp\n```\n\nBehind a public HTTPS tunnel (example):\n\n```text\nhttps://your-ngrok-url.ngrok-free.app/mcp?sisenseUrl=https://your-instance.sisense.com&sisenseToken=your-api-token\n```\n\n### Claude (claude.ai and Desktop): Sisense CORS for interactive charts\n\nIn MCP App mode (the default), Anthropic Claude renders charts inside the MCP content UI—on **claude.ai** or **Claude Desktop**. The browser loads your Sisense instance from origins under `*.claudemcpcontent.com`, so Sisense must allow those origins or the widget fails with a network or CORS error.\n\nIn your Sisense instance, go to **Admin** → **Security Settings** → **CORS Allowed Origins** and add:\n\n`https://*.claudemcpcontent.com`\n\nUse this **subdomain wildcard** form. A single origin such as `https://claudemcpcontent.com` (no `*.`) may not match the actual frame origins and charts can still fail to load.\n\nMore context: [FAQ: Claude MCP App charts and CORS](docs/guides/faq.md#claude-mcp-app-charts-and-network-or-cors-errors).\n\n## Configuration\n\n| Parameter      | Description                                                                                                                                     |\n| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |\n| `sisenseUrl`   | Full URL to your Sisense instance (e.g., `https://instance.sisense.com`). In the query string, pass the value **percent-encoded**.              |\n| `sisenseToken` | Sisense API authentication token. In the query string, pass the value **percent-encoded** (required if the token contains `&`, `=`, `+`, etc.). |\n| `PORT`         | (Optional) Server port, defaults to 3001                                                                                                        |\n\nThe server automatically derives its public base URL from request headers, so it works correctly behind proxies like ngrok. For how to build encoded MCP URLs, see [URL encoding for query parameters](docs/guides/configuration.md#url-encoding-query-params).\n\n### Optional feature-flag query parameters\n\nDefaults suit most setups; change flags when you need a specific client behavior. For **when to use each flag**, copy-paste URL patterns, and env vs query string, see [docs/guides/configuration.md](docs/guides/configuration.md).\n\nThese query params override the corresponding env vars on a per-connection basis. Accepted values: `true`, `false`, `1`, `0` (case-insensitive).\n\n| Query parameter                  | Env var equivalent                   | Default | Description                                                                                                              |\n| -------------------------------- | ------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------ |\n| `mcpAppEnabled`                  | `MCP_APP_ENABLED`                    | `true`  | Renders the chart in an interactive app UI (supported in Claude); set to `false` for tool mode (image/screenshot output) |\n| `toolBuildQueryEnabled`          | `TOOL_BUILD_QUERY_ENABLED`           | `false` | Enable the `buildQuery` tool for executing analytics queries                                                             |\n| `toolBuildChartNarrativeEnabled` | `TOOL_BUILD_CHART_NARRATIVE_ENABLED` | `true`  | Include NLG narrative/insights in the build chart tool response                                                          |\n\nExample URL with all three overrides (encode `sisenseUrl` and `sisenseToken` values when they are not simple alphanumeric placeholders):\n\n```text\nhttp://localhost:3001/mcp?sisenseUrl=https://your-instance.sisense.com&sisenseToken=your-api-token&mcpAppEnabled=false&toolBuildQueryEnabled=true&toolBuildChartNarrativeEnabled=false\n```\n\n## Development\n\n```bash\n# Run server in development mode with hot reload\nbun run dev\n# or npm run dev\n\n# Build the project (View + server)\nbun run build\n# or npm run build\n\n# Build only the analytics View (dist/view.html)\nbun run build:view\n# or npm run build:view\n\n# Run tests\nbun test\n# or npm test (same as npm run test)\n\n# Type checking\nbun run type-check\n# or npm run type-check\n\n# Lint\nbun run lint\n# or npm run lint\n```\n\n## Security Considerations\n\n⚠️ NEVER commit credentials to version control\n\n⚠️ Use secret managers or vaults - NOT environment variables in production\n\n⚠️ NEVER bind to 0.0.0.0 in production - use 127.0.0.1 or Unix socket\n\n⚠️ Recommended: Use dev or staging Sisense when you have them. Autonomous AI clients can issue many API calls, and prompts can be ambiguous. Non-production reduces the impact of mistakes and surprises.\n\n⚠️ Enable authentication - never run without auth\n\n⚠️ Approve EVERY tool call - review all parameters before execution\n\n⚠️ Create dedicated Sisense service account with minimum required permissions\n\n⚠️ Rotate credentials regularly (every 90 days recommended)\n",
  "bytes": 9975,
  "sha": "b6f95c0cbec8cc105bfcde59d7233f1d298b1eeb200faf96d56a18d3b3928ad7",
  "repo_slug": "sisense/sisense-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_sisense_sisense_mcp_server_f052feb8/readme"
}