Skip to content

[Bug] mcp-pandoc 0.8.1 crashes on startup with mcp SDK 2.0.0 (AttributeError: 'Server' object has no attribute 'list_tools') #40

Description

@pbarone

What were you trying to accomplish?

Using mcp-pandoc from an MCP client (Kiro IDE) to convert documents between formats (Markdown, DOCX, etc.). The server is launched with uvx mcp-pandoc.

Expected Behavior

The mcp-pandoc server starts, completes the MCP handshake, and exposes the convert-contents tool so the client can connect and run conversions.

Actual Behavior

The server crashes on startup during import, before any MCP handshake, so the client reports it as failing to connect. The crash is an AttributeError raised while defining the tool handlers:

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File ".../Scripts/mcp-pandoc.exe/main.py", line 5, in
from mcp_pandoc import main
File ".../site-packages/mcp_pandoc/init.py", line 1, in
from . import server
File ".../site-packages/mcp_pandoc/server.py", line 20, in
@server.list_tools()
^^^^^^^^^^^^^^^^^
AttributeError: 'Server' object has no attribute 'list_tools'

Root cause: mcp-pandoc 0.8.1 does not cap its mcp dependency, so a fresh install resolves the latest mcp Python SDK (2.0.0). SDK 2.0 removed the low-level Server.list_tools() / call_tool() decorator API that server.py relies on, so import fails.

Environment Information

Operating System:
Windows 11 (x64), build 10.0.26100

Python Version:
Python 3.13.1 (uv-provisioned for the mcp-pandoc environment; system Python 3.13.2)

mcp-pandoc Version:
0.8.1 (latest on PyPI)

mcp (Python SDK) Version: 2.0.0 (resolved automatically because it is uncapped)

MCP Client:
Kiro IDE 1.0.242 (also reproduces by running uvx mcp-pandoc directly)

Steps to Reproduce

  1. Configure mcp-pandoc with the standard unpinned command: uvx mcp-pandoc.
  2. Start the MCP client (or just run uvx mcp-pandoc in a terminal).
  3. uvx resolves mcp-pandoc 0.8.1 + mcp 2.0.0, and the process exits immediately with the AttributeError above. The client shows the server as not connecting.

Screenshots or Logs

Verified workaround (pin the SDK back to 1.x):

uvx --from mcp-pandoc==0.8.1 --with "mcp==1.29.0" mcp-pandoc

With mcp 1.29.0 the server initializes and returns its tool:
INIT OK -> serverInfo mcp-pandoc 0.8.1
tools/list -> convert-contents

Suggested fix for the project:

  • Short term: cap the dependency to mcp<2 (or mcp>=x,<2) in pyproject.toml and release a patch.
  • Longer term: migrate server.py to the mcp SDK 2.0 API and require mcp>=2.

Pre-submission Checklist

  • I have searched existing issues to avoid duplicates
  • I have provided environment information requested above

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions