Connect a client
Add the OpenStock MCP server to Cursor, Claude, VS Code, Windsurf and other clients.
Create a key in Dashboard → Developers → API keys with the Store API scopes you want the assistant to have. Start read-only; you can always make a second key with write access later.
Add this to .cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project. Cursor fills in the key from your environment.
{
"mcpServers": {
"openstock": {
"url": "https://openstock.dev/api/mcp",
"headers": {
"Authorization": "Bearer ${env:OPENSTOCK_API_KEY}"
}
}
}
}Any other client#
Point a Streamable HTTP client at https://openstock.dev/api/mcp and send the key as a bearer token. To check a key from the terminal:
curl https://openstock.dev/api/mcp \
-H "Authorization: Bearer $OPENSTOCK_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'