npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

accurlex-mcp-server

v0.4.0

Published

MCP server for accurLex Chinese legal AI — legal Q&A, contract review, law lookup, document drafting

Readme

accurLex MCP Server

Overview

accurLex MCP Server 是一个面向中国法律工作流的 MCP 服务,支持法律问答、合同审查、法律文书生成等能力。通过 MCP(Model Context Protocol)协议,可在 VS Code Copilot、Claude Desktop、Cursor、Windsurf、OpenClaw 等 AI 客户端中使用。

  • npm 包名: accurlex-mcp-server
  • npm 页面: https://www.npmjs.com/package/accurlex-mcp-server
  • 官网: https://accurlex.com

前置条件

  • Node.js ≥ 18 — 运行 node --version 确认。无需 clone 代码,无需手动安装依赖。

快速开始

1. 配置 MCP

根据你使用的 AI 客户端,将以下配置添加到对应位置:

VS Code Copilot — 在工作区根目录创建 .vscode/settings.json

{
  "mcp": {
    "servers": {
      "accurlex": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "accurlex-mcp-server"],
        "env": {
          "ACCURLEX_PROXY_BASE_URL": "https://accurlex.com",
          "ACCURLEX_API_BASE_URL": "https://accurlex.com/index.php",
          "ACCURLEX_BILLING_PHONE": "你的注册手机号",
          "ACCURLEX_BEARER_TOKEN": "登录后获取的JWT令牌"
        }
      }
    }
  }
}

Claude Desktop — 编辑 %APPDATA%\Claude\claude_desktop_config.json(Windows)或 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS):

{
  "mcpServers": {
    "accurlex": {
      "command": "npx",
      "args": ["-y", "accurlex-mcp-server"],
      "env": {
        "ACCURLEX_PROXY_BASE_URL": "https://accurlex.com",
        "ACCURLEX_API_BASE_URL": "https://accurlex.com/index.php",
        "ACCURLEX_BILLING_PHONE": "你的注册手机号",
        "ACCURLEX_BEARER_TOKEN": "登录后获取的JWT令牌"
      }
    }
  }
}

Cursor — 在项目根目录创建 .cursor/mcp.json,格式同 Claude Desktop。

Windsurf — 在项目根目录创建 .windsurf/mcp.json,格式同 Claude Desktop。

OpenClaw — 使用与 Claude Desktop 相同的 stdio MCP 配置结构。

⚠️ Windows 上如果遇到 npx 找不到的问题,将 "command" 改为 "npx.cmd"

2. 重启客户端

  • VS Code:Ctrl+Shift+PDeveloper: Reload Window
  • Claude Desktop:完全退出并重新打开
  • Cursor / Windsurf:重启编辑器

3. 验证安装

在 AI 对话中发送以下消息测试(免费配额,需已配置 ACCURLEX_BILLING_PHONE):

"劳动合同试用期最长不能超过多久?"

如果 AI 调用了 accurlex_legal_qa 工具并返回了法律分析,说明安装成功。

4. 配置登录信息(账户查询、付费功能)

使用前,请先到 https://accurlex.com 注册账号,将手机号填入客户端配置的 ACCURLEX_BILLING_PHONE 字段。

如果需要账户查询,可在 AI 对话中说:

"帮我登录 accurLex,手机号 138xxxx1234,密码 xxx"

登录成功后,将返回的 ACCURLEX_BEARER_TOKEN 添加到客户端配置的 env 字段中,然后重启客户端。

说明:

  • ACCURLEX_BILLING_PHONE 是注册手机号,所有工具(login/extract 除外)均需要
  • ACCURLEX_BEARER_TOKEN 是 JWT 令牌,所有付费工具和账户查询均需要(法律问答、合同审查、文书生成、账户状态)

⚠️ 从 v0.4.0 起,ACCURLEX_BEARER_TOKEN 是必填项。 未配置时调用付费工具会返回错误提示。请先通过 accurlex_login 工具登录获取令牌。

可用功能

| 功能 | 工具名 | 计费 | 预期耗时 | |------|--------|------|---------| | 法律问答(免费配额,需注册) | accurlex_legal_qa (deep) | 免费 | 10-30 秒 | | 法律问答(专业) | accurlex_legal_qa (expert) | 扣点 | 10-30 秒 | | 合同审查 | accurlex_contract_review | 扣点 | 1-3 分钟 | | 法律文书生成 | accurlex_draft_document | 扣点 | 1-2 分钟 | | 查询账户余额 | accurlex_get_account_status | 免费 | 1-3 秒 | | 提取文件文本 | accurlex_extract_text_from_file | 免费 | <1 秒 |

详细文档

完整的工具参数、工作流、错误处理和平台特定的故障排查指南,请参阅 .github/skills/accurlex-legal-assistant/SKILL.md

常见问题

| 问题 | 解决方案 | |------|---------| | 工具未出现在 AI 对话中 | 确认配置文件路径正确(VS Code 必须在工作区根目录.vscode/settings.json),然后重启客户端 | | tool_unavailable 错误 | 环境变量未设置,检查 env 字段中的 ACCURLEX_PROXY_BASE_URLACCURLEX_API_BASE_URLACCURLEX_BILLING_PHONE | | ENOENT / npx 找不到 | Node.js 未安装或未在 PATH 中,Windows 上尝试将 command 改为 npx.cmd | | 合同审查“超时” | 合同审查正常需要 1-3 分钟,请耐心等待 | | JWT 令牌过期 | 重新调用 accurlex_login,更新配置中的 ACCURLEX_BEARER_TOKEN,重启客户端 |

Contributing

Contributions are welcome. Please follow the standard Git workflow.

License

MIT License. See the LICENSE file for more details.