Aspose.Cells Cloud MCP Server
Official# Aspose.Cells Cloud MCP Server


## Overview
**Aspose.Cells Cloud MCP Server** is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io)
server built with [FastMCP](https://github.com/jlowin/fastmcp) on top of the
[Aspose.Cells Cloud SDK for Python](https://products.aspose.cloud/cells/python/).
It exposes spreadsheet automation — file conversion, structure inspection, text
cleaning/editing — as MCP tools that any MCP-compatible client (Claude Desktop,
Cline, custom agents, …) can call.
The server itself performs no spreadsheet processing locally: every operation is
delegated to the Aspose.Cells Cloud REST API, so files are uploaded to Aspose
Cloud Storage and results are returned as Base64 payloads or `file_uuid` handles
to files persisted in that storage.
Supported transports: `stdio`, `streamable-http`, `sse`.
## Features
- Upload / download workbooks to Aspose Cloud Storage (Base64 <-> `file_uuid`).
- Inspect the full structure of a workbook as JSON (metadata, worksheets, tables
with column formulas, pivot tables, charts, shape coordinates).
- Convert workbooks to PDF, CSV, JSON, HTML, XPS, ODS, images, … — either from
cloud storage or directly from a Base64 payload.
- Save-as with print-scaling modes and/or arbitrary JSON save options.
- Clean & edit cell text in place: trim, remove characters by type/position/pattern,
add text, fix line breaks, change word case, convert numbers to text.
## Requirements
- Python 3.10 – 3.13
- An **Aspose Cloud account** with a [Cells subscription](https://dashboard.aspose.cloud/).
Cloud credential pairs (`Client Id` / `Client Secret`) are free to create on the
[dashboard](https://dashboard.aspose.cloud/); a free quota tier is available.
- Network access to `https://api.aspose.cloud` (the SDK calls its `/v4.0/...` endpoints).
Aspose.Cells Cloud is a commercial, license-managed service — you are responsible
for complying with Aspose's terms and for keeping your credentials secret.
## Installation
From PyPI:
```bash
pip install aspose-cells-cloud-mcp
```
From source:
```bash
git clone https://github.com/aspose-cells-cloud/Aspose.Cells-Cloud-MCP-Server
cd Aspose.Cells-Cloud-MCP-Server
pip install -r requirements.txt
```
## Command Line Interface
After installation a `aspose-cells-cloud-mcp` console script is available;
run directly from a checkout with `python mcp_server.py`:
```bash
aspose-cells-cloud-mcp
```
By default the server runs over the `stdio` transport and waits for an MCP
client on stdin/stdout.
## Credentials
Aspose Cloud credentials are read from environment variables:
| Variable | Description |
| --------------------------- | -------------------------------------------- |
| `ASPOSE_CLOUD_CLIENT_ID` | Aspose Cloud **Client Id** (required) |
| `ASPOSE_CLOUD_CLIENT_SECRET`| Aspose Cloud **Client Secret** (required) |
| `ASPOSE_CLOUD_API_URL` | Optional API base override (default `https://api.aspose.cloud`; the SDK appends `/v4.0/...` itself, so do **not** include `/v4.0` here) |
You can also pass `--client-id` / `--client-secret` CLI arguments (or call
`run_server(client_id=..., client_secret=...)` in code); when supplied they are
injected into the environment before tools run.
> Credentials are never written to logs — startup logs print only a masked view
> (first/last two characters), e.g. `client_id=ab****xy`.
### Authentication and abuse limits
HTTP endpoints are **anonymous by default** (`MCP_AUTH_MODE=off`), so a local
stdio/HTTP setup needs no extra configuration. Because every tool call bills your
Aspose subscription, set `MCP_AUTH_MODE=apikey` before exposing the server to a
network you do not fully trust:
| Variable | Default | Meaning |
| -------- | ------- | ------- |
| `MCP_AUTH_MODE` | `off` | `off` or `apikey`. In `apikey` mode every route except the health/readiness/version/client probes and the token-protected file download requires a key. Any other non-empty value is treated as `apikey` (fail closed). |
| `MCP_API_KEY_HASHES` | *(unset)* | Comma-separated **SHA-256 hex digests** of accepted keys. Raw keys are never configured or logged. Readiness fails closed when `apikey` mode has no valid hash. |
| `MCP_RATE_LIMIT_PER_MINUTE` | `0` (unlimited) | Per-key token-bucket request limit; excess returns `429` with `Retry-After`. |
| `MCP_DAILY_CALL_LIMIT` | `0` (unlimited) | Per-key daily billable-request quota (probes, the client page and signed downloads are exempt); excess returns `429`. |
| `MCP_DAILY_BYTES_LIMIT` | `0` (unlimited) | Per-key daily upload+download byte quota, including the raw upload and streaming-download routes. |
Clients send the key as `Authorization: Bearer <key>` or `X-API-Key: <key>`; the
browser client at `/cells/mcp/client` has a password field for it and keeps the
key in memory only. Every response carries an `X-Request-ID` for correlation.
> `MCP_AUTH_TOKEN` / `MCP_AUTH_ENFORCE` were removed and are **not** the keys
> above; a leftover `auth-token` Secret entry is ignored.
Independent of auth, SDK calls retry transient rejections (`429`, `502`, `503`,
`504`, connection errors) with bounded exponential backoff and honour
`Retry-After`. Mutating edit calls deliberately do **not** retry a lost
connection, so a timeout cannot double-apply an edit. Tune with
`MCP_CLOUD_RETRY_ATTEMPTS` (default `3`) and
`MCP_CLOUD_RETRY_BASE_DELAY_SECONDS` (default `0.5`).
## Transports and Configuration
The transport is chosen with `MCP_TRANSPORT` (`stdio` | `streamable-http` | `sse`),
falling back to the `TRANSPORT` variable and then `stdio`. HTTP transports listen
for MCP clients; the same process also serves plain HTTP endpoints:
| Route | Purpose |
| ----- | ------- |
| `GET /cells/mcp/health` | Liveness |
| `GET /cells/mcp/ready` | Readiness; 503 when cloud credentials, auth configuration or signed-handle configuration are incomplete |
| `GET /cells/mcp/version` | Server version |
| `GET /cells/mcp/client` | Browser client for trying the tools by hand |
| `GET /cells/mcp/metrics` | Prometheus text exposition of tool/HTTP counters |
| `POST /cells/mcp/files` | Raw binary upload (`X-File-Name` header; avoids Base64 inflation), returns `{file_uuid, size_bytes}` |
| `GET /cells/mcp/files/{file_uuid}?token=…` | Streaming download using a short-lived signed URL from `get_download_link` |
The client page is served from the MCP endpoint's own origin, so no CORS
configuration is involved; open `http(s)://<host>/cells/mcp/client`. These route
paths are fixed (they do not follow `MCP_PATH`), so they also work unchanged
behind an Ingress that routes `/cells/mcp` to this service.
| Environment variable | Default | Meaning |
| -------------------- | ------------------ | ---------------------------------------- |
| `MCP_TRANSPORT` | `stdio` | Transport: `stdio`, `streamable-http`, `sse` |
| `MCP_HOST` | `0.0.0.0` | Bind address for HTTP transports |
| `MCP_PORT` | `8080` | Port for HTTP transports |
| `MCP_PATH` | `/mcp` | Path for `streamable-http` |
| `MCP_SSE_PATH` | `/sse` | Events path for `sse` |
| `LOG_LEVEL` | `INFO` | Logging verbosity |
| `MCP_STATE_DIR` | *(platform data dir)* | Directory for the local state DB (`registry.db`). Set this to a writable volume in containers. |
| `MCP_FILE_TTL_HOURS` | *(unset → never)* | Optional hours-after-*registration* (not last use) before a stored `file_uuid` stops resolving. Expires the local handle only — it does not delete the cloud file (see below). |
| `MCP_CLOUD_TIMEOUT_SECONDS` | `300` | Upper bound (seconds) for each Aspose Cloud HTTP call made by the SDK. The SDK otherwise sets no timeout, so a stalled or unreachable backend would hang a tool forever; set `0` to disable the bound. |
| `MCP_CLOUD_CLIENT_CACHE` | `enabled` | Reuse one `CellsApi` per thread and credential set, removing the OAuth token fetch the SDK does in its constructor from every tool call. Set `0` to build a fresh client per call. |
| `MCP_MAX_INLINE_BYTES` | `67108864` (64 MiB) | Maximum **decoded** size of a Base64 payload accepted by an inline tool. Protects the process from oversized requests; `0` disables the cap. Keep the Ingress `client-max-body-size` at least ~4/3 of this value. |
| `MCP_STRUCTURE_CACHE_SIZE` | `4` | Maximum workbook structures cached per `file_uuid` (LRU). Repeated text edits, range reads and summaries then read the structure once; `0` disables. |
| `MCP_STRUCTURE_CACHE_TTL_SECONDS` | `300` | Seconds a cached workbook structure stays valid; `0` disables. |
| `MCP_BATCH_MAX_OPERATIONS` | `20` | Maximum operations accepted by one `submit_batch` call (1–200). |
| `MCP_BATCH_MAX_JOBS` | `50` | Maximum batch jobs retained in process; finished jobs are evicted first (1–1000). |
| `MCP_BATCH_WORKERS` | `2` | Background worker threads for batch jobs (1–8). |
| `MCP_BATCH_TTL_SECONDS` | `3600` | How long a finished batch stays queryable (60–86400). Batch state is in-process and dies with the server. |
| `MCP_MAX_OUTPUT_BYTES` | `67108864` (64 MiB) | Maximum inline size for `download_file` and `convert` output; larger artifacts raise and direct the caller to `get_download_link`/the streaming route. `0` disables. |
| `MCP_MAX_UPLOAD_BYTES` | `67108864` (64 MiB) | Maximum body size accepted by `POST /cells/mcp/files`; larger bodies get `413`. |
| `MCP_DOWNLOAD_SECRET` | *(falls back to a key derived from the cloud secret)* | HMAC secret for short-lived download URLs. Set it explicitly when several replicas must validate each other's links. |
| `MCP_PUBLIC_BASE_URL` | *(relative URL)* | Absolute origin used when building download links behind a proxy/Ingress, e.g. `https://mcp.example.com`. |
| `MCP_SIGNED_HANDLES` | `off` | Return portable, HMAC-signed `file_uuid` handles so any replica can resolve a file without the shared SQLite registry. Requires `MCP_HANDLE_SECRET` (or a fallback secret); readiness fails otherwise. See below. |
| `MCP_HANDLE_SECRET` | *(falls back to `MCP_DOWNLOAD_SECRET`, then the cloud client secret)* | Signing key for portable handles. All replicas must share it. |
| `MCP_CLOUD_RETRY_ATTEMPTS` | `3` | Attempts for a cloud call that fails with a retryable status (`429`/`502`/`503`/`504`) or connection error. |
| `MCP_CLOUD_RETRY_BASE_DELAY_SECONDS` | `0.5` | Base delay for exponential backoff with jitter; `Retry-After` is honoured. |
### File identifiers and the local registry
A `file_uuid` is an opaque handle, not a cloud path. Its cloud location has the
uuid as its folder, and the object inside is named after the upload's own file
name when one is supplied (else a default): `folder` = the uuid, `name` =
`file_name` or `File` — so an upload of `report.xlsx` lives at
`<uuid>/report.xlsx` and an unnamed upload at `<uuid>/File`. This mirrors the
`folder` + `name` arguments used by Aspose Cells Cloud's "remote spreadsheet"
APIs, and because the folder is the unique uuid, two uploads sharing a file name
never collide. The object is *created* by targeting the uuid folder itself with
the upload request — the Cells storage upload endpoint places the file directly
inside that folder under that name — and downloads, edits and save-as then
address `<uuid>/<name>`. The registry must remember the object `name` plus the
other non-derivable metadata, in a small SQLite database (`registry.db`, created
on first use): the object name, the original file name, whether the file was
uploaded or produced by a conversion, timestamps and an optional TTL. The file
*bytes* always live in Aspose Cloud Storage; the registry holds locations and
metadata only.
**Portable handles (multi-replica deployments).** SQLite is local, so with more
than one replica a handle created by replica A is unknown to replica B. Set
`MCP_SIGNED_HANDLES=1` (and a shared `MCP_HANDLE_SECRET`) to make the server
return a signed, self-describing handle instead of a bare uuid:
`<uuid>.<base64url(payload)>.<hmac>`. The payload carries the object name,
original name, source and expiry, so any replica can resolve and download the
file without the registry; when a local row does exist it stays authoritative.
Trust comes from the signature, so keep the secret out of logs and repositories.
Bare uuids remain accepted, which keeps existing clients working during a
rolling migration. Direct `download_file` output is additionally capped by
`MCP_MAX_OUTPUT_BYTES`; use `get_download_link` for larger files.
- `upload_file(..., file_name="report.xlsx")` creates the file **under that
name** in its uuid folder (`<uuid>/report.xlsx`); omit `file_name` and the
default name is used (`<uuid>/File`). Callers never address the path directly —
they pass the `file_uuid` back in.
- Every operation that consumes a `file_uuid` (`download_file`, edits, save-as,
structure reads) resolves it through the registry first and fails with a clear
error for unknown/expired uuids.
- Set `MCP_FILE_TTL_HOURS` to expire handles after that many hours since they
were **registered** — from upload or conversion time, not from last use
(default: never expire). Expiry removes only the local registry row, so the
cloud file and its storage charges persist either way; it is a way to bound
`registry.db`, not a storage-cost control. Put `MCP_STATE_DIR` on persistent
storage if you want the handles to survive restarts.
The database is created automatically on first use, so normally nothing needs to
be done. To **pre-create or migrate it explicitly** — e.g. to initialize
`registry.db` on a freshly mounted volume before the server starts — run the
idempotent helper script (schema lives in `core/storage`, so it can never drift):
```bash
python scripts/init_registry_db.py # $MCP_STATE_DIR/registry.db, else platform data dir
MCP_STATE_DIR=C:\state python scripts/init_registry_db.py # explicit state dir
python scripts/init_registry_db.py /data/registry.db # explicit DB path
```
Example (HTTP):
```bash
export ASPOSE_CLOUD_CLIENT_ID=xxxxxx
export ASPOSE_CLOUD_CLIENT_SECRET=yyyyyy
export MCP_TRANSPORT=streamable-http
export MCP_PORT=8080
aspose-cells-cloud-mcp
# → MCP endpoint http://0.0.0.0:8080/mcp, health check at /cells/mcp/health
```
## Docker
### Linux (recommended)
[Dockerfile.Linux](Dockerfile.Linux) builds a small `python:3.10-slim` image that
serves `streamable-http` on port `8080` by default:
```bash
docker build -f Dockerfile.Linux -t aspose-cells-cloud-mcp .
docker run -d --name cells-mcp -p 8080:8080 \
-v cells-mcp-state:/state \
-e ASPOSE_CLOUD_CLIENT_ID=xxxxxx \
-e ASPOSE_CLOUD_CLIENT_SECRET=yyyyyy \
aspose-cells-cloud-mcp
# MCP endpoint http://localhost:8080/mcp, health check at /cells/mcp/health
```
Override the transport at run time, e.g. `-e MCP_TRANSPORT=stdio` for stdio
clients. `PIP_INDEX_URL` defaults to PyPI; pass
`--build-arg PIP_INDEX_URL=<index>` (for example a regional mirror) if PyPI is
unreachable from your builder — it is needed only at build time.
The image sets `MCP_STATE_DIR=/state` for `registry.db`, the handle map behind
every `file_uuid`. Mount a volume there (as above) so issued handles survive the
container being recreated; `scripts/init_registry_db.py` ships inside the image
if you prefer to pre-create that database on a fresh volume.
### Windows (offline)
[Dockerfile](Dockerfile) targets Windows Server Core for environments that must
build **offline**: it expects a populated `./packages/` directory (a Python
installer plus the pinned wheels for `pip --no-index`) in the build context, which
the release pipeline produces and git ignores. For general-purpose images prefer
[Dockerfile.Linux](Dockerfile.Linux).
## Tools
All tool names and parameters below match the running server exactly
(`22` tools). Two argument conventions are used:
- **Stored files (`file_uuid`)** — a `file_uuid` references a file persisted in
Aspose Cloud Storage; pass it back into later calls. Each uuid is a folder
holding one object named after the upload's `file_name` (default `File`); a
small local registry maps the uuid to that object name, so the handle
round-trips regardless of the underlying storage path.
- **Inline Base64** — `*_b64string` arguments carry raw file content, so a file
never has to be uploaded first. Read the file and encode it before calling.
> **Migration (breaking tool-surface change).** The per-operation tools have
> been consolidated: the six `convert_*` tools are now `convert(format=...)`,
> and the 22 text-edit tools are now `edit_text(operation=...)`. The old edit
> tool names are accepted as `operation` values (for example
> `operation="trim_text_from_leading"`), so only the tool name and argument
> shape need to change. See the sections below for the full mapping.
### Discovery
| Tool | Parameters | Purpose |
| ---- | ---------- | ------- |
| `list_supported_load_formats` | — | All source (read/import) formats |
| `list_supported_save_formats` | — | All target (save/export) formats |
### Storage (cloud upload / download)
| Tool | Parameters | Purpose |
| ---- | ---------- | ------- |
| `upload_file` | `file_content_b64string`, `file_name` *(optional)* | Upload Base64 content to cloud storage, returns a `file_uuid`; the file is created under `file_name` inside its uuid folder (default name when omitted) |
| `download_file` | `file_uuid` | Download a stored file, returns Base64 content (capped by `MCP_MAX_OUTPUT_BYTES`) |
| `list_files` | `limit=50`, `offset=0` | Page through stored handles, newest first |
| `get_file_info` | `file_uuid` | Metadata, expiry state and a short-lived `download_url` |
| `get_download_link` | `file_uuid`, `ttl_seconds=300` | Signed URL for streaming the file directly (no Base64 inflation) |
| `delete_file` | `file_uuid`, `confirm=false` | Delete the cloud object and the local handle; requires `confirm=true` |
| `cleanup_expired` | `dry_run=true` | List (or with `dry_run=false`, delete) expired handles and their cloud objects |
### Workbook structure inspection
| Tool | Parameters | Purpose |
| ---- | ---------- | ------- |
| `get_spreadsheet_structure` | `spreadsheet_b64string` | Full JSON structure of an inline workbook |
| `get_structure_with_file_uuid` | `file_uuid` | Full JSON structure of a stored workbook |
| `get_worksheet_summary` | `file_uuid` | Compact inventory: worksheet names, used range, row/column counts, and counts of tables/charts/pivots/shapes/merged cells/links |
### Read data
| Tool | Parameters | Purpose |
| ---- | ---------- | ------- |
| `read_range` | `file_uuid`, `worksheet` *(optional)*, `range` *(optional, A1)* | Populated cells of a range as JSON: sparse `cells` (0-based row/column, value, formula, type) plus a dense `grid` when small. `worksheet` defaults to the first sheet and `range` to its used range. Reads over 50,000 populated cells fail rather than truncate. |
### Convert from cloud storage (save-as)
| Tool | Parameters | Purpose |
| ---- | ---------- | ------- |
| `save_spreadsheet_as` | `file_uuid`, `target_format` | Convert a stored workbook to a new format |
| `save_spreadsheet_as_with_scaling_mode` | `file_uuid`, `target_format`, `scaling_mode` | Save-as with print scaling (`NoScaling`, `FitSheetOnOnePage`, `FitAllColumnsOnOnePage`); unsupported mode/format combinations are rejected with an error |
| `save_spreadsheet_as_with_save_options_json_data` | `file_uuid`, `target_format`, `save_options_json_data` | Save-as with arbitrary JSON save options (password, rendering, …) |
| `list_conversion_presets` | — | Discover the named format + page-setup presets |
| `convert_with_preset` | `file_uuid`, `preset` | Save-as using a preset (e.g. `pdf-one-page`, `xps-fit-columns`, `csv`, `json`) |
### Batch jobs
| Tool | Parameters | Purpose |
| ---- | ---------- | ------- |
| `submit_batch` | `operations` | Queue up to `MCP_BATCH_MAX_OPERATIONS` operations (`convert`, `read_range`, `summary`) and return a `batch_id` immediately |
| `get_batch` | `batch_id` | Poll status (`queued`/`running`/`completed`/`failed`), counts and per-operation results/errors |
Batch state is in-process: jobs die with the server and finished jobs expire
after `MCP_BATCH_TTL_SECONDS`. Operations use the same code paths as the direct
tools, so output caps, registry handles and retry semantics are unchanged.
### MCP resources
Read-only, metadata-only resources (no workbook contents): `cells-mcp://files`
lists stored files, and the template `cells-mcp://files/{file_uuid}` returns one
file's metadata plus a short-lived download link when usable.
### Convert inline content (Base64 in → Base64 out)
| Tool | Parameters | Purpose |
| ---- | ---------- | ------- |
| `convert` | `spreadsheet_b64string`, `format` | Convert any supported spreadsheet content (XLSX/XLS/ODS/CSV/JSON/XML) to `format` (PDF, CSV, JSON, HTML, XLSX, ODS, XPS, …) |
`ods_b64string` is accepted as a deprecated alias for `spreadsheet_b64string`.
The old per-format tools (`convert_excel_to_pdf`, `convert_excel_to_csv`,
`convert_excel_to_json`, `convert_ods_to_pdf`, `convert_excel`,
`convert_spreadsheet`) all map to this call.
### Cell text editing (`edit_text`)
One tool covers every text edit. Pass `file_uuid`, `operation`, and only the
arguments that operation uses. `worksheet` (name; empty → first worksheet) and
`range` (A1 notation / named range; empty → all used cells) are optional. The
deprecated `_range` spelling is still accepted.
| `operation` | Extra parameters | Purpose |
| ----------- | ---------------- | ------- |
| `trim` | `trim_text=' '` | Strip the given chars from both ends |
| `trim_leading` | `trim_text=' '` | Strip from the start only |
| `trim_trailing` | `trim_text=' '` | Strip from the end only |
| `remove_extra_line_breaks` | — | Collapse consecutive line breaks |
| `remove_all_line_breaks` | — | Delete every line break |
| `remove_non_printing_characters` | — | Strip control / invisible chars |
| `remove_text_characters` | — | Remove A–Z / a–z letters |
| `remove_numeric_characters` | — | Remove 0–9 digits |
| `remove_symbols` | — | Remove punctuation/symbols, keep alnum + whitespace |
| `remove_punctuation_marks` | — | Remove punctuation only |
| `remove_custom_characters` | `custom_characters`, `case_sensitive=False` | Remove user-specified chars |
| `remove_first_n_characters` | `number` (≥ 1) | Chop N chars off the start |
| `remove_last_n_characters` | `number` (≥ 1) | Chop N chars off the end |
| `remove_before_text` | `text`, `case_sensitive=False` | Delete everything before a delimiter |
| `remove_after_text` | `text`, `case_sensitive=False` | Delete everything after a delimiter |
| `add_text_at_head` | `text` | Prepend text to each cell |
| `add_text_at_tail` | `text` | Append text to each cell |
| `add_text_before_text` | `text`, `select_text` | Insert text before a selector |
| `add_text_after_text` | `text`, `select_text` | Insert text after a selector |
| `word_case` | `word_case_type='UpperCase'` | `UpperCase`/`LowerCase`/`TitleCase`/`SentenceCase`/`ToggleCase` |
| `convert_number_to_text` | — | Format numeric cells as text strings |
| `convert_line_break_to_text` | `target_text` | Replace line breaks (empty string deletes them) |
The old tool names are accepted as `operation` aliases, so
`operation="trim_text_from_leading"` still works; `trim_text` and
`trim_text_from_trailing` map to `trim` and `trim_trailing`.
`edit_text` returns `true` when the underlying Cloud operation succeeds. A cloud
response other than `OK` raises a `RuntimeError` carrying that status instead of
returning `false` — a rejected edit must not look like a successful one, and the
save-as tools already fail loudly for the same reason. An unknown or expired
`file_uuid`, a missing `worksheet`, an unknown operation, or a missing
operation-specific argument raises `ValueError` before any edit is attempted.
## Example Workflow
Sequence of tool calls (names match the running server) that trims spaces,
uppercases a column, and exports the result to PDF:
1. `upload_file(file_content_b64string=<Base64 of report.xlsx>, file_name="report.xlsx")` → `file_uuid`
2. `get_structure_with_file_uuid(file_uuid)` — inspect worksheets/ranges first
3. `edit_text(file_uuid, operation="trim_leading", worksheet="Sheet1", range="A1:C100")`
4. `edit_text(file_uuid, operation="word_case", worksheet="Sheet1", range="A2:C100", word_case_type="UpperCase")`
5. `save_spreadsheet_as(file_uuid, target_format="pdf")` → new `file_uuid`
6. `download_file(file_uuid=<pdf uuid>)` → Base64 PDF payload
## Testing
The default pytest run is **hermetic** — unit tests only, no cloud or Docker:
```bash
# pip
pip install -e ".[dev]"
python -m pytest # runs -m "not integration and not docker"
# uv (its [dependency-groups] dev entry is installed by default)
uv run python -m pytest
```
Run from the repository root: the tests import the top-level `mcp_server`
module and the `tests` package.
Markers:
- `integration` — requires live Aspose Cloud credentials
(`ASPOSE_CLOUD_CLIENT_ID`, `ASPOSE_CLOUD_CLIENT_SECRET`, optional
`ASPOSE_CLOUD_API_URL`) and sample workbooks. Fixtures are generated offline by
`python tests/generate_fixtures.py` into `tests/fixtures/` (stdlib-only, no
network); override the directory with `ASPOSE_TEST_DATA_DIR` if you keep your
own samples elsewhere.
- `docker` — requires a running MCP container on `http://127.0.0.1:28080/cells/mcp`.
Run the integration suite explicitly (the Docker tests also carry the
`integration` marker; use `-m "integration and not docker"` to skip them):
```bash
pytest -m integration
```
See the [Integration Testing Guide](docs/integration-testing.md) for each
suite's target (stdio, local HTTP, QA, prod, Docker), the credentials it needs,
and how to run it in CI.
Linting (ruff, `E9`/`F` fatal + undefined-name rules):
```bash
ruff check .
```
## Integration with MCP Clients
Point any MCP client at the server:
- **stdio** — launch `aspose-cells-cloud-mcp` (or `python mcp_server.py`) as the
subprocess command.
- **streamable-http / sse** — configure the client with the endpoint URL the
server prints at startup (`http://<host>:<port>/mcp` or `/sse`).
## License
This project is licensed under the MIT License — see [LICENSE](LICENSE). It
depends on the Aspose.Cells Cloud SDK, which is a proprietary, license-managed
service; obtain a valid Aspose Cloud subscription and comply with its terms. No
proprietary components are bundled in this repository.
## Trademarks
This project may contain trademarks or logos for projects, products, or services.
Use of third-party trademarks or logos is subject to those third-party policies.
TDQS
Scored across 37 tools
Multiple conversion tools overlap heavily: convert_excel and convert_spreadsheet have nearly identical descriptions, and convert_excel_to_json/csv/pdf plus save_spreadsheet_as variants create ambiguous boundaries. The text manipulation tools are mostly distinct, but the conversion cluster forces an agent to guess which entry point is canonical.
Most tools follow a snake_case verb_noun pattern and the remove_*/add_* text tools are quite consistent. However, there are notable inconsistencies: convert_excel vs convert_spreadsheet, get_structure_with_file_uuid vs get_spreadsheet_structure, and word_case which lacks a clear verb prefix.
37 tools is heavy, especially with several near-duplicate conversion entry points and 20+ micro text-manipulation tools that could likely be consolidated. The count feels more like a comprehensive API surface dump than a tightly scoped MCP tool set.
The server covers file upload/download, conversions, structure inspection, and a broad set of text cleanup operations. However, it lacks fundamental Excel capabilities like creating workbooks, reading or writing cell values directly, and managing worksheets, leaving significant gaps for an Excel-focused MCP server.