addition
Add numbers securely using a vulnerable MCP server designed to demonstrate coding risks, aiding in educational security testing and awareness.
Instructions
Sum tool
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes |
Implementation Reference
- server.py:9-9 (registration)Registration of the 'addition' tool using the @mcp.tool() decorator.@mcp.tool()
- server.py:10-12 (handler)The handler function for the 'addition' tool. It takes a string 'a' and evaluates it using Python's eval() to compute the sum, which poses security risks as noted in comments.def addition(a): """Sum tool""" return eval(a)