Skip to main content
Glama

SohiB

Research Indonesian equities with AI agents through your own Stockbit account.

SohiB is a local MCP server. Point Claude Code, Claude Desktop, Codex, Cursor, OpenClaw or any other MCP client at it and the agent gains sixteen read-only research tools: company search, key statistics, financial statements, price history, analyst consensus, peer comparison, corporate actions, the dividend calendar and unsaved screening.

Every request runs inside a Chrome tab where you are already signed in to Stockbit — the page reads its own session cookie and sets the auth header itself, so SohiB never asks for your password, never stores a token, and its own process never sees one either. Read-only is structural here, not a setting: there is no login command, no token store and no order, watchlist or portfolio route anywhere in the codebase to turn on.

SohiB is an independent open-source project. It is not a Stockbit product. Use it with your own account under Stockbit's terms of service.

How it works

  1. sohib connect opens a dedicated Chrome profile with a loopback-only debugging port. You sign in to Stockbit yourself, including any device verification.

  2. When an agent calls a tool, SohiB attaches to that tab over the local debugging connection and runs one fixed JavaScript function that calls Stockbit's own web API from the page. The page reads its session token from Stockbit's cookie and sets the header itself. The token never leaves the browser.

  3. The response is validated, normalized into one envelope (records, provenance, pagination, warnings, error) and returned to the agent. Only the routes listed in sohib/stockbit/api_routes.py can be requested.

Related MCP server: jv-idx-mcp

Requirements

  1. Python 3.12 or newer

  2. Google Chrome or Chromium on the same machine as your agent client

  3. A Stockbit account

  4. macOS, Linux or Windows. Windows support is new; please report issues.

Quickstart

git clone https://github.com/yusufsiregar44/sohib.git && cd sohib
python3 -m pip install .             # not yet on PyPI; install from this checkout
sohib setup                          # private configuration in your user data directory
sohib connect                        # opens Chrome; sign in to Stockbit yourself
sohib doctor --smoke SIDO            # checks the session and runs one live search

Then print the configuration for your client and paste it where that client expects it:

sohib config claude      # Claude Code and Claude Desktop (mcpServers JSON)
sohib config codex       # Codex (TOML block)
sohib config openclaw    # mcporter JSON for OpenClaw
sohib config mcp         # generic mcpServers JSON (Cursor, Windsurf, others)

For Claude Code, one command is enough:

sohib config claude > sohib-mcp.json && claude --mcp-config sohib-mcp.json

Keep exactly one Stockbit tab open in the SohiB Chrome window. After a reboot, run sohib connect again; the profile keeps your session until Stockbit expires it, at which point tools return AUTH_EXPIRED or AUTH_CHALLENGE and you sign in again in the browser.

Try asking your agent:

Search Stockbit for SIDO, confirm the symbol, compare its PE ratio with its industry, and show the last four quarters of revenue. Cite the source URLs and keep the warnings.

Tools

Tool

What it returns

search_companies

IDX equity candidates for a symbol or name; warrants excluded, ambiguity preserved

get_company_summary

Identity, sector classification and the last provider quote

get_key_statistics

Grouped valuation, profitability, growth and balance-sheet metrics

list_metrics

Metric labels and IDs for keystats, screener, fundachart, comparison and financials

get_financial_statements

Income statement, balance sheet or cash flow cells; quarterly, annual or TTM

get_fundamental_history

Historical series for one FundaChart metric

get_price_series

LINE price points with a period summary (not OHLCV)

get_price_performance

Price change, high and low across provider windows

get_analyst_consensus

Recommendation counts, price targets and yearly estimates

get_peer_comparison

Ratios beside industry and sector aggregates, plus peer symbols

get_corporate_actions

Dividends, meetings, splits and tender offers with dates kept separate

get_dividend_calendar

Market-wide dividend calendar and today's scheduled events

list_screening_universes

Public index and sector universes; private watchlists excluded

list_screeners

Built-in presets, or explicitly requested saved/favourite screens

get_screener

A selected template's rules/universe/columns or its paginated results

screen_equities

Unsaved numeric or ratio-comparison screens, public universes, extra columns and metric sorting

Screener results contain five companies per tool page; follow next_page with the same arguments. See screener examples and limits.

Full contracts, input schemas and live evidence: docs/stockbit.

What the agent gets back

Every tool returns the same envelope. status is ok, partial (valid data with warnings you should keep) or error. Records carry a value, the provider's display string, unit, currency, period and a missing_reason when the provider had no value. Missing values are never turned into zero. provenance.fetched_at is retrieval time, not publication time; data_as_of is null unless the provider states it. Each record cites a source_url on stockbit.com.

Safety model

