Git Sync
1. Getting Started

Connecting to the MCP Server

Connecting to the MCP Server

Tokomono provides an official Model Context Protocol (MCP) server so your AI coding assistant (Cursor, Claude Code, Windsurf, VS Code / GitHub Copilot, or JetBrains Junie) can fetch the Git Sync (tokomono/git-sync) documentation, search code and provider setup guides, report bugs, and request features directly from your editor.


1. Endpoint & Authentication Headers

The Tokomono MCP server uses the Streamable HTTP (JSON-RPC 2.0) transport:

  • MCP Endpoint URL: https://ai-suite.mcp.tokomono.com/mcp
  • Required Authentication Headers:
    • X-User-Email: Your registered Tokomono account email address.
    • X-API-Key: Your personal Tokomono API key.

Note: Requests without a valid X-User-Email and X-API-Key header pair return 401 Unauthorized.


2. Step-by-Step IDE & Agent Configuration

Option A: Cursor (.cursor/mcp.json)

Create or update .cursor/mcp.json in your project root:

{
    "mcpServers": {
        "tokomono": {
            "url": "https://ai-suite.mcp.tokomono.com/mcp",
            "headers": {
                "X-User-Email": "your-email@example.com",
                "X-API-Key": "your-tokomono-api-key"
            }
        }
    }
}

Option B: Claude Code (.mcp.json or CLI)

Add the server to .mcp.json in your project root:

{
    "mcpServers": {
        "tokomono": {
            "type": "http",
            "url": "https://ai-suite.mcp.tokomono.com/mcp",
            "headers": {
                "X-User-Email": "your-email@example.com",
                "X-API-Key": "your-tokomono-api-key"
            }
        }
    }
}

Or register it directly via the Claude Code CLI:

claude mcp add --transport http tokomono https://ai-suite.mcp.tokomono.com/mcp \
  --header "X-User-Email: your-email@example.com" \
  --header "X-API-Key: your-tokomono-api-key"

Option C: JetBrains Junie (.junie/mcp/mcp.json) & VS Code (.vscode/mcp.json)

Add the tokomono HTTP server entry with the url and headers shown above to .junie/mcp/mcp.json or .vscode/mcp.json.


3. Required Tool Parameters (package & ai_suite_version)

Every documentation, search, bug-report, and feature-request tool call on the MCP server requires two parameters:

  1. package (required): Pass "git-sync" (or "tokomono/git-sync") when working with Git Sync.
    • If the AI agent does not know which package is installed, it can call list-packages first (requires no parameters) to retrieve all available Tokomono packages and their supported versions.
  2. ai_suite_version (required): Pass the installed version of tokomono/git-sync from your composer.json (for example "0.1.0" or "0.x"). Only published major versions supported by Tokomono are accepted.

4. Available MCP Tools for git-sync

Tool Name Required Arguments Description
list-packages (none) Lists all available Tokomono packages (ai-suite, git-sync, etc.), their Composer names, and supported documentation versions.
doc-installation package: "git-sync", ai_suite_version Installation, migrations, and the git_sync_pull_requests table schema.
doc-configuration-setup package: "git-sync", ai_suite_version config/git-sync.php options, .env variables, and container binding.
doc-mcp-server-setup package: "git-sync", ai_suite_version How to connect your IDE/AI agent to the Tokomono MCP server.
doc-github-provider-setup package: "git-sync", ai_suite_version Step-by-step GitHub token creation in the GitHub UI and GitHubProvider REST API v3 details.
doc-bitbucket-provider-setup package: "git-sync", ai_suite_version Step-by-step Bitbucket App Password creation in the Bitbucket UI and BitbucketProvider REST API v2 details.
doc-branch-commit-and-pr-flow package: "git-sync", ai_suite_version Programmatic usage of GitProviderInterface (createBranch, commitFile, createPullRequest) and Http::fake() testing.
doc-ai-suite-ui-and-override-sync package: "git-sync", ai_suite_version How publishing in the AI Suite UI on test/staging triggers Git Sync Pull Requests, plus registering custom Git providers.
ask-code-question package: "git-sync", question, ai_suite_version Searches all Git Sync documentation chapters by keyword or question.
report-bug package: "git-sync", bug, files, ai_suite_version Submits a bug report for git-sync. Once pushed to GitHub, you receive an email with a link to track the issue.
request-feature package: "git-sync", feature, description, ai_suite_version Submits a feature request for git-sync. Once pushed to GitHub, you receive an email with a link to track the issue.

5. Testing the Connection via curl

curl -X POST https://ai-suite.mcp.tokomono.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "X-User-Email: your-email@example.com" \
  -H "X-API-Key: your-tokomono-api-key" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "doc-github-provider-setup",
      "arguments": {
        "package": "git-sync",
        "ai_suite_version": "0.1.0"
      }
    }
  }'