io.github.kcw2034/toss-invest-mcp
Click on "Install 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., "@io.github.kcw2034/toss-invest-mcpwhat are my current holdings?"
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.
Toss Securities Open API — MCP Server
An MCP server exposing the Toss Securities Open API (20 endpoints) as LLM tools, with backend-enforced trading guardrails.
Published on the MCP Registry as
io.github.kcw2034/toss-invest-mcp and installable from PyPI via uvx toss-invest-mcp.
Built with Python + FastMCP, httpx, and pydantic.
Tools
Category | Tools |
Market data |
|
Stock info |
|
Market info |
|
Account / asset |
|
Order info |
|
Order history |
|
Order execution |
|
Related MCP server: tossinvest-mcp
Install
pip install -e .(Development extras for the test suite: pip install -e ".[dev]".)
Configure
Credentials are read from the environment (OAuth2 client-credentials grant):
export TOSS_CLIENT_ID=...
export TOSS_CLIENT_SECRET=...
export TOSS_DEFAULT_ACCOUNT=12345 # optional fallback account numberAccount-scoped tools accept an optional account_id. Resolution order:
explicit account_id → TOSS_DEFAULT_ACCOUNT → error "Account ID required.".
Trading guardrails (secure by default)
Guardrails are enforced in code, not just in tool descriptions. They are active even
if their env var is unset — a missing setting falls back to a conservative default, so a
misconfigured deployment fails closed (order rejected) rather than open. Set a cap to off
to disable it.
Var | Default | Meaning |
|
| reject KRW orders above this notional |
|
| reject USD orders above this notional |
|
| reject LIMIT orders this far from market (fat-finger guard) |
|
| notional treated as high-value (Tier-2) |
|
| require |
|
| override the API base URL |
Safety model
create_order runs a read-only pre-flight (current price; sellable quantity for sells),
then evaluates the order before placing it:
Tier 1 — absolute (non-bypassable). Order notional and price-deviation caps reject unconditionally;
confirm=truecannot override them. If a sized order's notional cannot be determined (e.g. a MARKET order with no usable market price), it is rejected — never placed uncapped.Tier 2 — confirmation-gated. Full-position liquidation (SELL ≥ sellable quantity) and high-value orders return a structured
confirmation_requiredpreview instead of executing. The agent must re-call withconfirm=trueafter the human sees the preview. Confirmed high-value orders pass the API's ownconfirmHighValueOrderflag.cancel_orderexecutes immediately — cancelling only reduces exposure.
A blocked order returns a structured result (status, reason, preview, message) and
performs no write to the API.
Run with Claude
Add to your MCP client config (e.g. Claude Desktop / Claude Code mcpServers):
{
"mcpServers": {
"toss-invest": {
"command": "python",
"args": ["-m", "toss_invest_mcp.server"],
"env": {
"TOSS_CLIENT_ID": "...",
"TOSS_CLIENT_SECRET": "...",
"TOSS_DEFAULT_ACCOUNT": "12345"
}
}
}
}Development
uv run pytest # or: pytestThe test suite mocks all HTTP with respx — it makes no live API calls.
Note: the pre-flight field extractors (
_extract_price,_extract_sellableintools/order.py) infer response field names from the documented API and should be confirmed against live responses before production trading — a wrong field name would cause an order to be rejected (fail-closed), not placed uncapped.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables AI assistants to trade stocks directly through natural language by creating and managing bots, executing trades, accessing market data, and backtesting strategies.Last updated4MIT
- AlicenseAqualityBmaintenanceMCP server wrapping Toss Securities Open API, enabling stock price queries and trading for Korean and US stocks via natural language.Last updated3631MIT
- Alicense-qualityBmaintenanceEnables querying Korean and US stock information, quotes, account assets, and order history via Toss Securities Open API. Optionally supports order placement with preview and confirmation safeguards.Last updated1MIT
- FlicenseAqualityCmaintenanceEnables interaction with Toss Securities API for market data, stock information, account details, and order management.Last updated20
Related MCP Connectors
Provide AI assistants with real-time access to official SEC EDGAR filings and financial data. Enab…
Build, backtest, and deploy quantitative trading strategies from your AI agent.
Korea payments for AI agents — card, KakaoPay/NaverPay, 가상계좌 via Toss Payments. Never holds funds.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kcw2034/toss-invest-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server