Skip to content

Sixt/tensorlake-mcp

Repository files navigation

Tensorlake MCP Server

An MCP (Model Context Protocol) server that provides access to Tensorlake's document parsing capabilities.

Features

  • Document Upload: Upload documents from URLs, local file paths, or data URIs
  • Document Parsing: Parse documents into structured data using Tensorlake's AI-powered parsing engine
  • Document Management: List and delete documents in your session
  • MCP Resources: Access parsed documents as MCP resources for seamless integration
Tensorlake MCP Server Demo

Prerequisites

Installation

Install using go install

go install github.com/sixt/tensorlake-mcp@latest

Locate the binary in your GOPATH/bin directory or use the where command to find it. For example:

$ where tensorlake-mcp

/Users/<username>/go/bin/tensorlake-mcp

Building from Source

# Clone the repository
git clone <repository-url>
cd tensorlake-mcp

# Build the server
go build -o tensorlake-mcp .

The binary will be created as tensorlake-mcp in the current directory.

Configuration

The server requires the following environment variables:

  • TENSORLAKE_API_KEY (required): Your Tensorlake API key
  • TENSORLAKE_API_BASE_URL (optional): The base URL for the Tensorlake API. Defaults to https://api.tensorlake.ai/documents/v2

Setup

The MCP configuration is:

{
  "mcpServers": {
    "tensorlake-mcp": {
      "command": "/absolute/path/to/tensorlake-mcp",
      "env": {
        "TENSORLAKE_API_KEY": "your-api-key-here"
      }
    }
  }
}

See these articles for setting up the MCP server in your host application:

Usage

Once configured, the MCP server provides the following tools:

upload_document

Upload a document from a URL, local path, or data URI.

Parameters:

  • url (string, required): The URL of the document to upload
    • URL: https://example.com/document.pdf
    • Local file: file:///path/to/document.pdf
    • Data URI: data:application/pdf;base64,...

Returns: A document_id to be used in subsequent operations

parse_document

Parse an uploaded document into structured data.

Parameters:

  • document_id (string, required): The ID returned from upload_document
  • parse_id (string, optional): The parse ID to check status or get results
  • sync (boolean, optional): If true, wait for parsing to complete. If false, start parsing in the background

Returns: Parse ID, status, and results (if completed)

list_documents

List all documents in the current session.

Returns: A list of all uploaded documents with their metadata

delete_document

Delete a document from Tensorlake.

Parameters:

  • document_id (string, required): The ID of the document to delete

Resources

The server also exposes a tensorlake://documents resource that provides access to all documents and their metadata.

Example Interaction

User: Upload and parse this PDF document at https://example.com/invoice.pdf

AI: [Uses upload_document tool]
    [Uses parse_document tool with sync=true]
    Here's the parsed content from your invoice...

Development

Running in Development

# Set environment variables
export TENSORLAKE_API_KEY="your-api-key"

# Run the server
go build && ./tensorlake-mcp

Testing with MCP Inspector

You can test the server using the MCP Inspector:

npx @modelcontextprotocol/inspector /absolute/path/to/tensorlake-mcp

License

Copyright 2025 SIXT SE. Licensed under the Apache License, Version 2.0. See LICENSE for details.

Sixt logo

About

🤖 Tensorlake MCP Server. Maintained in collaboration w. Tensorlake & SIXT.

Topics

Resources

License

Stars

Watchers

Forks

Languages