MCP Expr-Lang is a powerful expression evaluation tool that integrates with Claude Desktop using the Model Context Protocol (MCP). It allows you to perform complex data manipulations, calculations, and transformations directly within your Claude conversations using the expr-lang expression evaluation engine.
To install MCP Expr-Lang for Claude Desktop automatically:
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
For Windows:
go build -o bin/server.exe
For macOS/Linux:
go build -o bin/server
chmod +x bin/server
For Windows:
{
"mcpServers": {
"eval": {
"command": "C:\\path\\to\\mcp-expr-lang\\bin\\server.exe"
}
}
}
For macOS/Linux:
{
"mcpServers": {
"eval": {
"command": "/path/to/mcp-expr-lang/bin/server"
}
}
}
Once installed, you can use the eval tool directly in your conversations with Claude by asking Claude to evaluate expressions.
User: Use eval to calculate "10 + 5 * 3"
Claude: [Uses eval tool] Result: 10 + 5 * 3 = 25
User: We have users = [{"Name": "John", "Age": 30},{"Name": "Ivan", "Age": 51},{"Name": "Eve", "Age": 15}] Use eval to calculate "sortBy(users, .Age, "desc")"
Claude: [Uses eval tool] Result: The expression returns the users sorted by age in descending order:
[
{"Age": 51, "Name": "Ivan"},
{"Age": 30, "Name": "John"},
{"Age": 15, "Name": "Eve"}
]
MCP Expr-Lang supports all features of the expr-lang engine, including:
For a complete guide to the expression language syntax and capabilities, see the expr-lang documentation.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "eval" '{"command":"npx","args":["-y","@ivan-saorin/mcp-expr-lang"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"eval": {
"command": "npx",
"args": [
"-y",
"@ivan-saorin/mcp-expr-lang"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"eval": {
"command": "npx",
"args": [
"-y",
"@ivan-saorin/mcp-expr-lang"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect