Skip to content

Instantly share code, notes, and snippets.

@rbsgn
Created May 31, 2026 10:59
Show Gist options
  • Select an option

  • Save rbsgn/598e6b0de03d0374d521134fe34bf254 to your computer and use it in GitHub Desktop.

Select an option

Save rbsgn/598e6b0de03d0374d521134fe34bf254 to your computer and use it in GitHub Desktop.
Full log demonstrating Claude Code inability to perform sample prompt from okama-mcp documentation
2026-05-31T09:34:59.775Z [okama] [info] Initializing server... { metadata: undefined }
2026-05-31T09:34:59.781Z [okama] [info] Using MCP server command: /bin/bash with args and path: {
metadata: {
args: [
'-c',
'cd /Users/rbsgn/Downloads/okama-mcp && poetry run okama-mcp stdio',
[length]: 2
],
paths: [
'/Users/rbsgn/.rvm/gems/ruby-3.3.9/bin',
'/Users/rbsgn/.rvm/gems/ruby-3.3.9@global/bin',
'/Users/rbsgn/.rvm/rubies/ruby-3.3.9/bin',
'/opt/homebrew/bin',
'/opt/homebrew/sbin',
'/usr/local/bin',
'/System/Cryptexes/App/usr/bin',
'/usr/bin',
'/bin',
'/usr/sbin',
'/sbin',
'/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin',
'/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin',
'/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin',
'/pkg/env/global/bin',
'/Library/Apple/usr/bin',
'/Library/TeX/texbin',
'/opt/podman/bin',
'/Users/rbsgn/.rvm/bin',
[length]: 19
]
}
} %o
2026-05-31T09:34:59.782Z [okama] [info] Server started and connected successfully { metadata: undefined }
2026-05-31T09:34:59.808Z [okama] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{"extensions":{"io.modelcontextprotocol/ui":{"mimeTypes":["text/html;profile=mcp-app"]}}},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0} { metadata: undefined }
╭──────────────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ ▄▀▀ ▄▀█ █▀▀ ▀█▀ █▀▄▀█ █▀▀ █▀█ │
│ █▀ █▀█ ▄▄█ █ █ ▀ █ █▄▄ █▀▀ │
│ │
│ │
│ │
│ FastMCP 3.3.0 │
│ https://gofastmcp.com │
│ │
│ 🖥 Server: okama-mcp, 3.3.0 │
│ 🚀 Deploy free: https://horizon.prefect.io │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────╮
│ 🎉 Update available: 3.3.1 │
│ Run: pip install --upgrade fastmcp │
╰──────────────────────────────────────────────────────────────────────────────╯
[05/31/26 12:35:04] INFO Starting MCP server 'okama-mcp' transport.py:209
with transport 'stdio'
2026-05-31T09:35:04.490Z [okama] [info] Message from server: {"jsonrpc":"2.0","id":0,"result":{"protocolVersion":"2025-11-25","capabilities":{"experimental":{},"logging":{},"prompts":{"listChanged":false},"resources":{"subscribe":false,"listChanged":false},"tools":{"listChanged":true},"extensions":{"io.modelcontextprotocol/ui":{}}},"serverInfo":{"name":"okama-mcp","version":"3.3.0"},"instructions":"Investment-analysis tools backed by the okama Python library. Use search_assets to discover ticker symbols (e.g. 'GLD.US', 'VNQ.US'); then build portfolios, run backtests, Monte Carlo forecasts and efficient frontier optimisation. All tools are stateless — pass the full portfolio specification with every call."}} { metadata: undefined }
2026-05-31T09:35:04.490Z [okama] [info] Message from client: {"method":"notifications/initialized","jsonrpc":"2.0"} { metadata: undefined }
2026-05-31T09:35:04.491Z [okama] [info] Message from client: {"method":"tools/list","params":{},"jsonrpc":"2.0","id":1} { metadata: undefined }
2026-05-31T09:35:04.491Z [okama] [info] Message from client: {"method":"prompts/list","params":{},"jsonrpc":"2.0","id":2} { metadata: undefined }
2026-05-31T09:35:04.491Z [okama] [info] Message from client: {"method":"resources/list","params":{},"jsonrpc":"2.0","id":3} { metadata: undefined }
2026-05-31 12:35:04,491 - INFO - Processing request of type ListToolsRequest
2026-05-31 12:35:04,494 - INFO - Processing request of type ListPromptsRequest
2026-05-31 12:35:04,495 - INFO - Processing request of type ListResourcesRequest
2026-05-31T09:35:04.495Z [okama] [info] Message from server: {"jsonrpc":"2.0","id":1,"result":{"tools":[{"name":"search_assets","description":"Search for okama tickers by name, ticker, or ISIN.","inputSchema":{"additionalProperties":false,"properties":{"query":{"type":"string","description":"Free-text query (case-in...[10373 chars truncated]...Y-MM' bounds."},"full":{"default":false,"type":"boolean","description":"If True, return entire series. Otherwise long series are truncated."}},"type":"object"},"outputSchema":{"additionalProperties":true,"type":"object"},"_meta":{"fastmcp":{"tags":[]}}}]}} { metadata: undefined }
2026-05-31T09:35:04.496Z [okama] [info] Message from server: {"jsonrpc":"2.0","id":2,"result":{"prompts":[]}} { metadata: undefined }
2026-05-31T09:35:04.496Z [okama] [info] Message from server: {"jsonrpc":"2.0","id":3,"result":{"resources":[]}} { metadata: undefined }
2026-05-31T09:37:36.796Z [okama] [info] Message from client: {"method":"tools/call","params":{"name":"analyze_portfolio","arguments":{"portfolio":{"assets":["GLD.US","VNQ.US"],"weights":[0.3,0.7],"ccy":"USD","first_date":"2010-05","last_date":"2025-05","rebalancing_period":"year","inflation":true}}},"jsonrpc":"2.0","id":4} { metadata: undefined }
2026-05-31 12:37:36,798 - INFO - Processing request of type CallToolRequest
2026-05-31T09:37:41.532Z [okama] [info] Message from server: {"jsonrpc":"2.0","id":4,"result":{"content":[{"type":"text","text":"{\"spec\":{\"assets\":[\"GLD.US\",\"VNQ.US\"],\"weights\":[0.3,0.7],\"ccy\":\"USD\",\"first_date\":\"2010-05\",\"last_date\":\"2025-05\",\"rebalancing_period\":\"year\",\"inflation\":true,...[1804 chars truncated]...yield","LTM",0.026468,null],["Risk","15 years, 1 months",0.148261,null],["CVAR (α=1)","15 years, 1 months",0.179242,null],["Max drawdown","15 years, 1 months",-0.233814,null],["Max drawdown date","15 years, 1 months","2022-09-30",null]]}},"isError":false}} { metadata: undefined }
2026-05-31T09:37:48.019Z [okama] [info] Message from client: {"method":"tools/call","params":{"name":"get_portfolio_wealth_index","arguments":{"portfolio":{"assets":["GLD.US","VNQ.US"],"ccy":"USD","first_date":"2010-05","last_date":"2025-05","rebalancing_period":"year","weights":[0.3,0.7]},"full":true}},"jsonrpc":"2.0","id":5} { metadata: undefined }
2026-05-31 12:37:48,020 - INFO - Processing request of type CallToolRequest
[05/31/26 12:37:48] Error calling tool 'get_portfolio_wealth_index'
╭─────────── Traceback (most recent call last) ────────────╮
│ /Users/rbsgn/Downloads/okama-mcp/src/okama_mcp/errors.py │
│ :89 in wrapper │
│ │
│ 86 │ @functools.wraps(func) │
│ 87 │ def wrapper(*args: Any, **kwargs: Any) -> T: │
│ 88 │ │ try: │
│ ❱ 89 │ │ │ return func(*args, **kwargs) │
│ 90 │ │ except OkamaMcpError: │
│ 91 │ │ │ raise │
│ 92 │ │ except Exception as exc: # noqa: BLE001 — │
│ boundary │
│ │
│ /Users/rbsgn/Downloads/okama-mcp/src/okama_mcp/tools/por │
│ tfolio.py:209 in get_portfolio_wealth_index │
│ │
│ 206 │ wi = pf.wealth_index │
│ 207 │ return { │
│ 208 │ │ "currency": getattr(pf, "currency", None), │
│ ❱ 209 │ │ "wealth_index": series_to_json(wi, full=fu │
│ 210 │ } │
│ 211 │
│ 212 │
│ │
│ ... 1 frames hidden ... │
│ │
│ /Users/rbsgn/Downloads/okama-mcp/src/okama_mcp/serializa │
│ tion.py:89 in _series_payload │
│ │
│ 86 │
│ 87 def _series_payload(s: pd.Series) -> dict[str, Any │
│ 88 │ return { │
│ ❱ 89 │ │ "name": str(s.name) if s.name is not None │
│ 90 │ │ "index": _index_to_iso(s.index), │
│ 91 │ │ "values": [value_to_json(v) for v in s.tol │
│ 92 │ } │
│ │
│ /Users/rbsgn/Library/Caches/pypoetry/virtualenvs/okama-m │
│ cp-w2K-hCqV-py3.14/lib/python3.14/site-packages/pandas/c │
│ ore/generic.py:6206 in __getattr__ │
│ │
│ 6203 │ │ │ and self._info_axis._can_hold_identi │
│ 6204 │ │ ): │
│ 6205 │ │ │ return self[name] │
│ ❱ 6206 │ │ return object.__getattribute__(self, nam │
│ 6207 │ │
│ 6208 │ @final │
│ 6209 │ def __setattr__(self, name: str, value) -> N │
╰──────────────────────────────────────────────────────────╯
AttributeError: 'DataFrame' object has no attribute 'name'
The above exception was the direct cause of the following
exception:
╭─────────── Traceback (most recent call last) ────────────╮
│ /Users/rbsgn/Library/Caches/pypoetry/virtualenvs/okama-m │
│ cp-w2K-hCqV-py3.14/lib/python3.14/site-packages/fastmcp/ │
│ server/server.py:1274 in call_tool │
│ │
│ /Users/rbsgn/Library/Caches/pypoetry/virtualenvs/okama-m │
│ cp-w2K-hCqV-py3.14/lib/python3.14/site-packages/fastmcp/ │
│ tools/base.py:379 in _run │
│ │
│ ... 5 frames hidden ... │
│ │
│ /Users/rbsgn/Library/Caches/pypoetry/virtualenvs/okama-m │
│ cp-w2K-hCqV-py3.14/lib/python3.14/site-packages/pydantic │
│ /type_adapter.py:441 in validate_python │
│ │
│ /Users/rbsgn/Downloads/okama-mcp/src/okama_mcp/errors.py │
│ :93 in wrapper │
│ │
│ 90 │ │ except OkamaMcpError: │
│ 91 │ │ │ raise │
│ 92 │ │ except Exception as exc: # noqa: BLE001 — │
│ boundary │
│ ❱ 93 │ │ │ raise translate_exception(exc) from exc │
│ 94 │ │
│ 95 │ return wrapper │
│ 96 │
╰──────────────────────────────────────────────────────────╯
OkamaMcpError: 'DataFrame' object has no attribute 'name'
2026-05-31T09:37:48.218Z [okama] [info] Message from server: {"jsonrpc":"2.0","id":5,"result":{"content":[{"type":"text","text":"Error calling tool 'get_portfolio_wealth_index': 'DataFrame' object has no attribute 'name'"}],"isError":true}} { metadata: undefined }
2026-05-31T09:37:53.684Z [okama] [info] Message from client: {"method":"tools/call","params":{"name":"get_portfolio_drawdowns","arguments":{"portfolio":{"assets":["GLD.US","VNQ.US"],"ccy":"USD","first_date":"2010-05","last_date":"2025-05","rebalancing_period":"year","weights":[0.3,0.7]}}},"jsonrpc":"2.0","id":6} { metadata: undefined }
2026-05-31 12:37:53,685 - INFO - Processing request of type CallToolRequest
2026-05-31T09:37:53.695Z [okama] [info] Message from server: {"jsonrpc":"2.0","id":6,"result":{"content":[{"type":"text","text":"{\"max_drawdown\":-0.233814,\"max_recovery_months\":31,\"drawdowns\":{\"name\":\"portfolio_2047.PF\",\"index\":[\"2010-05-31\",\"2010-06-30\",\"2010-07-31\",\"2010-08-31\",\"2010-09-30\",\...[8682 chars truncated]...1","2014-10-31","2016-02-29","2016-05-31","2019-01-31","2019-04-30","2019-12-31","2020-11-30","2021-02-28","2021-09-30","2021-11-30","2024-07-31","2024-10-31","2025-02-28"],"values":[4,1,1,1,5,1,2,3,1,13,1,2,13,1,30,1,2,10,2,1,1,31,1,3]}},"isError":false}} { metadata: undefined }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment