Skip to main content
Glama
cris-devtrading

argentina-markets-mcp

argentina-markets-mcp

An MCP server that exposes Argentine market data to AI agents, plus the building blocks for a paper-trading agent with deterministic risk guardrails and an auditable decision log.

Paper trading only. Not financial advice. Quotes come from a public third-party API and may be delayed or inaccurate.

Status

Early stage, solo project. What works today:

Component

What it does

Tests

get_dolar_quote tool

MEP, CCL, official, blue, wholesale, card and crypto dollar quotes via dolarapi.com (no API key)

yes

Audit log

@audited decorator writes one JSON line per tool call (timestamp, args, result or error, duration)

yes

Risk module

Kill switch, per-order cap, position cap (reducing a position is always allowed), data-freshness check

yes

Paper trading

simulate_order runs quote, freshness check, risk check and a simulated fill against an in-memory portfolio; rejections are logged too

yes

Not built yet: BYMA equities/options/bonds tools, a persistent portfolio, and a strategy/agent loop on top of these tools.

Related MCP server: trading-mcp-server

Quick start

Requires Python 3.10+ (developed and tested on 3.12).

git clone https://github.com/cris-devtrading/argentina-markets-mcp.git
cd argentina-markets-mcp
uv venv --python 3.12 && source .venv/bin/activate
uv pip install -e ".[dev]"
pytest

Run the server over stdio:

python -m argentina_markets_mcp.server

Tools

  • ping: health check.

  • get_dolar_quote(tipo="mep"): returns buy/sell and the source timestamp. tipo accepts mep, ccl, oficial, blue, mayorista, tarjeta, cripto.

  • simulate_order(tipo, side, amount_ars): simulated buy/sell of USD against ARS. Buys fill at the ask, sells at the bid, no short positions. Returns filled or rejected with the reason.

  • get_paper_portfolio(): current simulated cash, USD and kill-switch state (in memory, resets on restart).

  • engage_kill_switch(reason): rejects all further orders. There is intentionally no tool to disengage it; restart the server.

Audit log

Every call to an audited tool appends a line to audit_log.jsonl (override with the AUDIT_LOG_PATH environment variable). The file is git-ignored. A logging failure never breaks the tool.

Risk guardrails

risk.py contains pure, network-free functions, so they are easy to test:

  • KillSwitch: when engaged, every order is rejected.

  • check_order: rejects orders above the per-order cap, and orders that would push a position above its cap unless they reduce it.

  • check_data_fresh: rejects stale or invalid quote timestamps.

The default limits in RiskLimits are placeholders, not recommendations. Configure them for your own case.

Secrets

No credentials belong in this repo. Copy .env.example to .env (git-ignored) for local settings.

License

MIT

Available Tools

5 tools
engage_kill_switchC

Activa el kill switch: rechaza todas las órdenes siguientes.

NameRequiredDescriptionDefault
reasonYes

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations at all, the description carries the full burden, and it discloses only the core effect (subsequent orders are rejected). It is silent on reversibility, whether already-open orders are cancelled, whether the state persists across sessions, and whether the required 'reason' is an audit record — critical gaps for what is clearly a high-impact mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One tight, front-loaded sentence with zero filler, which is good. But the brevity comes from omission rather than discipline — the sentence stops exactly where the risky details would begin.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-impact, likely irreversible control action with no annotations, no output schema, and an undocumented required parameter, the description does far too little. An agent could not safely predict the blast radius of calling it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the description never mentions the single required parameter, 'reason', so the agent gets no guidance on what to supply or why it is mandatory. The schema title 'Reason' is the only hint available.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Activa el kill switch') and states the concrete effect ('rechaza todas las órdenes siguientes'), so an agent can tell what the tool does. Sibling differentiation is implicit only in that no sibling resembles it, but the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this versus doing nothing, no prerequisite or confirmation guidance, and no note about how an agent should decide to invoke an emergency stop. The reader has to infer that this is for emergency halting of order flow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_dolar_quoteA

Cotización del dólar en Argentina (compra/venta).

tipo: mep, ccl, oficial, blue, mayorista, tarjeta o cripto. Solo informa cotizaciones; no es asesoramiento financiero.

NameRequiredDescriptionDefault
tipoNomep

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden. It does disclose that the tool is informational/read-only ('Solo informa cotizaciones; no es asesoramiento financiero'), but says nothing about data source, freshness/latency, or whether quotes are cached — a material gap for exchange-rate data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short lines: purpose first, then the valid type list, then the disclaimer. No filler, and the most important content is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A single optional parameter and no output schema, so the description needn't document returns in detail — but for a quote tool the agent still lacks any hint about the response shape (rate values, timestamp/currency) and about staleness. Adequate, not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and there is no enum, so the description's enumeration (mep, ccl, oficial, blue, mayorista, tarjeta, cripto) is the only source of valid values — high added value. It does not explain what the distinctions mean (mep vs ccl vs blue), which an agent unfamiliar with Argentine FX jargon may need.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource: returns the Argentine dollar exchange rate (buy/sell), and enumerates the quote types it covers. Against siblings like simulate_order, get_paper_portfolio and engage_kill_switch, it is unmistakably a market-data lookup rather than a trading or control action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the tool reports a quote of a given type, with 'mep' as the default. It never says when to reach for it (e.g. before pricing an order in ARS) or what to do if an unsupported type is passed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_paper_portfolioB

Estado de la cartera simulada (en memoria; se reinicia con el servidor).

NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose an important behavioral trait: the portfolio is in-memory and resets when the server restarts. However, it does not state whether the call is read-only, what the response contains, or any authorization requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no wasted words. The parenthetical adds the key volatility caveat efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter read tool with no annotations and no output schema, the description should ideally explain what the portfolio state includes (e.g., balances, positions). The volatility caveat is useful, but return-value expectations are left undefined.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there are no parameter semantics to explain; the baseline for 0 params is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies the specific resource ('cartera simulada') and that it returns its state. It does not explicitly contrast with siblings such as simulate_order or get_dolar_quote, so an agent must infer the read-only portfolio-status role from the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to call this tool versus alternatives like simulate_order or engage_kill_switch. Usage is only implied by the word 'Estado'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pingA

Health check.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. 'Health check' implies a non-mutating, low-risk operation, but it does not explicitly state that there are no side effects, what exactly is checked, or any authentication expectations. The output schema handles return-shape details, so this minimal disclosure is acceptable but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is only two words and contains no filler or repetition. It is front-loaded and appropriately sized for a simple, parameterless health-check tool, though it could be slightly more structured with a full sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters, an output schema, and low complexity, the description is largely sufficient. Still, it does not explicitly address when to call this tool, what a successful or failed health check means, or whether any setup is required, so there is a small but real gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is nothing to document. Per the baseline for zero-parameter tools, the description does not need to add parameter-level meaning, and none is missing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Health check' clearly conveys that this tool is a liveness or connectivity probe, even though it lacks a formal verb. It is naturally distinct from the sibling content-retrieval tools, so an agent can infer its role without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The purpose implies the usage context: call this tool to verify that the service/API is reachable or healthy. However, there is no explicit statement of when to prefer it over alternatives or any exclusion criteria, leaving some inference to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

simulate_orderA

Orden simulada (paper trading) de compra/venta de USD contra ARS.

side: 'buy' o 'sell'. amount_ars: monto en pesos, positivo. Pasa por los guardrails (kill switch, topes, frescura del dato). Devuelve status 'filled' o 'rejected' con el motivo.

NameRequiredDescriptionDefault
sideYes
tipoYes
amount_arsYes

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden well: it discloses that the order is simulated, passes through guardrails such as kill switch, caps, and data freshness, and returns 'filled' or 'rejected' with a reason. It still does not clarify whether or how the paper portfolio is mutated or whether any authentication is required.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short, front-loaded with the core purpose, and each line adds useful information about parameters, guardrails, and return values. There is no wasted prose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

It covers the core behavior and return statuses despite having no output schema, which is helpful. However, with no annotations and a required 'tipo' parameter entirely undocumented, the definition is not fully complete for safe invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains side with allowed values 'buy'/'sell' and amount_ars as a positive peso amount, but it completely omits the required 'tipo' parameter, leaving a significant gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: simulated buy/sell order of USD against ARS in paper trading. It clearly distinguishes this from real trading and from quote/portfolio siblings, but it does not explicitly name how it differs from get_dolar_quote or get_paper_portfolio.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through 'paper trading' and guardrail checks, suggesting this is for simulated order execution rather than quoting or portfolio lookup. However, it gives no explicit when-to-use guidance versus the sibling tools or when-not-to-use conditions.

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.

  1. 5 tool updatesv0.1.0
    • First observedengage_kill_switch
    • First observedget_dolar_quote
    • First observedget_paper_portfolio
    • First observedping
    • First observedsimulate_order

TDQS

A3.5/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: health check, dollar quote retrieval, simulated order placement, portfolio inspection, and kill-switch activation. The only interaction is that the kill switch affects future orders, but the boundary between the tools remains clear.

Naming Consistency4/5

The core tools use readable snake_case verb_noun naming such as get_dolar_quote, simulate_order, and engage_kill_switch. The lone ping tool is a minor deviation from the pattern but does not create confusion.

Tool Count5/5

Five tools is well-scoped for a small Argentina markets and paper-trading server. Each tool earns its place without excessive surface area.

Completeness3/5

The server covers quote retrieval, simulated order placement, portfolio state, and kill-switch activation, but it lacks a way to disengage or reset the kill switch. Once engaged, all future orders are permanently rejected until server restart, creating a notable dead end. Order history or portfolio reset operations are also absent.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Real-time Argentine exchange rates for AI agents. Dollar blue, oficial, MEP, CCL, crypto rates plus currency conversion and spread calculator.
    6
    9 npm
    5
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to query public Latin American FX rates and perform auditable ledger reconciliation using a multi-rule matching engine.
    6
    MIT