None of this is a default you could switch off — it is the entire feature set. There is no code path anywhere in this repository that stores a token or places an order.

  1. Read-only. There are no order, watchlist-content, portfolio or account-management tools. Saved/favourite screen templates can be read explicitly. The only POST executes an unsaved screen whose body is checked field by field.

  2. Your credentials stay with you. SohiB has no login step and no password file. The browser reads its own cookie; SohiB's Python process never sees the token.

  3. Fixed page function. Agents pass arguments, never JavaScript. Paths are validated against the allowlist before anything is sent to the browser.

  4. Explicit failure. Expired sessions, verification prompts, rate limits and provider blocks come back as typed errors. Nothing retries, nothing logs in for you, nothing bypasses Cloudflare.

  5. One call at a time per browser. Concurrent callers get a busy error rather than a queue.

See SECURITY.md for details and how to report a problem.

Limits

  1. Price data is the provider's LINE series only. Timezone and adjustment are unverified.

  2. Latency is dominated by Stockbit's response time: usually one to three seconds, occasionally much longer on cold endpoints. Give your client a tool timeout of at least 60 seconds.

  3. Responses are capped at about 24 KB per page. Use query filters and page to move through large results.

  4. Nothing here is investment advice. Values are observations at retrieval time.

Development

git clone https://github.com/yusufsiregar44/sohib.git && cd sohib
python3 -m venv .venv && source .venv/bin/activate
python -m pip install -e . && python -m pip install --group dev
python -m ruff check . && python -m ruff format --check .
python -m unittest discover -s tests -v

Tests run offline against synthetic examples; optional private-capture tests skip when local evidence is absent. Live verification against Stockbit is manual; a descriptive summary of the last run is in docs/stockbit/stockbit-evidence. See CONTRIBUTING.md for how to add an endpoint.

Documentation

  1. Setup and browser lifecycle

  2. MCP server, CLI and verified clients

  3. Codex and Claude · OpenClaw

  4. Architecture and decisions

  5. Stockbit API catalogue, contracts and evidence

License

Apache-2.0. See LICENSE.

Available Tools

3 tools
get_key_statisticsA
Read-onlyIdempotent

Read key statistics for a confirmed symbol, filtered by label/ID. Pages contain up to 20 records. Preserve missing periods, currency and source dates. Mode: disabled. Research is disabled; calls return AUTH_REQUIRED without retrieving data.

Inputs: page (required), query (required), symbol (required). Returns: error, status, records, warnings, +2 more

list_metricsA
Read-onlyIdempotent

Discover metric metadata without numeric values. keystats and financials require a symbol; screener, fundachart and comparison are market-wide (symbol=null). IDs are namespaced per service; never merge them. Mode: disabled. Research is disabled; calls return AUTH_REQUIRED without retrieving data.

Inputs: page (required), query (required), symbol (required), namespace (required). Returns: error, status, records, warnings, +2 more

search_companiesA
Read-onlyIdempotent

Search IDX equities by symbol or company name. Excludes warrants; preserves multiple candidates. Confirm the company before fetching statistics. Mode: disabled. Research is disabled; calls return AUTH_REQUIRED without retrieving data.

Inputs: query (required). Returns: error, status, records, warnings, +2 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a distinct action: searching companies, listing metric metadata, and retrieving key statistics. There is no overlap or ambiguity; even though all are disabled, their purposes are clear.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern: search_companies, list_metrics, get_key_statistics. This predictable naming makes it easy for an agent to infer functionality.

    Tool Count5/5

    With only 3 tools, the server is tightly scoped to a focused research workflow (search, discover metrics, retrieve stats). This is within the ideal 3-15 range and each tool earns its place.

    Completeness4/5

    The tools cover a basic read-only lifecycle: search for a company, discover available metrics, and retrieve specific statistics. Minor gaps exist (e.g., no full financial statements or historical data), but the core workflow is supported without dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Provides AI assistants with comprehensive access to real-time and historical financial market data including stocks, options, crypto, and forex through the InsightSentry API. Supports 28+ specialized tools for market analysis, screening, and news retrieval, functioning as both an MCP server and standalone CLI.
      29
      228 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server exposing Indonesia Stock Exchange (IDX) market data as tools — fundamentals, broker flow, company profiles, and technical analysis via TA-Lib.
      2
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A production-grade MCP server that provides AI assistants with real-time financial market data, company metrics, and historical prices using yfinance and FastMCP.
      MIT
    • A
      license
      B
      quality
      A
      maintenance
      Read-only MCP server for Stockbit (IDX market data) providing broker summary/bandarmology, quotes, top movers, orderbook, fundamentals, and sentiment using your own session. Unofficial and does not place orders.
      41
      135 npm
      58
      MIT