npm package: @plutojs_jia/feishu-image-upload-mcp
Description: MCP server for uploading images to Feishu (Lark) Bitable and returning file_token for record creation
Author: plutojs_jia
Latest version: 1.1.2
Deprecated: This package is deprecated. 功能已整合至新的包 mcp-feishu-bitable-file-transfer. 新包地址: https://www.npmjs.com/package/mcp-feishu-bitable-file-transfer

# Feishu Image Upload MCP Server

一个用于上传图片到飞书（Lark）多维表格的 MCP 服务器。上传图片并返回 file_token，供飞书官方 MCP 创建记录使用。

A Model Context Protocol (MCP) server for uploading images to Feishu (Lark) Bitable. Returns file_token for creating records with Feishu official MCP.

## Features

- 📤 Upload images to Feishu Bitable and get file_token
- 🖼️ Support common image formats (PNG, JPG, JPEG, GIF, etc.)
- 🔧 Use official Feishu SDK (@lark-base-open/node-sdk)
- 🌐 Works with Qoder IDE, Claude Desktop, and other MCP clients
- 🔗 Returns file_token for use with Feishu official MCP to create records

## Installation

```bash
npm install -g @plutojs_jia/feishu-image-upload-mcp
```

## Configuration

### For Qoder IDE

**Step 1:** Open Qoder IDE settings and find MCP configuration section.

**Step 2:** Add the following configuration (replace `xxxxxxxxxxxxx` with your actual tokens):

```json
{
  "mcpServers": {
    "feishu-upload": {
      "command": "npx",
      "args": ["-y", "@plutojs_jia/feishu-image-upload-mcp"],
      "env": {
        "FEISHU_PERSONAL_BASE_TOKEN": "pt-xxxxxxxxxxxxx",
        "FEISHU_APP_TOKEN": "xxxxxxxxxxxxx"
      }
    }
  }
}
```

**Step 3:** Restart Qoder IDE to apply the configuration.

**Note:** After setting `env`, you can upload images by simply providing the file path, without entering tokens every time.

### For Claude Desktop

**Step 1:** Locate your Claude Desktop config file:
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`

**Step 2:** Edit `claude_desktop_config.json` and add (replace `xxxxxxxxxxxxx` with your actual tokens):

```json
{
  "mcpServers": {
    "feishu-upload": {
      "command": "npx",
      "args": ["-y", "@plutojs_jia/feishu-image-upload-mcp"],
      "env": {
        "FEISHU_PERSONAL_BASE_TOKEN": "pt-xxxxxxxxxxxxx",
        "FEISHU_APP_TOKEN": "xxxxxxxxxxxxx"
      }
    }
  }
}
```

**Step 3:** Restart Claude Desktop.

**Note:** After setting `env`, you can upload images by simply providing the file path.

## Usage

After configuration, you can use natural language to upload images:

**If you set environment variables in config:**

```
Upload an image to Feishu

File path: /path/to/image.png
```

**Or provide tokens directly:**

```
Upload an image to Feishu Bitable

File path: /path/to/image.png
Personal Base Token: pt-xxxxxxxxxxxxx
Base ID: xxxxxxxxxxxxx
```

### Parameters

- **filePath** (required): Absolute path to the local image file
- **personalBaseToken** (optional): Feishu Personal Base Token for authentication
  - Can be set in MCP config file's `env.FEISHU_PERSONAL_BASE_TOKEN`
  - If set in config, you don't need to provide it in each request
- **appToken** (optional): Bitable Base ID
  - Can be set in MCP config file's `env.FEISHU_APP_TOKEN`
  - If set in config, you don't need to provide it in each request
- **fileName** (optional): Custom filename, defaults to original filename

**Tip:** It's recommended to set `FEISHU_PERSONAL_BASE_TOKEN` and `FEISHU_APP_TOKEN` in the MCP configuration file to avoid entering them repeatedly.

## Getting Parameters

### Personal Base Token
1. Open your Feishu Bitable
2. Click on the three dots menu (⋯) in the upper right corner
3. Select "Advanced" > "API" or "Advanced Settings"
4. Generate or copy your Personal Base Token

### Base ID
From your Bitable URL:
```
https://bytedance.larkoffice.com/base/xxxxxxxxxxxxx
```
- `xxxxxxxxxxxxx` is the Base ID (appToken)

## Requirements

- Node.js >= 18.0.0
- Feishu (Lark) account with Bitable access
- Personal Base Token from your Bitable

## License

MIT

## Author

plutojs_jia