Token导航 LogoToken导航TokenDH.com
Ahooks MCP logo
开发工具未说明官方级别未说明来源级核验

Ahooks MCP

MCP Server

为ahooks React Hooks库提供全面信息查询服务的MCP服务器,支持按名称、关键词和分类搜索Hook信息。

工具数

6

提示词数

0

GitHub Stars

0

资源数

0
开发工具TypeScriptClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

leonwgc

提供方

leonwgc

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

ahooks-mcp

English |Simplified Chinese

one for ahooks Designed Model Context Protocol (MCP) server - a high-quality and reliable React Hooks library.

feature

This MCP server provides comprehensive information on ahooks hooks, including:

  • 📋 List all available hook names
  • 🔍 Search for hooks by keywords
  • 📚 Get detailed hook information (description, usage, parameters, return value)
  • 🗂️ Browse hooks by category
  • 📖 Get the complete documentation for any hook

install

npm install -g ahooks-mcp

Instructions for use

Used in conjunction with Claude Desktop

Add the following configuration to the Claude Desktop configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "ahooks": {
      "command": "ahooks-mcp"
    }
  }
}

Used in conjunction with MCP client

You can also use this server in any MCP compatible client:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

const transport = new StdioClientTransport({
  command: "node",
  args: ["/path/to/ahooks-mcp/dist/index.js"],
});

const client = new Client({
  name: "ahooks-client",
  version: "1.0.0",
}, {
  capabilities: {},
});

await client.connect(transport);

Available tools

one get_all_hook_names

Get a list of all available ahooks hook names.

Example:

get_all_hook_names()

two get_hook_info

Get detailed information about a specific hook.

Parameters:

  • name (string, required): Hook name (e.g. "useBoolean", "useRequest")

Example:

get_hook_info({ name: "useBoolean" })

three search_hooks

Search for hooks by keywords in the name, description, or category.

Parameters:

  • keyword (string, required): Search keywords

Example:

search_hooks({ keyword: "state" })

four get_hooks_by_category

Retrieve all hooks under a specific category.

Parameters:

  • category (string, required): Classification name (e.g. "State", "Effect", "DOM", "Request")

Example:

get_hooks_by_category({ category: "State" })

five get_all_categories

Get a list of all available hook categories.

Example:

get_all_categories()

six get_all_hooks

Get complete information on all ahooks hooks.

Example:

get_all_hooks()

classification

The Ahooks library is organized according to the following categories:

  • State: State management hooks (useBoolean, useToggle, usetState, etc.)
  • EffectSide effect related hooks (useDebounce, useThrottle, useUpdating Effect, etc.)
  • DOMDOM operation hooks (useEventListener, useClickAway, useHover, etc.)
  • RequestAsynchronous request hooks (useRequest, useWebSocket)
  • AdvancedAdvanced tool hooks (useMemoizedFn, useLatest)
  • LifeCycleComponent lifecycle hooks (useMount, useUnmount)
  • UIUI related hooks (useVirtualList)

Example Hooks

Some commonly used hooks:

  • useRequest -Powerful asynchronous data management
  • useBoolean -Boolean state management
  • useDebounce -Anti shake value
  • useThrottle -Throttle value
  • useLocalStorageState -Synchronization status with local storage
  • useEventListener -Elegant addEventListener wrapper
  • useClickAway -Detecting external clicks on elements
  • more. ..

development

# 安装依赖
npm install

# 构建项目
npm run build

# 开发监听模式
npm run watch

Publish to npm

view PUBLISHING.md Understand detailed release instructions.

Quickly publish using automated scripts:

# 首次登录 npm
npm login

# 运行发布脚本(交互式)
./publish.sh

Or manually publish:

# 更新版本
npm version patch  # 或 minor, major

# 发布到 npm
npm publish

link

license

MIT

目录标签

目录标签

开发工具TypeScriptClaudeReactHooks本地部署MCP服务器信息查询前端开发

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

session

工具数量(toolCount,工具数)

6

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明session部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP