# tanss-mcp-server
## 基本信息
- Slug: `pronet-systems-tanss-mcp-server`
- Source: modelscope
- Publisher: @pronet-systems/tanss-mcp-server
- Categories: customer-support / erp-systems / project-management
- Hosted: No
- License: Unknown
- Source URL: https://www.modelscope.cn/mcp/servers/@pronet-systems/tanss-mcp-server
## 简介
暂无描述。
## 安装提示

```bash
git clone <repository-url> cd tanss-mcp
```

## MCP Server 详情

# TANSS MCP Server

A comprehensive Model Context Protocol (MCP) server for the TANSS API, providing seamless integration with AI assistants like Claude or n8n.

---

## What is this?

The TANSS MCP Server bridges the gap between AI assistants (like Claude/n8n) and the TANSS ticket management system. It exposes **238 API endpoints** through **237 tools** that can be called by AI assistants to:

-  Create and manage tickets
-  Handle phone calls and call assignments
-  Manage chats and communications
-  Track IT assets (PCs, peripherals, components)
-  Manage employees and companies
-  Track time and timestamps
-  Create offers and invoices
-  Handle remote support sessions
-  Monitor systems and devices
- And much more!

---

## Features

 **238 API endpoints** covering all TANSS functionality  
 **237 tools** (e.g., `create_ticket`)  
 **Dual transport modes**: stdio and SSE (HTTP)  
 **Role-based authentication**: Support for 6 different token types  
 **Automatic token management**: Bearer prefix handling and role-specific token prioritization

---

## Quick Start

### Prerequisites

- Python 3.8+
- TANSS account with API access
- API token from TANSS

### Installation

1. **Clone the repository**
```bash
git clone <repository-url>
cd tanss-mcp
```

2. **Install dependencies**
```bash
pip install -r requirements.txt
```

3. **Configure the server**

Create `config.ini` from the example:
```bash
cp config.ini.example config.ini
```

Edit `config.ini` and add your TANSS credentials:
```ini
[tanss]
base_url = https://your-tanss-instance.com/backend/
api_token = your_api_token_here

[credentials]
username = your_username
password = your_password
```

4. **Start the server**

**For Claude Desktop (stdio mode):**
```bash
python3 server.py --mode stdio
```

**For web clients (SSE mode):**
```bash
python3 server.py --mode sse --host 0.0.0.0 --port 3001
```

---

## Configuration

### Basic Configuration

Minimal `config.ini`:
```ini
[tanss]
base_url = https://your-tanss.com/backend/
api_token = your_access_token

[sse]
host = 127.0.0.1
port = 3001
```

### Advanced Configuration with Role-Specific Tokens

For enhanced security and permissions, configure role-specific tokens:

```ini
[tanss]
base_url = https://your-tanss.com/backend/
api_token = your_main_token

# Optional: Role-specific tokens for specialized operations
erp_api_token = Bearer your_erp_token
phone_api_token = Bearer your_phone_token
remote_support_api_token = Bearer your_remote_support_token
monitoring_api_token = Bearer your_monitoring_token
device_management_api_token = Bearer your_device_mgmt_token
timestamp_api_token = Bearer your_timestamp_token

[sse]
host = 192.168.0.153
port = 3001
reload = false
log_level = info

[credentials]
username = your_username
password = your_password
```

---

## Usage

### With Claude Desktop

Add to your Claude Desktop MCP settings (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

```json
{
  "mcpServers": {
    "tanss": {
      "command": "python3",
      "args": ["/absolute/path/to/tanss-mcp/server.py"],
      "cwd": "/absolute/path/to/tanss-mcp"
    }
  }
}
```

Restart Claude Desktop, and you'll have access to all TANSS tools!

### As SSE Server

```bash
# Start server
python3 server.py --mode sse --host 0.0.0.0 --port 3001

# The server will be available at:
# SSE endpoint: http://your-host:3001/sse
# Messages endpoint: http://your-host:3001/messages
```

### Getting Your API Token

Use the `login` tool or the test script:

```bash
# Start SSE server first
python3 server.py --mode sse

# In another terminal, test login
python3 test_login.py
```

This will generate access and refresh tokens you can use in `config.ini`.

---

## Available Tools

The server provides **237 human-friendly tools** across **41 categories**.

### Most Common Tools

####  Ticket Management (37 tools)
- `create_ticket` - Create a new ticket
- `get_ticket` - Get ticket details
- `update_ticket` - Update an existing ticket
- `delete_ticket` - Delete a ticket
- `get_my_tickets` - Get your assigned tickets
- `get_all_tickets` - Get all tickets
- `get_company_tickets` - Get tickets for a company
- `add_ticket_comment` - Add a comment to a ticket
- `get_ticket_history` - View ticket change history
- `upload_ticket_file` - Upload a file to a ticket

####  Time Tracking (15 tools)
- `create_timestamp` - Clock in/out or log time
- `get_timestamps` - Get time records
- `close_day` - Close the day for time tracking
- `get_timestamp_statistics` - Get time statistics

####  Chats (10 tools)
- `create_chat` - Start a new chat
- `send_chat_message` - Send a message
- `close_chat` - Close a chat
- `reopen_chat` - Reopen a closed chat
- `add_chat_participant` - Add someone to a chat

####  Phone Calls (8 tools)
- `create_call` - Log a phone call
- `get_my_calls` - Get your calls
- `identify_caller` - Identify a caller by phone number
- `assign_call_to_employee` - Assign a call

####  Remote Support (9 tools)
- `create_remote_support` - Create a remote support session
- `list_remote_supports` - List all remote support sessions
- `assign_device_to_remote_support` - Link a device
- `assign_employee_to_remote_support` - Assign a technician

####  ERP Integration (15 tools)
- `get_company_employees` - Get employees of a company
- `get_company_departments` - Get departments
- `get_ticket_types` - Get available ticket types
- `get_ticket_statuses` - Get available ticket statuses
- `create_invoice` - Create an invoice
- `create_customer` - Create a customer

####  IT Asset Management
- `create_pc` / `update_pc` / `delete_pc` - Manage computers
- `create_peripheral` / `update_peripheral` - Manage peripherals
- `create_component` / `update_component` - Manage components
- `get_operating_system` - Get OS information

####  Offers & Quotes (13 tools)
- `create_offer` - Create a new offer/quote
- `update_offer` - Update an offer
- `get_offer_template` - Get offer templates

####  Authentication
- `login` - Login…

