dshappir/sisense-local-mcp-server
If you are the rightful owner of sisense-local-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Sisense Local MCP Server is a specialized server designed to facilitate model context protocol operations, providing a robust environment for managing and deploying machine learning models locally.
Sisense Local MCP Server
A Model Context Protocol (MCP) server that provides access to Sisense data and analytics through a standardized interface. This server allows AI assistants and other MCP clients to interact with Sisense dashboards, data sources, and execute queries.
Features
- 🔌 MCP Protocol Support - Full Model Context Protocol implementation
- 📊 Sisense Integration - Access to dashboards, data sources, and analytics
- 🛠️ Tool Support - 8 built-in tools for Sisense operations
- 📚 Resource Access - Browse and read Sisense dashboards as resources
- 🔐 Authentication - Support for Sisense API tokens
- 🧪 Comprehensive Testing - Full test coverage with Jest
- 📝 TypeScript - Fully typed with modern TypeScript features
- 🎨 Code Quality - ESLint, Prettier, and modern development tools
Prerequisites
- Node.js >= 22.0.0
- npm >= 10.0.0
- Access to a Sisense instance + SDK API
Installation
-
Clone the repository:
git clone git@github.com:dshappir/sisense-local-mcp-server.git cd sisense-local-mcp-server -
Install dependencies:
npm install -
Set up environment variables:
cp env.example .envEdit
.envwith your Sisense configuration:# Sisense Configuration SISENSE_URL=https://your-sisense-instance.com SISENSE_API_KEY=your-api-key # Server & Debug Settings ... -
Build the project:
npm run build
Configuring Cursor
To use this MCP server with Cursor IDE, follow these steps:
Step 1: Build the Project
Ensure the project is built before configuring Cursor (see above).
This creates the dist/ directory with the compiled JavaScript files.
Step 2: Get the Absolute Path
You'll need the absolute path to the built server file (dist/index.js). You can get this by:
On macOS/Linux:
pwd # Shows current directory
# Example output: /Users/username/sisense-local-mcp-server
# Full path would be: /Users/username/sisense-local-mcp-server/dist/index.js
On Windows:
cd
REM Example output: C:\Users\username\sisense-local-mcp-server
REM Full path would be: C:\Users\username\sisense-local-mcp-server\dist\index.js
Step 3: Configure in Cursor Settings
-
Open Cursor Settings:
- Press
Cmd + Shift + P(Mac) orCtrl + Shift + P,(Windows/Linux) to open Command Palette - Select
View: Open MCP Settings
- Press
-
Add a New MCP Server:
- Click the
+ Add New MCP Serverbutton
- Click the
-
Configure the Server: In the
mcp.jsonfile that opens for editing, add the following JSON fragment, updating theargspath accordingly:"sisense": { "command": "node", "args": [ "${userHome}/sisense-local-mcp-server/dist/index.js" ], "env": { "SISENSE_URL": "<running Sisense instance URL>", "SISENSE_API_KEY": "<Sisense API key>" } }Close the the tab (saving the file).
-
Manage the MCP server:
- In the
Installed MCP serverssection you should see a new entry with the namesisense - It should have a green dot next to it, indicating that it is running. If not, try to disable/enable it, and restart Cursor
- It should show that it has tools enabled
- In the
Step 4: Verify the Configuration
- Try asking Cursor to use one of the Sisense tools, for example:
- "List all sisense data models"
- "Get information about the sisense server"
Troubleshooting Cursor Configuration
If the server doesn't start or tools aren't available:
-
Check Build Status:
- Ensure you've run
npm run buildsuccessfully - The
dist/directory should exist and contain compiled files
- Ensure you've run
-
Check the Path:
- Ensure the absolute path to
dist/index.jsis correct - Verify the file exists:
ls dist/index.js(Mac/Linux) ordir dist\index.js(Windows)
- Ensure the absolute path to
-
Check Sisense settings:
- Verify Sisense instance exists and is working at the URL specified
- Make sure API key is correct and up-to-date
-
Check Cursor Logs:
- Open Cursor's developer console for error messages
- Look for MCP server connection errors
-
Manual Test:
- Try running the server manually to ensure it works:
echo '{"jsonrpc":"2.0", "id":1, "method":"tools/list", "params":{}}' | node dist/index.js - The server should start without errors (it will wait for input on stdin)
- Show output a JSON of the available tools, including input/output configuration
- Try running the server manually to ensure it works:
Usage
Development Mode
Start the server in development mode with hot reloading:
npm run dev
Production Mode
Build and start the server:
npm run build
npm start
Testing
Run the test suite:
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage
Code Quality
# Lint code
npm run lint
# Fix linting issues
npm run lint:fix
# Format code
npm run format
# Check formatting
npm run format:check
# Type checking
npm run type-check
Debugging
The project is configured for debugging with Cursor/VS Code using Node.js inspector.
Command Line Debugging
# Debug production build (--inspect)
npm run debug
# Debug production build (--inspect-brk - breaks on first line)
npm run debug:brk
# Debug development mode (--inspect)
npm run debug:dev
# Debug development mode (--inspect-brk - breaks on first line)
npm run debug:dev:brk
Cursor/VS Code Debugging
-
Open the project in Cursor/VS Code
-
Go to the Debug panel (Ctrl+Shift+D / Cmd+Shift+D)
-
Select a debug configuration:
Debug Production (--inspect)- Debug built applicationDebug Production (--inspect-brk)- Debug built application with break on startDebug Development (--inspect)- Debug TypeScript source directlyDebug Development (--inspect-brk)- Debug TypeScript source with break on startAttach to Process- Attach to an already running debug processDebug Tests- Debug Jest tests
-
Set breakpoints by clicking in the gutter next to line numbers
-
Start debugging by pressing F5 or clicking the play button
Debug Configuration Details
- Production debugging uses the compiled JavaScript in
dist/ - Development debugging uses TypeScript source files directly with
tsx - Environment variables are set for optimal debugging (LOG_LEVEL=debug, DEBUG=true)
- Source maps are enabled for proper TypeScript debugging
- Node internals are excluded from debugging for cleaner experience
Attaching to External Process
If you have a process already running with --inspect or --inspect-brk:
- Start your process:
npm run debugornpm run debug:brk - Select "Attach to Process" in the debug panel
- The debugger will attach to the running process on port 9229
Available Tools
The MCP server provides the following tools:
Server Information
get_server_info- Get information about the Sisense server
Data Sources
list_data_sources- List all available data sourceslist_cubes- List all available cubesget_cube_metadata- Get metadata for a specific cube
Dashboards
list_dashboards- List all dashboardsget_dashboard- Get details of a specific dashboardget_dashboard_widgets- Get widgets from a specific dashboard
Query Execution
execute_query- Execute a query against Sisense
Available Resources
The server exposes Sisense dashboards as MCP resources:
sisense://dashboard/{id}- Access dashboard data as JSON
Configuration
Environment Variables
| Variable | Description | Default | Required |
|---|---|---|---|
MCP_SERVER_NAME | Server name | sisense-local-mcp-server | No |
MCP_SERVER_VERSION | Server version | 1.0.0 | No |
MCP_SERVER_DESCRIPTION | Server description | Local (STD) Sisense MCP server | No |
LOG_LEVEL | Log level | info | No |
SISENSE_URL | Sisense instance URL | - | Yes |
SISENSE_API_KEY | API key for authentication | - | Yes |
NODE_ENV | Environment | development | No |
DEBUG | Debug mode | false | No |
Project Structure
src/
├── config/
│ └── environment.ts # Environment configuration
├── server/
│ └── mcp-server.ts # Main MCP server implementation
├── services/
│ └── sisense.ts # Sisense API service
├── types/
│ └── index.ts # TypeScript type definitions
├── utils/
│ └── logger.ts # Logging utility
└── index.ts # Application entry point
tests/
├── setup.ts # Test setup
├── services/
│ └── sisense.test.ts # Sisense service tests
├── server/
│ └── mcp-server.test.ts # MCP server tests
└── utils/
└── logger.test.ts # Logger tests
Development
Code Style
This project uses:
- TypeScript with strict type checking
- ESLint for code linting
- Prettier for code formatting
- Jest for testing
Adding New Tools
- Add the tool definition to
getAvailableTools()inmcp-server.ts - Implement the tool logic in
callTool()method - Add corresponding methods to
SisenseServiceif needed - Write tests for the new tool
Adding New Resources
- Add resource handling in
getAvailableResources()andreadResource()methods - Implement the resource fetching logic
- Add tests for the new resource type
Troubleshooting
Common Issues
-
Authentication Errors
- Verify your Sisense credentials are correct
- Check that the Sisense URL is accessible
- Ensure you're using either token or username/password authentication
-
Connection Issues
- Verify the Sisense URL is correct and accessible
- Check network connectivity
- Ensure proper firewall settings
-
Build Issues
- Ensure you're using Node.js >= 22.0.0
- Clear node_modules and reinstall:
rm -rf node_modules && npm install - Check TypeScript configuration
Debug Mode
Enable debug logging by setting DEBUG=true in your .env file:
DEBUG=true
LOG_LEVEL=debug
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Run tests:
npm test - Run linting:
npm run lint - Commit your changes:
git commit -m 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
License
MIT License - see file for details.
Support
For issues and questions:
- Check the troubleshooting section above
- Review existing issues in the repository
- Create a new issue with detailed information about your problem