Docs menuexpand_more
MCP
Using MCP
https://mcp.zenithcode.net/mcplanStreamable HTTP (stateless)
The server simply takes JSON-RPC over POST. It keeps no session, so there is no SSE stream or long-lived connection (GET returns 405). Supported protocol versions: 2025-06-18, 2025-03-26 and 2024-11-05.
keyAPI key authentication
Send the same key you use for the REST API, as Authorization: Bearer or x-api-key. Listing tools (tools/list) works without a key; calling a tool (tools/call) needs one.
visibilityRead-only
Every tool only reads data; none writes or changes settings. Each tool calls its /stable endpoint with the same authentication and quota, so responses have the same shape as the API.
Auth header
Send either one. Replace YOUR_API_KEY with a key issued in your dashboard.
Authorization: Bearer YOUR_API_KEY # or x-api-key: YOUR_API_KEY
Claude and ChatGPT connectors, which cannot set headers, connect with OAuth (browser sign-in). See “Connect with OAuth” below.
Connect with OAuth (Claude, ChatGPT)
Enter the server URL, sign in to ZENITH Code and approve access. There is no API key to paste.
Claude custom connector (claude.ai, Claude Desktop, mobile)
Steps
- In Claude’s settings, open Connectors and add a custom connector.
- Enter a name (for example, ZENITH Code) and the server URL above. Leave the OAuth Client ID and Secret under advanced settings empty.
- Click Connect on the new connector. The ZENITH Code sign-in page opens; sign in and approve access.
- The tools are now available in your chats. The tool list is visible before you sign in, and Claude may ask you to connect the first time it calls a tool.
Check Claude’s documentation for which plans can use custom connectors and for organization admin settings. Menu names may differ between app versions.
ChatGPT connector (developer mode)
Steps
- In ChatGPT’s settings, go to Apps & Connectors → Advanced settings and turn on developer mode.
- Click Create, then enter a name and the server URL above. Choose OAuth for authentication.
- After you create it, the ZENITH Code sign-in page opens; sign in and approve access.
- Enable the connector in a chat to use the tools.
Plan availability and menu names for developer mode are as of October 2026. If they have changed, follow OpenAI’s documentation.
data_usageHow usage is counted
- check_circleOAuth usage counts as your account’s highest-plan API key. Monthly tokens are shared with usage through the auth header.
- check_circleYou need at least one active API key to call tools. Create one in the dashboard first (the Free plan is fine).
- check_circleTo disconnect, remove the connector in Claude or ChatGPT. Revoking all of your keys also stops tool calls over OAuth.
Client setup
Every client just needs the URL and the header. Restart the client after configuring it and the tools appear.
Claude Code
Run one command in your terminal. The second form (--scope user) registers the server for every project. Check the connection with claude mcp list.
Terminal
claude mcp add --transport http zenith-code https://mcp.zenithcode.net/mcp \ --header "Authorization: Bearer YOUR_API_KEY" claude mcp add --transport http --scope user zenith-code https://mcp.zenithcode.net/mcp \ --header "Authorization: Bearer YOUR_API_KEY" claude mcp list
To share the setup with a team, put the generic JSON config below in the project’s .mcp.json and pass the key through the ZENITH_API_KEY environment variable, so the key never lands in the repository.
Claude Desktop
From the app’s Connectors screen, connect with the steps in “Connect with OAuth” above. To use an API key in the config file instead, use the open-source mcp-remote bridge (requires Node.js), which forwards requests with the header attached.
claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\)
{
"mcpServers": {
"zenith-code": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.zenithcode.net/mcp",
"--header",
"x-api-key:${ZENITH_API_KEY}"
],
"env": {
"ZENITH_API_KEY": "YOUR_API_KEY"
}
}
}
}The header is written without a space after x-api-key: to avoid argument-splitting problems on Windows. Restart Claude Desktop after saving.
Cursor
Add it to Cursor’s MCP config file.
~/.cursor/mcp.json (all projects) or .cursor/mcp.json (per project)
{
"mcpServers": {
"zenith-code": {
"url": "https://mcp.zenithcode.net/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}After saving, check that the server is enabled in the MCP section of Cursor’s settings.
VS Code (GitHub Copilot)
Add it to .vscode/mcp.json in your workspace to use the tools in Copilot Chat agent mode. With inputs, VS Code prompts for the key the first time and does not store it in the file.
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "zenith-api-key",
"description": "ZENITH Code API key",
"password": true
}
],
"servers": {
"zenith-code": {
"type": "http",
"url": "https://mcp.zenithcode.net/mcp",
"headers": {
"Authorization": "Bearer ${input:zenith-api-key}"
}
}
}
}Switch Copilot Chat to agent mode; if zenith-code appears in the tool list, you are connected.
ChatGPT / OpenAI API
In the ChatGPT app, connect with the steps in “Connect with OAuth” above. With the OpenAI Responses API, you can pass headers to an MCP tool and use an API key.
Python (openai package)
from openai import OpenAI
client = OpenAI()
resp = client.responses.create(
model="gpt-4.1",
tools=[{
"type": "mcp",
"server_label": "zenith_code",
"server_url": "https://mcp.zenithcode.net/mcp",
"headers": {"Authorization": "Bearer YOUR_API_KEY"},
"require_approval": "never",
}],
input="How many years in a row has Toyota (7203) raised its dividend?",
)
print(resp.output_text)Setting require_approval to never skips the confirmation for each tool call. Replace the model name with the one you use.
Generic JSON config
Most clients that support Streamable HTTP and headers accept this shape (it is also the format of Claude Code’s .mcp.json).
.mcp.json or similar (file and key names vary by client)
{
"mcpServers": {
"zenith-code": {
"type": "http",
"url": "https://mcp.zenithcode.net/mcp",
"headers": {
"Authorization": "Bearer ${ZENITH_API_KEY}"
}
}
}
}The part after Bearer reads the key from the ZENITH_API_KEY environment variable. If your client does not expand environment variables, write the key directly. Some clients spell the type as streamable-http.
Check with curl
Before configuring a client, you can test the server and your key with curl. The first request lists the tools without a key; the second calls one tool with your key.
curl -s https://mcp.zenithcode.net/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
curl -s https://mcp.zenithcode.net/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_dividend_streaks","arguments":{"symbol":"7203"}}}'Like the REST API, the second request consumes the cost of the endpoint it calls (here /stable/dividend-streaks, 1 token). Without a key or a sign-in, you get HTTP 401 with a WWW-Authenticate header pointing to the OAuth setup.
Sample prompts and the tools they use
The AI picks tools to fit the question. If you only give a company name, it first looks up the ticker code with search_company.
“Show Toyota’s annual dividend for the last five years and how many years it has gone without a cut.”
Tools used
search_company1 tokenget_dividend_streaks1 token
Resolves the name to ticker 7203, then gets the increase and no-cut streaks plus the annual dividend per fiscal year in one call.
“Summarise Mitsubishi Corp. (8058)’s top 10 shareholders and the number and total carrying amount of its strategic shareholdings.”
Tools used
get_major_shareholders1 tokenget_cross_shareholdings1 token
Both come from the latest annual report. Responses include the document ID and EDINET URL, so you can ask the AI to cite its sources.
“20 stocks with ROE of at least 10% and a dividend yield of at least 3%, highest yield first.”
Tools used
screen_stocks10 tokens
Calls the screener with ratios as decimals: roeMoreThan=0.1, dividendYieldMoreThan=0.03, sortBy=dividendYield, limit=20.
“Summarise the business risks section of Sony Group’s latest annual securities report.”
Tools used
search_company1 tokenget_annual_report_text10 tokens
Gets the table of contents without tag, then reads the body with tag=risks (two calls). The text is long, so it also uses a lot of the AI’s context.
“Compare Keyence with its peers on PER and ROE.”
Tools used
get_peers10 tokensget_industry_benchmarks10 tokens
Returns same-sector companies closest in market cap, plus the sector median.
“List the companies reporting earnings in the next two weeks.”
Tools used
get_earnings_calendar1 token
Gets scheduled earnings announcements for the from / to range.
Token costs
Each tool call consumes the tokens of the one /stable endpoint it calls (billing and quota are shared with the REST API).
| Tool | Endpoint called | Tokens |
|---|---|---|
| get_company_profile | /stable/profile | 1 |
| get_dividends | /stable/dividends | 1 |
| get_income_statement | /stable/income-statement | 1 |
| get_full_financial_statement | /stable/financial-statement-full | 10 |
| screen_stocks | /stable/screener | 10 |
| get_annual_report_text | /stable/text-blocks | 10 |
| list_stocks | /stable/stock-list | 100 |
- check_circleThe AI may call several tools for one question. The sample prompts above use roughly 2 to 21 tokens each.
- check_circleConnecting (initialize) and listing tools (tools/list) do not consume tokens.
- check_circleThe Free plan includes 5,000 tokens a month. Avoid letting the AI repeatedly call full-list tools such as list_stocks (100 tokens).
- check_circleYour AI client’s own usage (model input and output tokens) is billed separately. Annual report text and long histories produce large responses, so narrowing limit or the date range saves context.
All tools (72)
Clients show the tools under these names. Descriptions are bilingual, so the AI can pick the right tool even when you ask with Japanese names and terms.
search_companyget_company_profileget_income_statementget_balance_sheetget_cash_flowget_key_metricsget_full_financial_statementget_quoteget_key_metrics_latestget_historical_pricesget_dividendsget_earnings_calendarget_major_shareholderssearch_by_shareholderget_extraordinary_report_eventsscreen_stocksget_rankingsget_segmentsget_workforceget_large_holdersget_large_holding_reportsget_dividend_changesget_splitsget_technicalsget_returnsget_disclosuresget_delisting_scheduleget_economic_indicatorsget_economic_seriesget_economic_calendarget_fear_greed_indexget_annual_report_textget_xbrl_factsget_diversity_metricsget_events_feedget_cross_shareholdingsget_audit_feesget_directorsget_director_compensationget_subsidiariesget_main_customersget_facilitiesget_industry_benchmarksget_peersrun_screener_presetget_sector_performanceget_market_moversget_new_highs_lowsget_market_breadthget_market_cap_historyget_valuation_historyget_dividend_streaksget_extraordinary_report_reasonsget_shareholder_categoriesget_treasury_sharesget_sga_breakdownget_earnings_forecastsearch_edinet_codeget_batch_quotesget_batch_key_metrics_latestget_employee_countget_market_capitalizationget_etf_metricslist_stockslist_etfslist_sectorsget_dividends_calendarget_shareholder_benefitslist_shareholder_benefitsget_dividend_policylist_dividend_policiesget_usageTroubleshooting
| Symptom | Fix |
|---|---|
| Tools are listed, but calls return unauthorized | The header is not reaching the server. Check that the key follows Authorization: Bearer after a single space, or that x-api-key is spelled correctly. Also check in the dashboard that the key has not been revoked. |
| 405 Method Not Allowed | The server only accepts POST. If your client tries to connect over SSE (GET), set its transport to http (Streamable HTTP). |
| 429 or quota_exceeded | You have hit the per-minute rate limit or the monthly token quota. See the pricing page and the rate limits section of the docs for your plan’s limits. |
| Stock not found (404 or empty result) | Pass the 4-character ticker code (codes with letters look like 130A). If you only know the name, ask the AI to call search_company first. |
A key written in a config file is visible to anyone you share the file with. In files you commit, use environment variables or prompts (VS Code inputs), and if a key leaks, revoke it and issue a new one from the dashboard right away.

