Offers integration with Jupyter notebooks for interactive demonstrations and testing of tensor database operations through a complete example notebook.
Supports testing of MCP integration with specific test suites for validating tensor operations and database functionality.
Implements a Python client library for programmatic interaction with the Tensorus tensor database through standardized MCP interfaces.
Provides a demo Streamlit application for visualizing and interacting with the Tensorus tensor database functionality.
license: mit title: Tensorus MCP sdk: python emoji: 🐠 colorFrom: blue colorTo: yellow short_description: Model Context Protocol server and client for Tensorus tensor database
Tensorus MCP
Model Context Protocol (MCP) server and client for Tensorus tensor database operations. This package provides a standardized interface for AI agents and LLMs to interact with Tensorus capabilities using the Model Context Protocol.
Features
- MCP Server: Python implementation using
fastmcp
for tensor database operations - MCP Client: Python client library for easy integration with MCP servers
- Tensor Operations: Complete set of tensor manipulation tools via MCP
- Dataset Management: Create, list, and manage tensor datasets
- Demo Mode: Pre-configured mock data for testing and demonstration
Installation
Quick Start
Starting the MCP Server
For web endpoint support:
Demo Mode
For demonstration or testing purposes, run the server in demo mode:
Using the Python Client
MCP Demo Script
Prerequisites
- Tensorus MCP Server running (
python -m tensorus_mcp.server
) - For live mode: Tensorus backend API accessible
- For demo mode: No additional setup required
Demo Scenario: MCP Client Interaction
Goal: Demonstrate how an external AI agent can leverage Tensorus via MCP.
- Start MCP Server:
- Connect via Python Client:
- Conceptual Client Interaction (JavaScript):
Available MCP Tools
Dataset Management
tensorus_list_datasets
: Lists all available datasetstensorus_create_dataset
: Creates a new datasettensorus_delete_dataset
: Deletes an existing dataset
Tensor Operations
tensorus_ingest_tensor
: Ingests a new tensor into a datasettensorus_get_tensor_details
: Retrieves tensor data and metadatatensorus_delete_tensor
: Deletes a specific tensortensorus_update_tensor_metadata
: Updates tensor metadata
Tensor Computations
tensorus_apply_unary_operation
: Operations likelog
,reshape
,transpose
,sum
,mean
tensorus_apply_binary_operation
: Operations likeadd
,subtract
,multiply
,matmul
tensorus_apply_list_operation
: Operations likeconcatenate
andstack
tensorus_apply_einsum
: Einstein summation operations
Diagnostic Tools
mcp_server_status
: Check server operational statusconnection_test
: Lightweight connectivity checkbackend_ping
: Test backend API health endpointbackend_connectivity_test
: Verify backend communication
Configuration
API Key Management
When not in demo mode, provide authentication via:
- Global API Key: Set when starting the server
- Per-Tool API Key: Pass
api_key
parameter in tool calls
Environment Variables
TENSORUS_API_BASE_URL
: Backend API URL (default:https://tensorus-core.hf.space
)TENSORUS_MINIMAL_IMPORT
: Set to1
for lightweight imports
Demo Examples
Interactive Notebook
See examples/demo_notebook.ipynb
for a complete interactive example.
Streamlit App
Launch the demo Streamlit app:
Development
Running Tests
Project Structure
Usage in Claude Desktop
Add to your Claude Desktop MCP settings:
API Reference
TensorusMCPClient Methods
list_datasets()
: Get all available datasetscreate_dataset(name, schema=None)
: Create a new datasetingest_tensor(dataset_name, tensor_shape, tensor_dtype, tensor_data, metadata)
: Add tensor to datasetget_tensor_details(dataset_name, record_id)
: Retrieve tensor informationapply_operation(operation, dataset_name, record_id, **kwargs)
: Apply tensor operations
Contributing
Contributions are welcome! Please feel free to open issues or submit pull requests.
License
MIT License
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Model Context Protocol server and client that enables AI agents and LLMs to interact with Tensorus tensor database for operations like creating datasets, ingesting tensors, and applying tensor operations.
Related MCP Servers
- -securityFlicense-qualityA demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.Last updated -Python
- -securityFlicense-qualityA Model Context Protocol server that enables integration with the TESS API, allowing users to list and manage agents, execute agents with custom messages, and manage files through natural language interfaces.Last updated -TypeScript
- -securityAlicense-qualityA Model Context Protocol server that allows AI tools to connect to and interact with your Directus API, enabling automated access to collections, items, and user data.Last updated -6425TypeScriptMIT License
- -securityAlicense-qualityA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.Last updated -35TypeScriptMIT License