Skip to content
LogoLogo

For LLMs (+ MCP)

Use these files to give a coding assistant the Flint perps guide and API schema.

For a single page, the Copy as Markdown button above the title on every doc page copies the Markdown source to your clipboard. Paste it into the assistant's context.

Documentation files

FileUse it forLink
llms.txtA short manifest with absolute links to every page and schema file, following the llmstxt.org convention. Give this URL to an assistant that can fetch the linked pages./llms.txt
llms-full.txtAuthored guides and API references combined in one Markdown file. Load it into the assistant's context when it cannot fetch individual pages./llms-full.txt
margin-user.protoThe bundled protobuf schema for the public flint.margin.user.v1 API./margin-user.proto
margin-maker.protoThe bundled protobuf schema for the authenticated flint.margin.maker.v1 API./margin-maker.proto
margin-notifications.protoThe bundled protobuf schema for the owner-authenticated notification API./margin-notifications.proto
margin-user.openapi.yamlOpenAPI 3.1 for the public user API's gRPC-Web URLs./margin-user.openapi.yaml
codama.jsonCodama IDL for the on-chain Flint margin program — instructions, accounts, PDAs, errors./codama.json

MCP server

flint-server-mcp exposes Flint API reads as MCP tools. An assistant can inspect perps markets, collateral, account state, quotes and fills.

Connect

Add the endpoint for your Flint network as a Streamable HTTP server in your MCP client. Use the same network as your dashboard and bot:

NetworkPublic readsMaker reads
Devnethttps://devnet.mcp.flint.trade/mcphttps://devnet.mcp.flint.trade/mcp/maker
Mainnethttps://mainnet.mcp.flint.trade/mcphttps://mainnet.mcp.flint.trade/mcp/maker

Public reads need no sign-in. For maker reads, complete the browser OAuth flow with your Flint email code. Your organization needs a perps maker ID. The client setup guide covers the dashboard's AI Connector page and supported MCP clients.

Read perps state

Useful tools include:

  • margin_perp_market_list_perp_markets: list perps markets.
  • margin_account_get_account: read collateral and positions.
  • margin_maker_get_quoting_state: inspect quoting slots and levels.
  • margin_maker_get_fills: read maker fills when history is available.

Arguments use protobuf field names. Pass 64-bit IDs as decimal strings and use the schema returned by your client's tool list. The availability limits in the API overview also apply to MCP reads.

MCP tools do not sign or submit transactions, stream updates or return SDK access tokens. Use the dashboard and SDK for account changes and quoting. Maker-spec and transfer previews apply to spot.

Local testing

The local maker launcher does not start MCP. Run flint-server-mcp separately from the same server checkout; see the gateway guide. Set FLINT_GRPC_URL to the manifest's public_endpoint (http://127.0.0.1:15061 by default). Add the gateway's /mcp URL to your MCP client.

Tips for coding agents

Give the assistant these ground rules along with the docs:

  • Use the operator's explicit RPC and gateway URLs. SDK defaults select mainnet hosts. For isolated tests, use Local maker testing.
  • Every trading write — deposits, orders, quotes — is an on-chain transaction. The gRPC API reads state, simulates, and submits; it has no "place order" RPC.
  • API Decimal fields use strings in human units. Parse them with rust_decimal or bignumber.js. Raw quoting state and instruction builders use ticks, lots and atoms; see Units.
  • Decode program accounts through parse::FlintAccount (Rust) or with explicit owner and discriminator checks (TypeScript), and read slab accounts only up to their length.
  • Some RPCs are declared but not served yet; the API overview marks them.