Skip to content

🐛 Bug - publish_entry sends truncated entry ID in request URL, causing 404 #311

@markferritto

Description

Describe the bug

When calling the MCP tool publish_entry with a valid full entryId (e.g. 5hEsXUrB0Gf7S6vCuQZfut), the request sent to the Contentful API uses only the first character of the ID in the URL (e.g. .../entries/5 instead of .../entries/5hEsXUrB0Gf7S6vCuQZfut). The API returns 404 and the entry is not published. The same truncation may occur when passing an array of entry IDs to the bulk publish overload.

To Reproduce

  1. In Cursor (or another MCP client), use the Contentful MCP server (contentful-mcp-server) with a valid space/environment and management token.
  2. Create an entry with create_entry and note the full entryId from the response.
  3. Call publish_entry with that entryId (and the same spaceId and environmentId).
  4. Observe the failing request (e.g. in network logs or MCP Inspector): the request URL contains only the first character of the entry ID.
  5. See 404 from the API and no publish.

Expected behavior

publish_entry should send the full entryId in the request URL so the Contentful Management API can publish the correct entry.

Screenshots

If applicable, add a screenshot of the request URL or 404 response. Otherwise omit.

Environment (please complete the following information):

  • OS: macOS 26.2
  • Browser / client: Cursor (MCP client)
  • Version: 2.4.23

Additional context

  • Reproduced when using the MCP from Cursor with @contentful/mcp-server / contentful-mcp-server.
  • Workaround: publish the entry in the Contentful web app using the entry’s direct link.
  • Same entryId works for get_entry and update_entry; the truncation appears specific to the publish request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions