Skip to content

Add create-item MCP tool - #381

Open
sandervanhooft wants to merge 1 commit into
ploi:mainfrom
sandervanhooft:claude/mcp-roadmap-item-creation-afaff9
Open

sandervanhooft wants to merge 1 commit into
ploi:mainfrom
sandervanhooft:claude/mcp-roadmap-item-creation-afaff9

Conversation

@sandervanhooft

Copy link
Copy Markdown
Contributor

The MCP server can read, comment on and move items, but it can't create them yet. This PR adds a create-item tool.

Who can use it

  • Admins and employees can always create items, the same way move-item works.
  • Other registered users can only create items when an admin turns on the new "Allow users to create items through MCP" toggle in Settings → MCP. It is off by default.

The tool is only listed for users who are allowed to use it (shouldRegister). handle() checks again, for clients that call it anyway.

Behaviour

The tool follows the existing web flow in Header::submitItemAction() and Item\Create:

  • title (min 3) and content (min 10, markdown) are required, and both go through ProfanityCheck.
  • project and board are optional, by ID or slug. A board has to come with its project. Project and board lookups reuse the visibility rules from InteractsWithRoadmap.
  • Regular users can't create items on boards with can_users_create turned off.
  • The "project/board required when creating item" settings and users_must_verify_email apply here too.
  • The item belongs to the token owner, and the owner automatically upvotes it, the same as in the web UI. ItemObserver sends the usual new-item notifications.

Changes

  • app/Mcp/Tools/CreateItemTool.php: the new tool, registered in RoadmapServer and added to the server instructions
  • New setting general.mcp_users_can_create_items (settings migration plus a GeneralSettings property)
  • Settings → MCP: the new toggle, shown only while MCP is enabled
  • lang/en: labels for the toggle, and the permissions text now mentions that items are posted under your name
  • Tests: CreateItemToolTest, plus tool-list cases in McpEndpointTest and a toggle case in McpSettingsTest

Admins and employees can always create items through MCP. A new MCP setting
(disabled by default) lets other registered users create items too.
@sandervanhooft
sandervanhooft marked this pull request as ready for review October 5, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant