webmcp-nexus

webmcp-nexus is a skill for Claude Code, Codex from alibaba/webmcp-nexus. It costs 159 tokens per session (8,869 once invoked), scanned A, original, MIT.

A coding guide for adding WebMCP tools to JavaScript or TypeScript projects. WebMCP lets AI agents call selected application functions through a standard interface.

In plain words
What is it for?
Use it to create WebMCP tool functions, convert existing methods for AI-agent use, or configure the WebMCP SDK and Vite or webpack build plugins.
Why use it?
It helps ensure tools have the required function shapes, documentation, and types so they can be discovered and registered correctly. It also provides a safer way to adapt existing functions without changing their business logic.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { searchUsers } from '../api/user';.

Good fit Use it to create WebMCP tool functions, convert existing methods for AI-agent use, or configure the WebMCP SDK and Vite or webpack build plugins.

Compare 6 skills from other repositories ↓
About the project

WebMCP Nexus is a frontend toolkit that lets web applications expose ordinary TypeScript functions as tools that Model Context Protocol clients can call. It provides an SDK and Vite or Webpack integrations for registering tools in React applications across global, route, and component lifecycles. Its catalogue skill helps coding agents generate these tools from functions and documentation.

alibaba/webmcp-nexus · 47 stars · on GitHub · alibaba.github.io

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/alibaba/webmcp-nexus
agentmods
npx agentmods add skills/alibaba/webmcp-nexus/skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for webmcp-nexus

