Skip to content

feat(tms): add Contentful2 connector creation tools#101

Draft
Alexandra Cirligeanu (alexandracirligeanu1) wants to merge 4 commits into
mainfrom
TIN-4406-Spike-connector-creation-via-Phrase-MCP-server-Atlas-guided-flow
Draft

feat(tms): add Contentful2 connector creation tools#101
Alexandra Cirligeanu (alexandracirligeanu1) wants to merge 4 commits into
mainfrom
TIN-4406-Spike-connector-creation-via-Phrase-MCP-server-Atlas-guided-flow

Conversation

@alexandracirligeanu1
Copy link
Copy Markdown

@alexandracirligeanu1 Alexandra Cirligeanu (alexandracirligeanu1) commented May 20, 2026

Summary

  • Adds five new TMS tools to support end-to-end Contentful2 connector creation via the Phrase MCP server, enabling Claude to guide a user through the full OAuth flow and connector setup without any manual API calls.

New tools:

tms_list_enabled_connector_types — verify CONTENTFUL2 is available for the org
tms_initiate_connector_oauth — generate the Contentful OAuth URL and session uid
tms_poll_connector_auth_code — retrieve the auth code once the user completes browser authorisation
tms_create_connector — create the connector with the OAuth code and payload
tms_test_connector — verify the connection after creation

Authentication flow:
CF2 uses OAuth 2.0 authorization code flow. There is no API token shortcut — browser authorisation is required. The MCP-adapted version of this flow uses three API2 endpoints that all accept bearer tokens (no session cookie needed):

POST /api2/v1/connectors/connectorAuthData → creates state uid
GET /api2/v1/connectorAuthPage/CONTENTFUL2 → returns OAuth URL template
GET /api2/v1/connectors/connectorAuthCode/{uid} → polls for the auth code

Security
No Contentful credentials ever transit the MCP layer — the user authenticates directly with Contentful in their browser
The OAuth code is single-use and short-lived; receiving it via Claude chat is safe
Phrase's backend handles the token exchange and stores the resulting Contentful access token

Related Issue

Testing

  • npm run build
  • npm run lint
  • npm run format:check
  • npm run test:coverage

Checklist

  • I added or updated tests where needed.
    — added the 5 new tool names to EXPECTED_TOOL_NAMES in tools.test.ts
  • I updated README and Developer Hub content when behavior or usage changed.
    — connector tools are POC/spike scope
  • I considered backward compatibility and noted breaking changes below.

Breaking Changes

  • None.
    New tools only; no existing tools or interfaces modified.

@alexandracirligeanu1 Alexandra Cirligeanu (alexandracirligeanu1) changed the title TIN-4406: Spike: connector creation via Phrase MCP server (DRAFT) TIN-4406: Spike: connector creation via Phrase MCP server May 20, 2026
@alexandracirligeanu1 Alexandra Cirligeanu (alexandracirligeanu1) changed the title (DRAFT) TIN-4406: Spike: connector creation via Phrase MCP server (DRAFT) feat(tms): add Contentful2 connector creation tools May 20, 2026
@alexandracirligeanu1 Alexandra Cirligeanu (alexandracirligeanu1) changed the title (DRAFT) feat(tms): add Contentful2 connector creation tools feat(tms): add Contentful2 connector creation tools May 20, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the structure and conventions are solid. A few things worth addressing before this graduates from draft — inline comments below.

Comment thread src/products/tms/client.ts
Comment thread src/products/tms/client.ts
Comment thread src/products/tms/client.ts Outdated
Comment thread src/products/tms/tools/create-connector.ts
Comment thread src/products/tms/tools/initiate-connector-oauth.ts Outdated
Comment thread src/products/tms/tools/poll-connector-auth-code.ts
Comment thread src/products/tms/tools/poll-connector-auth-code.ts
Comment thread src/products/tms/tools.test.ts
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.

2 participants