WORLDBOOK

Worldbooks | WebMCP | Search | Submit WebMCP

juejin WebMCP

Browser tool configuration for juejin

URL Pattern: ^https?://juejin\.cn/.*$

Tools (2)

insert_article()

Insert content into Juejin (掘金) article editor

Parameters

title string - Article title
content string required - Article content (Markdown)

JavaScript Handler

(params) => {
  // Set title
  if (params.title) {
    const titleInput = document.querySelector('.title-input input') || document.querySelector('input[placeholder*="标题"]');
    if (titleInput) {
      const setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;
      setter.call(titleInput, params.title);
      titleInput.dispatchEvent(new Event('input', { bubbles: true }));
    }
  }
  // Find editor (Juejin uses CodeMirror)
  const editor = document.querySelector('.CodeMirror-code') || document.querySelector('.bytemd-body textarea') || document.querySelector('[contenteditable="true"]');
  if (!editor) {
    return { success: false, message: 'Editor not found. Open juejin.cn/editor/drafts/new first' };
  }
  // For CodeMirror, we need to use the CM instance
  const cmElement = document.querySelector('.CodeMirror');
  if (cmElement && cmElement.CodeMirror) {
    cmElement.CodeMirror.setValue(params.content);
    return { success: true, message: 'Content inserted into Juejin editor' };
  }
  // Fallback
  if (editor.tagName === 'TEXTAREA') {
    editor.value = params.content;
  } else {
    editor.textContent = params.content;
  }
  editor.dispatchEvent(new Event('input', { bubbles: true }));
  return { success: true, message: 'Content inserted into Juejin editor' };
}

open_editor()

Navigate to Juejin article editor

Parameters

No parameters

JavaScript Handler

() => {
  window.location.href = 'https://juejin.cn/editor/drafts/new';
  return { success: true, message: 'Opening Juejin editor...' };
}

🔌 Chrome MCP Server Extension

Use these tools with Claude, ChatGPT, and other AI assistants.

Get Extension →

How to Use WebMCP

WebMCP tools are designed for browser extensions or automation frameworks. The browser extension matches the current URL against the pattern and executes the JavaScript handler when the tool is invoked.

API Endpoint:

GET /api/webmcp/match?url=https://www.juejin.com/...