MCP 表达式语言是一款强大的表达式评估工具,专为 Claude 桌面版设计,通过模型上下文协议 (MCP) 实现集成。它能让用户在 Claude 对话中轻松执行复杂的数据操作、计算和转换。
MCP Expr-Lang 实现了 Claude AI 与功能强大的 expr-lang 表达式评估引擎的无缝集成。借助该工具,您能够直接在 Claude 对话里执行复杂的数据操作、计算和转换。
使用 MCP Expr-Lang,您可以:
要通过 Smithery 自动为 Claude 桌面版安装 MCP Expr-Lang,可使用以下命令:
npx -y @smithery/cli install @ivan-saorin/mcp-expr-lang --client claude
git clone https://github.com/ivan-saorin/mcp-expr-lang.git
cd mcp-expr-lang
go mod download
go build -o bin/server.exe
go build -o bin/server
chmod +x bin/server
config.json 文件中:{
"mcpServers": {
"eval": {
"command": "C:\\path\\to\\mcp-expr-lang\\bin\\server.exe"
}
}
}
{
"mcpServers": {
"eval": {
"command": "/path/to/mcp-expr-lang/bin/server"
}
}
}
在您的 Claude 脚本中使用以下内容进行基本数学运算:
{
"operations": {
"add": {
"a": 10,
"b": 20
}
}
}
Claude 将返回结果:
{
"result": 30
}
在您的 Claude 脚本中使用以下内容进行数组操作:
{
"operations": {
"filter": {
"array": [1, 2, 3, 4],
"condition": "> 2"
}
}
}
Claude 将返回结果:
{
"result": [3, 4]
}
检查以下几点:
config.json 文件是否正确配置。欢迎任何贡献!如果要改进 MCP Expr-Lang,请按照以下步骤操作:
git checkout -b feature/amazing-feature)。git commit -m 'Add some amazing feature')。git push origin feature/amazing-feature)。本项目使用 MIT License 许可证,详情请见 LICENSE 文件。
由 Ivan Saorin 热心打造