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

C
Claude Desktop
~/.claude.json
  1. Open Claude Desktop settings
  2. Navigate to MCP Servers section
  3. Add the configuration below
  4. Restart Claude and type "use contextbharat" in any prompt
{
  "mcpServers": {
    "contextbharat": {
      "command": "npx",
      "args": ["-y", "@contextbharat/mcp"]
    }
  }
}
Cursor
.cursor/mcp.json
  1. Open Cursor Settings → MCP
  2. Click 'Add new MCP server'
  3. Paste the configuration below
  4. Type "use contextbharat" in Cursor chat
{
  "mcpServers": {
    "contextbharat": {
      "command": "npx",
      "args": ["-y", "@contextbharat/mcp"]
    }
  }
}
VS
VS Code (Copilot)
.vscode/mcp.json
  1. Create .vscode/mcp.json in your project root
  2. Paste the configuration below
  3. Enable MCP in VS Code settings
  4. Use "use contextbharat" in Copilot chat
{
  "mcpServers": {
    "contextbharat": {
      "command": "npx",
      "args": ["-y", "@contextbharat/mcp"]
    }
  }
}
W
Windsurf
~/.codeium/windsurf/mcp_config.json
  1. Open Windsurf Settings → MCP
  2. Add a new MCP server
  3. Paste the configuration below
  4. 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:

resolve-library-id

Maps a library name (e.g., "razorpay") to its canonical ID (/razorpay/razorpay-sdk). Supports fuzzy matching and tag-based search.

query-docs

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

POST/v1/libraries/resolveResolve Library ID
Request
{
  "query": "razorpay payment integration",
  "library_name": "razorpay"
}
Response
{
  "library_id": "/razorpay/razorpay-sdk",
  "name": "Razorpay",
  "confidence": 0.98
}
POST/v1/docs/queryQuery Documentation
Request
{
  "library_id": "/razorpay/razorpay-sdk",
  "query": "create payment link",
  "token_budget": 5000,
  "language": "en"
}
Response
{
  "docs": "## Create a Payment Link\n\nUse POST /payment_links...",
  "sources": ["https://razorpay.com/docs/..."],
  "freshness_score": 0.97
}

Supported Languages

🇬🇧
English
en
🇮🇳
Hindi
hi
🇮🇳
Tamil
ta
🇮🇳
Telugu
te
🇮🇳
Kannada
kn
🇮🇳
Bengali
bn