← All changes
|
admin/section/class-convertkit-admin-section-mcp.php
+9
-41
3.4.2
→
3.4.5
View file →
| @@ -535,29 +535,8 @@ | ||
| 535 | 535 | // that the configuration is still valid and shows where the header value belongs. |
| 536 | 536 | $server_url = ConvertKit_MCP::get_server_url(); |
| 537 | 537 | $auth_header = 'Basic ' . ( $this->authorization_header ? $this->authorization_header : 'BASE64_ENCODED_USERNAME_AND_APPLICATION_PASSWORD' ); |
| 538 | 538 | |
| 539 | - // Claude Desktop JSON. | |
| 540 | - // Claude Desktop only supports remote MCP servers that authenticate using OAuth, so | |
| 541 | - // mcp-remote is used to proxy requests to the MCP server, adding the authorization header. | |
| 542 | - $claude_desktop_config = wp_json_encode( | |
| 543 | - array( | |
| 544 | - 'mcpServers' => array( | |
| 545 | - 'kit-wordpress' => array( | |
| 546 | - 'command' => 'npx', | |
| 547 | - 'args' => array( | |
| 548 | - '-y', | |
| 549 | - 'mcp-remote', | |
| 550 | - $server_url, | |
| 551 | - '--header', | |
| 552 | - 'Authorization: ' . $auth_header, | |
| 553 | - ), | |
| 554 | - ), | |
| 555 | - ), | |
| 556 | - ), | |
| 557 | - JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | |
| 558 | - ); | |
| 559 | - | |
| 560 | 539 | // Claude Code command. |
| 561 | 540 | $claude_code_command = sprintf( |
| 562 | 541 | 'claude mcp add --transport http kit-wordpress %s --header "Authorization: %s"', |
| 563 | 542 | $server_url, |
| @@ -611,31 +590,20 @@ | ||
| 611 | 590 | </ul> |
| 612 | 591 | |
| 613 | 592 | <div class="kit-inline-tab-panel is-active" data-tab="claude-desktop"> |
| 614 | 593 | <p> |
| 615 | - <?php | |
| 616 | - printf( | |
| 617 | - /* translators: %s: Claude Desktop configuration file name. */ | |
| 618 | - esc_html__( 'Add the following to your %s file, then restart Claude Desktop:', 'convertkit' ), | |
| 619 | - '<code>claude_desktop_config.json</code>' | |
| 620 | - ); | |
| 621 | - ?> | |
| 594 | + <?php esc_html_e( 'In Claude Desktop, go to Settings > Connectors > Add custom connector, enter the server URL below, and add the Authorization header below when prompted to authenticate.', 'convertkit' ); ?> | |
| 622 | 595 | <br /> |
| 623 | - macOS: <code>~/Library/Application Support/Claude/claude_desktop_config.json</code> | |
| 624 | - <br /> | |
| 625 | - Windows: <code>%APPDATA%\Claude\claude_desktop_config.json</code> | |
| 596 | + <a href="<?php echo esc_url( $this->documentation_url() . '#h_6ff6f06cdb' ); ?>" target="_blank"><?php esc_html_e( 'See the documentation for the full guide.', 'convertkit' ); ?></a> | |
| 626 | 597 | </p> |
| 627 | - <?php $this->output_code_block( (string) $claude_desktop_config ); ?> | |
| 628 | - <p class="description"> | |
| 629 | - <?php | |
| 630 | - printf( | |
| 631 | - /* translators: %1$s: mcp-remote, %2$s: Node.js. */ | |
| 632 | - esc_html__( 'Claude Desktop only connects to remote MCP servers that use OAuth, so %1$s is used to connect to this site. This requires %2$s to be installed on your computer.', 'convertkit' ), | |
| 633 | - '<code>mcp-remote</code>', | |
| 634 | - '<a href="https://nodejs.org/" target="_blank">Node.js</a>' | |
| 635 | - ); | |
| 636 | - ?> | |
| 598 | + <p> | |
| 599 | + <strong><?php esc_html_e( 'Server URL:', 'convertkit' ); ?></strong> | |
| 637 | 600 | </p> |
| 601 | + <?php $this->output_code_block( $server_url ); ?> | |
| 602 | + <p> | |
| 603 | + <strong><?php esc_html_e( 'Authorization header:', 'convertkit' ); ?></strong> | |
| 604 | + </p> | |
| 605 | + <?php $this->output_code_block( $auth_header ); ?> | |
| 638 | 606 | </div> |
| 639 | 607 | |
| 640 | 608 | <div class="kit-inline-tab-panel" data-tab="claude-code"> |
| 641 | 609 | <p> |