linkedin WebMCP
Browser tool configuration for linkedin
Tools (2)
post_update()
Insert content into LinkedIn post composer
Parameters
JavaScript Handler
(params) => {
const editor = document.querySelector('.ql-editor') || document.querySelector('[role="textbox"][contenteditable="true"]') || document.querySelector('.editor-content');
if (!editor) {
return { success: false, message: 'Post composer not found. Click "Start a post" first.' };
}
editor.focus();
// Try clipboard paste
const dataTransfer = new DataTransfer();
dataTransfer.setData('text/plain', params.content);
const pasteEvent = new ClipboardEvent('paste', { bubbles: true, cancelable: true, clipboardData: dataTransfer });
editor.dispatchEvent(pasteEvent);
// Fallback to innerHTML
if (!editor.textContent || editor.textContent.trim() === '') {
editor.innerHTML = '<p>' + params.content.replace(/\n/g, '</p><p>') + '</p>';
editor.dispatchEvent(new Event('input', { bubbles: true }));
}
return { success: true, message: 'Content inserted into LinkedIn composer' };
}
open_post_dialog()
Open the LinkedIn post creation dialog
Parameters
No parameters
JavaScript Handler
() => {
const startPostBtn = document.querySelector('[data-control-name="share.main.create"]') || document.querySelector('button.share-box-feed-entry__trigger');
if (startPostBtn) {
startPostBtn.click();
return { success: true, message: 'Opening post dialog...' };
}
return { success: false, message: 'Start a post button not found' };
}
WebMCP clients
Use mcp-chrome, or fetch the same tools from the public API in your own browser automation runtime.
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.linkedin.com/...
Third-party clients can use the same endpoint as mcp-chrome. Execute the returned JavaScript handler in your own browser page context.