MCP¶
MCP exposes the Registry's read-only tools as structured calls. Production supports OAuth resource-server authentication and a separately governed machine endpoint; both enter the same Data Layer boundary.
Call agent_tool_registry first and use generated input schemas. Lists, filters, symbols, time bounds, and cursors are declarative arguments supplied by the caller. Free-form execution instructions are not tool inputs.
Connect to https://mcp.argusfa.com/mcp with an MCP-audience OAuth token; the
CLI/API token has a separate audience. Initialize the session, call list_tools,
and use each tool's actual inputSchema. Registry parameters are normalized:
apply the MCP binding's parameter_aliases and parameter_encodings.
For example field_names becomes fields with value "revenue,net_income",
and preflight range_start/range_end become from_time/to_time.
Omit api_key, institution_id, and caller_id with OAuth.
Ordinary-user login and a Python client¶
With the official 1.1.8 or newer client, run argus auth login --interface mcp
and complete sign-in and consent in the system browser. Then run
argus auth status --interface mcp; its audience must be
https://mcp.argusfa.com/mcp. This uses the pre-registered public Argus client,
PKCE S256 and the registered loopback callback. It stores this MCP session
separately from API credentials in the OS credential store. It does not enable
dynamic registration. Use argus auth refresh --interface mcp to force refresh,
or argus auth logout --interface mcp to remove only the local MCP session.
The following client uses the MCP SDK installed with the official wheel. Keep the access token in memory and use the same MCP resource for initialization and calls. Do not copy an API token into an MCP configuration.
import asyncio
import json
from argus.cli.oauth import CliOAuthProfile
from mcp import ClientSession
from mcp.client.streamable_http import streamable_http_client
from mcp.shared._httpx_utils import create_mcp_http_client
async def main():
profile = CliOAuthProfile.from_environment().for_interface("mcp")
token = profile.client().access_token()
if token is None:
raise RuntimeError("Run argus auth login --interface mcp first")
async with create_mcp_http_client(
headers={"Authorization": f"Bearer {token}"}
) as http:
async with streamable_http_client(profile.audience, http_client=http) as streams:
async with ClientSession(streams[0], streams[1]) as session:
await session.initialize()
tools = await session.list_tools()
registry = await session.call_tool("agent_tool_registry", {})
if registry.isError:
raise RuntimeError("Registry call failed")
snapshot = registry.structuredContent
if snapshot is None:
snapshot = json.loads(next(
block.text for block in registry.content if block.type == "text"
))
# Choose a tool from snapshot and construct arguments using its
# MCP binding and the corresponding list_tools inputSchema.
asyncio.run(main())
Discovery and successful login do not establish business completion. Check the business envelope, returned coverage and evidence, and consume pagination or cursors before judging the promised data range. For a host such as Claude or ChatGPT, use that host's approved pre-registered Client ID and exact redirect; the Argus loopback client above is for local CLI/Python clients. An unregistered host must first be registered by the operator; substituting a redirect or enabling DCR is not a supported workaround.
JSON-string arguments such as filters_json, sort_json, facts_json,
nodes_json, and observations_json must encode arrays; limits_json must
encode an object. null is not an empty array or object. Invalid structured
values return success=false and error.error_code=invalid_argument.
Discovery lists all public tools. The reviewed argus:tools:public scope grants
all 52 governed business tools, including metric_catalog and the five bounded
stream_* tools; Registry discovery is public. Required signed permission scopes,
data availability, and caller ownership still apply. See
authorization.
Handle JSON-RPC errors and isError first. Decode structuredContent, or JSON
from text content when structured content is absent. Business calls return
success/result/audit_id; registry discovery returns a raw snapshot. A tool
failure uses error.error_code, not the contract kernel's error.code.
Every result is JSON-compatible structured data with typed temporal, evidence, quality, license, permission, and audit metadata as applicable. Removed capabilities appear only in the Registry's machine-readable major-version migration manifest.
MCP contains no question-answering, narrative-generation, user-state mutation, performance-reporting, recommendation, strategy, order, account-control, or AI-agent-orchestration tools.