For LLMs (+ MCP)
Use these files to give a coding assistant the Flint perps guide and API schema.
For a single page, Copy page for AI below the page outline copies the
page's Markdown to your clipboard; on mobile it sits at the end of the page.
Every page is also served as Markdown at its URL plus .md, for example
/overview/funding.md. Paste either into the assistant's context.
Documentation files
| File | Use it for | Link |
|---|---|---|
llms.txt | A short manifest linking the Markdown version of every page, following the llmstxt.org convention. Give this URL to an assistant that can fetch the linked pages. | /llms.txt |
llms-full.txt | Every page, including the generated 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.proto | The bundled protobuf schema for the public flint.margin.user.v1 API. | /margin-user.proto |
margin-maker.proto | The bundled protobuf schema for the authenticated flint.margin.maker.v1 API. | /margin-maker.proto |
margin-notifications.proto | The bundled protobuf schema for the owner-authenticated notification API. | /margin-notifications.proto |
margin-user.openapi.yaml | OpenAPI 3.1 for the public user API's gRPC-Web URLs. | /margin-user.openapi.yaml |
codama.json | Codama 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:
| Network | Public reads | Maker reads |
|---|---|---|
| Devnet | https://devnet.mcp.flint.trade/mcp | https://devnet.mcp.flint.trade/mcp/maker |
| Mainnet | https://mainnet.mcp.flint.trade/mcp | https://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
Decimalfields use strings in human units. Parse them withrust_decimalorbignumber.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 theirlength. - Some RPCs are declared but not served yet; the API overview marks them.
