API Documentation
Complete technical reference for Stocksense API and MCP integration
API Overview
Stocksense provides two ways to access financial data: MCP (Model Context Protocol) for AI integrations and REST API for direct access.
🤖 MCP Integration
Seamless integration with Claude, ChatGPT, and other AI tools via Model Context Protocol
- • OAuth 2.1 with PKCE authentication
- • JSON-RPC 2.0 protocol
- • 19 specialized tools
- • Natural language queries
🔗 REST API
Direct HTTP access for custom applications and integrations
- • API key authentication
- • RESTful endpoints
- • JSON responses
- • Rate limiting & caching
Authentication
API Key (REST)
curl -H "x-api-key: your-api-key" \
-H "Content-Type: application/json" \
https://stocksense.in/api/mcp/stock-price?ticker=AAPLOAuth 2.1 (MCP)
{
"mcpServers": {
"stocksense": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-fetch"],
"env": {
"STOCKSENSE_BASE_URL": "https://stocksense.in/api/mcp"
}
}
}
}