
tensorus/mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
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
fastmcpfor 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.
-
Start MCP Server:
python -m tensorus_mcp.server --demo-mode -
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
설치
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"
}
}
}
}