Get Started
Connect Context Bharat to your AI coding assistant in under 60 seconds. No API key required for the free tier (100 queries/day).
Quick Install
Works with any MCP-compatible tool. Just run:
npx @contextbharat/mcp
Or with an API key for higher limits: npx @contextbharat/mcp --api-key YOUR_KEY
Setup by Tool
- Open Claude Desktop settings
- Navigate to MCP Servers section
- Add the configuration below
- Restart Claude and type "use contextbharat" in any prompt
{
"mcpServers": {
"contextbharat": {
"command": "npx",
"args": ["-y", "@contextbharat/mcp"]
}
}
}- Open Cursor Settings → MCP
- Click 'Add new MCP server'
- Paste the configuration below
- Type "use contextbharat" in Cursor chat
{
"mcpServers": {
"contextbharat": {
"command": "npx",
"args": ["-y", "@contextbharat/mcp"]
}
}
}- Create .vscode/mcp.json in your project root
- Paste the configuration below
- Enable MCP in VS Code settings
- Use "use contextbharat" in Copilot chat
{
"mcpServers": {
"contextbharat": {
"command": "npx",
"args": ["-y", "@contextbharat/mcp"]
}
}
}- Open Windsurf Settings → MCP
- Add a new MCP server
- Paste the configuration below
- Type "use contextbharat" in Cascade
{
"mcpServers": {
"contextbharat": {
"command": "npx",
"args": ["-y", "@contextbharat/mcp"]
}
}
}Remote MCP Server (Pro)
Pro users can use the remote server — no local npx needed. Lower latency, always up-to-date.
{
"mcpServers": {
"contextbharat": {
"url": "https://mcp.contextbharat.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}MCP Tools
Context Bharat exposes two MCP tools that your AI assistant calls automatically:
Maps a library name (e.g., "razorpay") to its canonical ID (/razorpay/razorpay-sdk). Supports fuzzy matching and tag-based search.
Retrieves relevant documentation chunks within a token budget. Supports 6 languages (English, Hindi, Tamil, Telugu, Kannada, Bengali).
REST API
You can also call the API directly from your applications. Base URL: https://api.contextbharat.com
{
"query": "razorpay payment integration",
"library_name": "razorpay"
}{
"library_id": "/razorpay/razorpay-sdk",
"name": "Razorpay",
"confidence": 0.98
}{
"library_id": "/razorpay/razorpay-sdk",
"query": "create payment link",
"token_budget": 5000,
"language": "en"
}{
"docs": "## Create a Payment Link\n\nUse POST /payment_links...",
"sources": ["https://razorpay.com/docs/..."],
"freshness_score": 0.97
}