logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-execute-arithmetic

A facility for dispatching numeric computations and predefined operations via the Model Context Protocol structure.

Author

mcp-execute-arithmetic logo

QuantGeekDev

No License

Quick Info

GitHub GitHub Stars 5
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

apisssequantgeekdevsse providesrequests quantgeekdevquantgeekdev mcp

NumericOpsEngine

Smithery Integration Status

An implementation of a Model Context Protocol (MCP) service leveraging the mcp-framework architecture.

Rapid Deployment Guide

bash

Install requisite dependencies

npm install

Compile the source code

npm run build

Directory Organization

calculator/ ├── src/ │ ├── tools/ # Definitions for MCP Tools │ │ └── ExampleTool.ts │ └── index.ts # Primary server bootstrapping file ├── package.json └── tsconfig.json

Augmenting Capabilities

This service starts with a placeholder tool in src/tools/ExampleTool.ts. You can integrate additional utilities using the scaffolding utility:

bash

Generate a new tool template

mcp add tool my-new-function

Suggested specialized utilities:

mcp add tool data-aggregator mcp add tool remote-connector mcp add tool file-persistence-manager

Tool Blueprint

Template structure for creating new functional units:

typescript import { MCPTool } from "mcp-framework"; import { z } from "zod";

interface OperationInputSpec { expression_string: string; }

class MathProcessor extends MCPTool { name = "math_solver"; description = "Evaluates complex mathematical statements provided as a string.";

schema = { expression_string: { type: z.string(), description: "The full mathematical expression to compute (e.g., '2 * (10 + 5)').", }, };

async execute(input: OperationInputSpec) { // Placeholder for actual calculation logic console.log(Executing expression: ${input.expression_string}); return { result: 42, units: "unitless" }; // Example return structure } }

export default MathProcessor;

Distribution via npm

  1. Refine package.json:

    • Ensure the package name is globally unique and adheres to npm standards.
    • Verify the semantic version.
    • Populate metadata fields: description, author, license, etc.
    • Confirm the bin field correctly points to the executable output.
  2. Build and verify locally: bash npm run build npm link calculator # Test CLI invocation locally

  3. Authenticate with the npm registry (register if needed): bash npm login

  4. Publish the artifact: bash npm publish

Once published, consumers can integrate this service into their Claude desktop environment or utilize it via npx.

Integration with Claude Desktop Client

Automated Setup via Smithery

To deploy the Arithmetic Engine to Claude Desktop automatically using Smithery:

bash npx -y @smithery/cli install @QuantGeekDev/mcp-add-sse --client claude

Local Development Configuration

Insert the following configuration into your Claude Desktop settings file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "calculator": { "command": "node", "args":["/absolute/path/to/calculator/dist/index.js"] } } }

Post-Publication Configuration

After successfully deploying to the public registry, update your Claude Desktop configuration:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "calculator": { "command": "npx", "args": ["calculator"] } } }

Build Cycle and Re-loading

  1. Implement desired modifications to tool code.
  2. Execute npm run build for compilation.
  3. The server will automatically incorporate the updated tool definitions upon subsequent startup.

Further Resources

WIKIPEDIA: The XMLHttpRequest (XHR) object represents an API designed to facilitate asynchronous data transfer between a web browser and a server. Its methodology permits a web-based application to issue server queries post-page-load and receive data back. XHR forms a cornerstone of the Ajax programming paradigm. Before Ajax gained traction, server communication primarily relied on traditional hyperlink navigation and form submissions, frequently resulting in complete page refreshes.

== Genesis == The conceptual foundation for XMLHttpRequest was formulated in the year 2000 by the engineering team at Microsoft Outlook. This concept was subsequently integrated into the Internet Explorer 5 browser release (1999). However, the initial invocation syntax deviated from the XMLHttpRequest identifier, instead utilizing COM object instantiations like ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). By the time Internet Explorer 7 was released (2006), universal browser support for the standardized XMLHttpRequest identifier was established. The XMLHttpRequest identifier has since become the established convention across all major browser engines, including Mozilla's Gecko (2002), Safari 1.2 (2004), and Opera 8.0 (2005).

=== Standardization Trajectory === The World Wide Web Consortium (W3C) issued the first Working Draft specification for the XMLHttpRequest object on April 5, 2006. On February 25, 2008, the W3C published the Level 2 specification draft, which introduced crucial enhancements such as progress monitoring capabilities, support for cross-site requests, and facilities for handling raw byte streams. Towards the conclusion of 2011, the Level 2 features were merged back into the primary specification document. In late 2012, development stewardship transitioned to the WHATWG, which now maintains the live document using Web IDL definitions.

== Operational Steps == Generally, initiating a data transfer using XMLHttpRequest entails a sequence of programming actions.

  1. Instantiation of an XMLHttpRequest object via its constructor call:
  2. Invocation of the "open" method to define the request method (e.g., GET/POST), designate the target resource URL, and specify synchronous or asynchronous execution mode:
  3. For asynchronous operations, assignment of an event handler to monitor state transitions:
  4. Triggering the network transmission by calling the "send" method:
  5. Processing state changes within the registered event listener. If server data is returned, it is typically accessible via the responseText attribute. When processing concludes, the object transitions to state 4, the terminal "done" state. Beyond these fundamental operations, XHR offers extensive controls over transmission parameters and response handling. Custom HTTP headers can be injected to guide server behavior, and payload data can be uploaded by supplying it as an argument to the "send" call. The incoming response can be deserialized from JSON into native JavaScript objects or handled incrementally as data segments arrive, bypassing the need to wait for the full payload. Furthermore, the request can be canceled preemptively or subjected to a timeout constraint.

== Inter-domain Communication ==

In the nascent phases of the World Wide Web's evolution, limitations in cross-origin data retrieval were identified, leading to security hurdles that initially prevented brea

See Also

`