WORLDBOOK

Worldbooks | WebMCP | Search | Submit WebMCP

csdn WebMCP

Browser tool configuration for csdn

URL Pattern: ^https?://editor\.csdn\.net/.*$
Allowed Extra Domains: editor.csdn.net, so.csdn.net

Tools (3)

csdn_search()

CSDN 技术文章搜索

Parameters

query string required - Search query
page string - Page number (default 1)

JavaScript Handler

insert_article()

Insert content into CSDN article editor (Markdown)

Parameters

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

JavaScript Handler

(params) => {
  // Set title
  if (params.title) {
    const titleInput = document.querySelector('.article-bar__title input') || document.querySelector('input[placeholder*="标题"]');
    if (titleInput) {
      titleInput.value = params.title;
      titleInput.dispatchEvent(new Event('input', { bubbles: true }));
    }
  }
  // Find editor (CSDN uses CodeMirror)
  const cmElement = document.querySelector('.CodeMirror');
  if (cmElement && cmElement.CodeMirror) {
    cmElement.CodeMirror.setValue(params.content);
    return { success: true, message: 'Content inserted into CSDN editor' };
  }
  // Fallback to textarea
  const textarea = document.querySelector('.editor__inner textarea');
  if (textarea) {
    textarea.value = params.content;
    textarea.dispatchEvent(new Event('input', { bubbles: true }));
    return { success: true, message: 'Content inserted into CSDN editor' };
  }
  return { success: false, message: 'Editor not found. Open editor.csdn.net first' };
}

open_editor()

Navigate to CSDN Markdown editor

Parameters

No parameters

JavaScript Handler

() => {
  window.location.href = 'https://editor.csdn.net/md/';
  return { success: true, message: 'Opening CSDN 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.csdn.com/...