README.md
[![agentmods](https://agentmods.dev/badge/skills/alibaba/webmcp-nexus/skill/github.svg)](https://agentmods.dev/skills/alibaba/webmcp-nexus/skill)
Your own site
<a href="https://agentmods.dev/skills/alibaba/webmcp-nexus/skill"><img src="https://agentmods.dev/badge/skills/alibaba/webmcp-nexus/skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for webmcp-nexus

Your own site · 80×15
<a href="https://agentmods.dev/skills/alibaba/webmcp-nexus/skill"><img src="https://agentmods.dev/badge/skills/alibaba/webmcp-nexus/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 159 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,869 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Memory Poisoning · line 27
    Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
    Fix: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
  • medium Prompt Injection · line 27
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 34
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 42
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00159 $0.08869
Opus 5.5 $0.00064 $0.03548
Sonnet 5.5 $0.00032 $0.01774
Haiku 4.5 $0.00016 $0.00887

Measured 1mo ago against content hash 67ddd791f699, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

webmcp-nexus scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const res = await fetch(params.url, { signal });
skill/SKILL.md · 807 lines

How it starts

The opening of the file, as written. The whole thing — 807 lines — stays where its author put it; the contents beside it link to each section on GitHub.

webmcp-nexus-skill

本技能用于指导 AI 编码 Agent(Cursor / Claude Code / Qoder / Continue 等)在已接入或即将接入 webmcp-nexus-sdk 的业务项目中进行以下四类工作:

  1. 约束开发规范 —— 工具函数的签名、JSDoc、TS 类型写法。
  2. 生成新工具函数 —— 按规范从零写一个符合 WebMCP schema 抽取要求的函数。
  3. 改造现有方法为工具函数(核心) —— 把项目里已有的业务函数(可能是位置参数、缺 JSDoc、参数类型是 any 等)改造成合规工具函数。红线:只改签名与注释,绝不修改原方法的功能与业务逻辑。
  4. SDK / 构建插件接入引导 —— webmcp-nexus-sdk、vite-plugin-webmcp-nexus、webpack-plugin-webmcp-nexus 的安装与配置。

本技能不关心项目的代码风格(分号、引号、缩进、Prettier 配置)、ESLint 规则、tsconfig 其他选项——这些不影响 WebMCP 工具的提取与注册。


0. 三级约束(TL;DR)

WebMCP 构建插件(Vite/Webpack plugin)通过 ts-morph 从 registerGlobalTools(...) / useWebMcpTools(...) / withWebMcpTools(...) 的调用位置向上追踪工具函数的定义,提取 JSDoc 与参数类型,在构建阶段把 __webmcpSchema(description / inputSchema / readOnly / title / untrustedContent / consequential)注入到每个函数对象上。SDK 在运行时读取该字段向 document.modelContext 注册。

约束严重度分三级,递减:

MUST —— 违反将导致函数无法注册,或 schema 被污染而无法被 LLM 调用

# 约束
M1 工具函数必须可被追踪。三种可追踪形式:① 作为对象字面量属性传入 registerGlobalTools({ fn }) / useWebMcpTools({ fn });② 在 import * as api from './module' 的 ./module 里作为具名导出(避免 export default:default 键字符集合法但语义错误,SDK 会直接跳过它);③ 作为 class 组件内带 JSDoc 的方法,通过 withWebMcpTools(MyClass) 注册
M2 工具函数必须接受单一对象类型参数(命名 interface / type alias / 内联对象字面量)。原始类型 / 数组 / any / 泛型会让 ts-morph 吐出原型链上的一堆属性(length、charAt…),schema 被污染,LLM 调用必失败
M3 工具名只能用 [A-Za-z0-9_](camelCase),禁用 . 与 -。WebMCP 协议本身允许这两个字符,但 @mcp-b/webmcp-local-relay 5.x 的 sanitizeName 会把它们改写成 _,导致 MCP 客户端看到的工具名与注册名不一致(get-canvas-info → get_canvas_info),Agent 与开发者双向困惑。超过 128 字符、含空格或非 ASCII 字符的名字会被宿主直接拒绝(InvalidStateError),且构建插件会在 pnpm build 阶段报错
M4 禁止工具返回 { resultType: 'input_required' }。relay 5.x 不支持转发 MCP 多轮 elicitation,会直接把它转为错误结果("Multi-round tool flows require direct McpServer registration")。需要多轮交互的能力应拆成多个单轮工具

Read the full file on GitHub · 807 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +44 lines 67ddd791f699
  2. 1mo ago First seen · 763 lines · 159 tokens per session scan A f79719e26717

Subscribe to this mod's changes

webmcp-nexus is a skill published in the GitHub repository alibaba/webmcp-nexus (47 stars, last pushed 9d ago), licensed MIT. It adds 159 tokens to every session and 8,869 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

youtube-transcripts

Read and search YouTube videos through VidWords. Use when the user supplies a YouTube URL, a bare 11-character video id, a youtu.be or Shorts link, or a channel handle, and wants any of: the transcript or subtitles (TXT/SRT/VTT), what a video says about a topic, a quote with a citable timestamp, only the words spoken…

haljishi/vidwords-mcp · 111 tokens

pyobfus-review

Review a Python project for source-protection readiness without changing anything: what would break under obfuscation, which framework preset fits, which files the current config already excludes, and exactly which artifacts a build would emit. Use when the user asks "is this safe to obfuscate?", "what would…

zhurong2020/pyobfus · 124 tokens

notion-recipes

Use this skill when a user wants to turn meeting notes into a tracked Action Items database in Notion, or to bulk-edit, find-replace, normalize, or repair Notion database rows or page text at a scale past Notion's native find-and-replace limits. Uses easy-notion's MCP tools.

Grey-Iris/easy-notion-mcp · 68 tokens

repo-context

Use repo-context-mcp tools to map, search, and pack repository context before large edits or PR review.

nduc99911/repo-context-mcp · 25 tokens

pdf-invoice-extractor

Extract typed invoice data from supplied text, Markdown, or a PDF/image through processdocument. Use for invoice totals, line items, due dates, and extraction anomalies.

Swih/mistral-mcp · 39 tokens

french-commit-message

Rédige un message Conventional Commits en français à partir d'un diff fourni ou des changements Git indexés. À utiliser pour une demande de message de commit ou de résumé de diff en français.

Swih/mistral-mcp · 46 tokens