这是一个模型上下文协议(MCP)服务器,可让你从 onlinekommentar.ch 访问瑞士法律评论。通过Claude Desktop或其他支持MCP的客户端,你可以使用该服务器搜索和获取有关瑞士联邦法律的详细法律评论。
克隆仓库:
git clone https://github.com/self-tech-labs/onlinekommentar-mcp.git
cd onlinekommentar-mcp
安装依赖:
npm install
构建项目:
npm run build
将以下配置添加到Claude Desktop的MCP设置文件中:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"online-kommentar": {
"command": "node",
"args": ["/path/to/onlinekommentar-mcp/build/index.js"]
}
}
}
请将 /path/to/onlinekommentar-mcp
替换为你项目目录的实际路径。
添加配置后,重启Claude Desktop以加载MCP服务器。
使用各种过滤器搜索法律评论。 参数:
search
(必需):全文搜索查询language
(可选):内容语言(en
、de
、fr
、it
)legislative_act
(可选):按立法法案ID过滤sort
(可选):排序顺序(title
、-title
、date
、-date
)page
(可选):分页页码示例查询:
使用评论的ID检索特定评论的详细信息。 参数:
id
(必需):评论的唯一标识符示例:
Search for commentaries about "constitutional rights" in English
此查询将返回相关评论的列表,包含评论的ID、标题、发布日期和URL。
Get the full content of commentary ID: 7058f7a5-19d8-444e-a901-7bb635ded375
此查询将返回全面的信息,包括:
onlinekommentar-mcp/
├── src/
│ └── index.ts # 主要的MCP服务器实现
├── build/ # 编译后的JavaScript输出
├── package.json # 项目依赖和脚本
├── tsconfig.json # TypeScript配置
└── README.md # 本文件
npm run build
:将TypeScript编译为JavaScriptnpm start
:运行编译后的服务器(用于测试)该服务器与onlinekommentar.ch API集成:
https://onlinekommentar.ch/api
/commentaries
- 搜索评论/commentaries/{id}
- 获取特定评论该服务器实现了模型上下文协议规范,提供:
评论对象包括:
Claude Desktop中未显示服务器:
构建错误:
npm install
以确保所有依赖项都已安装API连接问题:
要调试MCP服务器:
curl "https://onlinekommentar.ch/api/commentaries?search=test"
build/
目录中的构建输出git checkout -b feature-name
git commit -am 'Add new feature'
git push origin feature-name
本项目为开源项目。详情请参考许可证文件。
如有问题和疑问:
⚠️ 重要提示
此工具仅用于提供瑞士法律评论的信息。如需法律建议,请咨询合格的法律专业人士。