TM

tensorus/mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

1 stars 2 forks 品質 64 トレンド 5MIT

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. - : Python implementation using fastmcp for tensor database operations - : Python client library for easy integration with MCP servers - : Complete set of tensor manipulation tools via MCP - : Create, list, and manage tensor datasets - : Pre-configured mock data for testing and demonstration For demonstration or testing purposes, run the server in demo mode: * Tensorus MCP Server running (python -m tensorus_mcp.server) * For live mode: Tensorus backend API accessible * For demo mode: No additional setup required Demonstrate how an external AI agent can leverage Tensorus via MCP.

README

以下は原文 README の抜粋です。原文を見る。


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

pip install fastmcp
pip install -r requirements.txt

Quick Start

Starting the MCP Server

python -m tensorus_mcp.server

For web endpoint support:

python -m tensorus_mcp.server --transport streamable-http

Demo Mode

For demonstration or testing purposes, run the server in demo mode:

python -m tensorus_mcp.server --demo-mode

Using the Python Client

from tensorus_mcp.client import TensorusMCPClient

async def example():
    async with TensorusMCPClient.from_http("http://localhost:8000/mcp/") as client:
        # List available datasets
        datasets = await client.list_datasets()
        print(f"Available datasets: {datasets}")
        
        # Create a new dataset
        await client.create_dataset("my_dataset")
        
        # Ingest a tensor
        result = await client.ingest_tensor(
            dataset_name="my_dataset",
            tensor_shape=[2, 2],
            tensor_dtype="float32",
            tensor_data=[[1.0, 2.0], [3.0, 4.0]],
            metadata={"source": "example"}
        )
        print(f"Ingested tensor with ID: {result['record_id']}")

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.

  1. Start MCP Server:

    python -m tensorus_mcp.server --demo-mode
    
  2. Connect via Python Client:

    from tensorus_mcp.client import TensorusMCPClient
    
    async def demo():
        async with TensorusMCPClient.from_http("http://localhost:8000/mcp/") as client:
            # List available datasets
            datasets = await client.list_datasets()
            print(f"Available datasets: {datasets}")
            
            # Create a new dataset
            result = await client.create_dataset("demo_dataset")
            print(f"Created dataset: {result}")
            
            # Ingest sample tensor data
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "tensorus": { "command": "python", "args": ["-m", "tensorus_mcp.server"], "env": { "TENSORUS_API_BASE_URL": "https://tensorus-core.hf.space" } } } }