DeFi Quant Execution MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DeFi Quant Execution MCPCheck if a 2-hop USDC/WETH flashloan arb on Base nets a profit after fees and gas"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DeFi Quant Execution MCP
Exact Uniswap v3 Q64.96 tick math, MEV sandwich risk simulation, flashloan arbitrage profit modeling, and Base blob gas estimation.
Built specifically for Algorithmic traders, MEV searchers, Base L2 DeFi bot builders, and autonomous portfolio managers.
⚡ Quickstart
Smithery Install
smithery skill add whambammy/defi-quant-execution-mcpClaude Desktop / Cursor (claude_desktop_config.json)
{
"mcpServers": {
"defi-quant-execution-mcp": {
"command": "npx",
"args": ["-y", "@whambammy/defi-quant-execution-mcp"],
"env": {
"PAYMENT_WALLET": "0x9793E7269b3301893318dEa8338576Ba612F39B3",
"BASE_RPC_URL": "https://mainnet.base.org"
}
}
}
}Related MCP server: x402tools MCP Server
🛠️ Included Tools
Tool Name | Price (USDC) | Capability |
| $0.035 | Arbitrary-precision Q64.96 fixed-point math calculator for Uniswap v3 square root price $(\sqrt{P})$, tick-to-price conversion, and exact liquidity fee compounding. |
| $0.045 | Simulates pending swaps against Uniswap v3/v4 tick liquidity to compute exact MEV sandwich vulnerability, maximum extractable value, and safe slippage limits. |
| $0.02 | Calculates exact sqrtPriceX96 tick mathematics, price impact, and swap output amounts for concentrated liquidity pools on Base. |
| $0.045 | Calculates net arbitrage profit for multi-hop flashloans across Base L2 DEXes, factoring pool fee tiers, price impact, loan premium (0.09%), and gas burnt. |
| $0.035 | Evaluates EIP-4844 blob gas fee dynamics and Base L2 sequencing costs, projecting optimal block inclusion timing for transaction batch settlement. |
🔄 End-to-End Workflow
A trading agent identifies a potential arbitrage opportunity -> computes exact Q64.96 tick math across Uniswap v3 pools -> simulates MEV sandwich vulnerability -> projects Base L2 blob gas fees -> confirms net profitability before executing.
💰 The x402 Base L2 Micropayment Protocol
When an agent invokes a tool without payment, the server responds with a deterministic HTTP 402 Payment Required challenge containing:
Target tool price in USDC
Base Native USDC Contract:
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913Recipient payout wallet address
Single-use cryptographic nonce
Once broadcasted on Base L2, resubmitting with paymentSignature unlocks deterministic execution.
📄 License
MIT License. Created by Whambammy.
Available Tools
5 toolsbase_l2_blob_gas_price_projectorB
Evaluates EIP-4844 blob gas fee dynamics and Base L2 sequencing costs, projecting optimal block inclusion timing for transaction batch settlement. (0.035 USDC on Base L2)
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | Input parameters or JSON string payload for the tool execution | |
| paymentSignature | No | Base L2 USDC micropayment signature or transaction hash for x402 settlement |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It mentions a USDC charge '(0.035 USDC on Base L2)' but does not explain the payment flow, whether the tool executes on-chain, requires a signature, or what side effects occur. The agent is left without critical operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence that communicates the primary function and expected output. The parenthetical pricing note is a minor extra but not bloated; the overall structure is efficient and gets to the point quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is moderately complex (fee dynamics, timing projection, payment), yet the description omits what the returned result looks like, how the payment is processed, and any operational constraints. There is no output schema and no annotations, leaving several gaps an agent would need to fill before confidently invoking it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Both parameters are described in the schema (100% coverage), so the baseline is 3. The description adds domain context but does not explain what should go in the 'payload' or how to obtain/construct the paymentSignature beyond the schema's generic wording. It neither compensates for gaps nor contradicts the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb ('Evaluates'), a distinct resource (EIP-4844 blob gas fee dynamics and Base L2 sequencing costs), and a concrete outcome ('projecting optimal block inclusion timing'). It is distinguishable from the long sibling list, where no other tool handles blob gas or L2 fee projection, though the heavy jargon slightly limits clarity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the use case—optimizing batch settlement timing on Base L2—so an agent can infer when to call it. However, it does not explicitly state when to use this tool versus alternatives, nor does it provide exclusions or prerequisites, leaving the guidance implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compute_uniswap_v3_quoteC
Calculates exact sqrtPriceX96 tick mathematics, price impact, and swap output amounts for concentrated liquidity pools on Base. (0.02 USDC on Base L2)
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | Input parameters or JSON string payload for the tool execution | |
| paymentSignature | No | Base L2 USDC micropayment signature or transaction hash for x402 settlement |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. The description mentions 'exact sqrtPriceX96 tick mathematics' and 'price impact' but doesn't disclose whether this is a read-only computation, whether it requires network access, whether it simulates a swap, or what the output format is. The parenthetical '(0.02 USDC on Base L2)' is ambiguous and could mislead an agent into thinking the tool itself charges or transfers USDC. It doesn't clarify side effects, payment requirements, or failure modes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The main sentence is reasonably concise and front-loaded with the core action. However, the parenthetical '(0.02 USDC on Base L2)' is cryptic and wastes space without adding clear value. The description is short but not optimally structured because the parenthetical could confuse rather than inform. It earns a 3 because it's compact but contains an unclear element.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (Uniswap V3 concentrated liquidity math, price impact, swap outputs), the description is incomplete. There is no output schema, so the description should explain what the tool returns (e.g., expected output amount, price impact percentage, sqrtPriceX96 after swap). It doesn't mention required inputs like pool fee tier, liquidity, or current tick. The paymentSignature parameter is mentioned but its role is unclear. An agent would struggle to construct a valid payload or interpret the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, but the descriptions are generic: 'Input parameters or JSON string payload for the tool execution' and 'Base L2 USDC micropayment signature or transaction hash for x402 settlement'. The tool description does not explain what fields the payload should contain (e.g., pool address, token amounts, fee tier, tick range). The paymentSignature parameter is mentioned in the schema but the description doesn't clarify whether it's required for all calls or only for paid usage. The description adds minimal value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Calculates') and resource ('sqrtPriceX96 tick mathematics, price impact, and swap output amounts for concentrated liquidity pools on Base'). It clearly identifies the domain (Uniswap V3 concentrated liquidity on Base L2) and the outputs (price impact, swap output amounts). However, it doesn't explicitly distinguish itself from the sibling tool 'uniswap_v3_tick_math_precise' or 'calculate_dex_slippage_bounds', which could overlap in purpose. The parenthetical '(0.02 USDC on Base L2)' is confusing and appears to reference a payment amount rather than clarifying the tool's purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to use it instead of 'uniswap_v3_tick_math_precise' or 'calculate_dex_slippage_bounds'. The context of 'Base L2' and 'USDC' is mentioned but not explained as a usage condition. There is no when-to-use or when-not-to-use guidance, and no mention of prerequisites like needing a pool address or current tick.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
flashloan_arbitrage_profit_calculatorA
Calculates net arbitrage profit for multi-hop flashloans across Base L2 DEXes, factoring pool fee tiers, price impact, loan premium (0.09%), and gas burnt. (0.045 USDC on Base L2)
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | Input parameters or JSON string payload for the tool execution | |
| paymentSignature | No | Base L2 USDC micropayment signature or transaction hash for x402 settlement |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the disclosure burden. It usefully reveals formula assumptions such as the 0.09% loan premium and 0.045 USDC gas estimate, but it does not disclose whether the tool is read-only, what output to expect, or that a paymentSignature is involved in settlement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense sentence with a front-loaded verb and resource, followed by concrete assumptions. There is no filler or repetition of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex DeFi calculation with a generic string payload and no output schema, the description does not define the required payload fields, the output units/format, or the payment/settlement mechanics. An agent could not reliably invoke and interpret this tool based on the description alone.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds domain context and names calculation factors, but the payload parameter is still just a generic JSON string with no field-level structure, leaving the agent unable to construct a proper payload.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Calculates') and a specific resource ('net arbitrage profit for multi-hop flashloans across Base L2 DEXes'), and enumerates the factors involved. This clearly distinguishes it from closely related siblings like compute_uniswap_v3_quote and calculate_dex_slippage_bounds.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear scope: multi-hop flashlolans on Base L2 DEXes. However, it does not explicitly name alternatives or state when not to use this tool, which would be helpful given the large number of overlapping DeFi calculation siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mev_sandwich_risk_simulatorB
Simulates pending swaps against Uniswap v3/v4 tick liquidity to compute exact MEV sandwich vulnerability, maximum extractable value, and safe slippage limits. (0.045 USDC on Base L2)
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | Input parameters or JSON string payload for the tool execution | |
| paymentSignature | No | Base L2 USDC micropayment signature or transaction hash for x402 settlement |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Simulates' hints at no on-chain execution, and the parenthetical gives pricing/network context, but the description omits whether paymentSignature is required, whether external RPC calls are made, what happens on invalid payloads, and whether there are any side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense, front-loaded sentence followed by a relevant pricing/network parenthetical. It wastes no words, though a small amount of usage or input detail would make it more informative without bloating it.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema and no annotations, and the only parameter is an opaque JSON string. The description names three computed outputs but does not explain expected payload structure, payment requirements, failure behavior, or output format, leaving an agent under-equipped to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds some meaning by indicating the payload concerns pending swaps and Uniswap v3/v4 tick liquidity, but it does not specify the payload schema or any fields beyond the generic string description in the input schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Simulates' and names a concrete resource: pending swaps against Uniswap v3/v4 tick liquidity. It lists three concrete outputs — sandwich vulnerability, maximum extractable value, and safe slippage limits — which clearly distinguishes it from generic quote or slippage sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The use case is implied: call this when you need MEV sandwich-risk assessment for pending Uniswap swaps. However, there is no explicit when-to-use or when-not-to-use guidance and no mention of alternatives such as compute_uniswap_v3_quote or calculate_dex_slippage_bounds.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
uniswap_v3_tick_math_preciseB
Arbitrary-precision Q64.96 fixed-point math calculator for Uniswap v3 square root price $(\sqrt{P})$, tick-to-price conversion, and exact liquidity fee compounding. (0.035 USDC on Base L2)
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | Input parameters or JSON string payload for the tool execution | |
| paymentSignature | No | Base L2 USDC micropayment signature or transaction hash for x402 settlement |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry behavioral context. It does reveal a notable cost trait ('0.035 USDC on Base L2') and promises 'arbitrary-precision' and 'exact' compounding, which are useful behavioral details. However, it does not mention whether the operation is read-only, whether paymentSignature is mandatory, what the return value looks like, or any error/edge-case behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, jargon-loaded but information-dense sentence that front-loads the core purpose and ends with a concise cost note. Every element—arbitrary precision, Q64.96, specific operations, and price—serves a distinct role, with no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite the technical complexity and absence of an output schema, the description does not explain the expected payload structure, required fields, return format, or how paymentSignature fits into execution. An agent has enough to guess the domain but not enough to confidently construct a valid call without additional assumptions. The cost disclosure is helpful but does not fill the operational gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 100% description coverage, but the parameter descriptions are generic ('Input parameters or JSON string payload'). The tool description partially compensates by indicating what the payload should relate to (tick/price/fee compounding) and that paymentSignature is a Base L2 USDC micropayment. It does not specify required payload fields, format, or examples, so the added semantic value is moderate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description identifies a specific domain (Uniswap v3 tick/price math) and lists concrete operations: sqrt price, tick-to-price conversion, and liquidity fee compounding. It does not use an explicit verb like 'calculates' or 'converts', but the noun phrase 'math calculator for' is clear enough. It also implicitly distinguishes itself from the sibling compute_uniswap_v3_quote by focusing on mathematical conversion rather than quoting.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied through the listed operations: an agent can infer this tool is for arbitrary-precision tick math rather than quote simulation or slippage bounds. However, there is no explicit guidance about when NOT to use it or which sibling tool to prefer for related tasks like compute_uniswap_v3_quote or calculate_dex_slippage_bounds.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v1.0.0- First observed
base_l2_blob_gas_price_projector - First observed
compute_uniswap_v3_quote - First observed
flashloan_arbitrage_profit_calculator - First observed
mev_sandwich_risk_simulator - First observed
uniswap_v3_tick_math_precise
TDQS
Scored across 5 tools
Two tools (uniswap_v3_tick_math_precise and compute_uniswap_v3_quote) both center on Uniswap v3 tick math and sqrtPriceX96, making it unclear which to use for a given calculation. The other three tools are distinct, but the overlap is notable.
All names use snake_case, but the structure is mixed: most are noun phrases (e.g., mev_sandwich_risk_simulator), while one starts with a verb (compute_uniswap_v3_quote). The inconsistency in pattern reduces predictability.
Five tools is a reasonable count for a focused DeFi quant calculator suite, covering math, MEV, quotes, arbitrage, and gas. It is slightly thin for an 'execution' server, but each tool has a clear niche.
Despite the 'Execution' in the server name, no tool actually executes trades, manages positions, or interacts with wallets. The surface is limited to calculators and simulators, leaving a major gap in lifecycle coverage.
Maintenance
Related MCP Connectors
Pay-per-call tools for autonomous agents, settled in USDC on Base via x402.
x402-paid Base agent tools (USDC). 5 deterministic tools. No API keys. No NFT pass.
63 pay-per-call tools for agents: vision, text, data, web, blockchain. USDC on Base via x402.
Pay-per-call (x402/USDC-Base) web + crypto data tools for AI agents: audit, extract, crypto, DeFi.
Related MCP Servers
AlicenseAqualityDmaintenancePre-trade DeFi intelligence for AI agents. 20 paid x402 endpoints, USDC on Base.2353 npm1MIT- AlicenseAqualityCmaintenanceProvides AI agents with 10 pay-per-call utility tools (QR generation, DNS lookup, OCR, etc.) using USDC on Base via the x402 protocol, with agent's private key never leaving the agent.1135 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to resolve tokens, get quotes, check for honeypots/rug pulls, build swaps, and retrieve receipts via x402 micropayments.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to analyze Uniswap V3 pool liquidity depth and estimate price impact at 1%, 2%, 5%, and 10% levels before large trades, with pay-per-call micropayments via x402.MIT