Advanced (अपडेट: 1/6/2026)

Claude Code MCP Server Guide: SaaS और टीम डेटा को सुरक्षित तरीके से जोड़ें

Claude Code MCP को scope, .mcp.json, OAuth, Windows commands और output limits के साथ सुरक्षित सेट करें।

Claude Code MCP Server Guide: SaaS और टीम डेटा को सुरक्षित तरीके से जोड़ें

MCP Server Claude Code को सिर्फ local coding assistant से आगे ले जाता है। यह GitHub issues पढ़ सकता है, team docs खोज सकता है, Notion, Google Drive, CRM या internal API से data ला सकता है। लेकिन यही power risk भी लाती है। गलत scope, .mcp.json में token, बहुत बड़ा OAuth access, Windows पर न चलने वाला npx, या 10,000 token warning देने वाली बड़ी response, ये सब production workflow को खराब कर सकते हैं।

यह guide “बस connect कर दो” वाली नहीं है। यहाँ goal है: छोटा scope चुनना, secrets को shared files से बाहर रखना, /mcp से verify करना, और team के लिए readable configuration बनाना।

Claude Code में MCP क्या बदलता है

MCP का मतलब Model Context Protocol है। यह AI clients को external tools और data sources से जोड़ने का standard है। Claude Code MCP client की तरह काम करता है और MCP server के tools call करता है।

MCP के बिना Claude Code मुख्य रूप से repository और आपके दिए context को देखता है। MCP के साथ यह docs, issues, metrics, customer data या internal SaaS देख सकता है। इसलिए पहला सवाल यह नहीं है कि कौन सा server install करें। पहला सवाल है: इस project को कौन सा data, किस permission के साथ, और किस human review के साथ देखना चाहिए?

Permission boundary के लिए Claude Code permissions guide और security के लिए Claude Code security best practices भी देखें।

TransportUse caseध्यान देने वाली बात
stdiolocal server with npx, Python, internal commandWindows पर अक्सर cmd /c npx चाहिए
httpremote MCP, SaaS, OAuthworkspace और scope जरूर verify करें
sseपुराने SSE server compatibilitynew integration के लिए HTTP बेहतर

Scope पहले चुनें

claude mcp add में --scope local, --scope project, --scope user मिलते हैं।

scopeमतलबउपयोग
localसिर्फ current project और machinetesting, client work, secrets
project.mcp.json में save और repo में shareteam-wide server definition
userसभी Claude Code projects में availableसच में common personal tool

Default local रखें। Team को same command चाहिए तो project करें। user को सावधानी से use करें।

claude mcp add --scope local --transport stdio repo-files -- npx -y @modelcontextprotocol/server-filesystem ./docs

claude mcp add --scope project --transport http team-docs https://mcp.example.com/mcp

claude mcp add --scope user --transport http personal-notes https://mcp.example.com/mcp

Project scope server पर Claude Code approval मांगता है। यह blocker नहीं, safety check है।

Windows: cmd /c npx pattern

Windows में PowerShell पर npx चल सकता है, लेकिन Claude Code से stdio server launch करते समय fail हो सकता है। Practical pattern है cmd /c npx

claude mcp add --scope local --transport stdio repo-files -- cmd /c npx -y @modelcontextprotocol/server-filesystem "C:\Users\masa\work\claudecode-lab\docs"

.mcp.json में command और args अलग लिखें।

{
  "mcpServers": {
    "repo-files": {
      "type": "stdio",
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\masa\\work\\claudecode-lab\\docs"
      ],
      "env": {}
    }
  }
}

पहले test में पूरा home folder न दें। docs, reports या sample repo से शुरू करें। Write access चाहिए तो Claude Code hooks guide से dangerous actions रोकें।

Remote MCP, OAuth और /mcp

Notion, Google Drive, GitHub या CRM जैसी SaaS integrations में HTTP transport common है।

claude mcp add --scope local --transport http notion https://mcp.notion.com/mcp

Add करने के बाद Claude Code में /mcp चलाएँ। यहीं connection, authentication और available tools दिखते हैं।

/mcp

# जरूर check करें:
# - server connected है?
# - OAuth authenticated है?
# - कौन सा workspace approve हुआ?
# - tools expected हैं?
# - read-only चाहिए था, पर write/admin तो नहीं?

Internal API के लिए bearer token header से दिया जा सकता है, लेकिन token shared file में न रखें।

claude mcp add --scope local --transport http crm-readonly https://mcp.example.com/readonly \
  --header "Authorization: Bearer $CRM_READONLY_TOKEN"

Team .mcp.json में structure रखें, secrets नहीं।

{
  "mcpServers": {
    "customer-docs": {
      "type": "http",
      "url": "https://mcp.example.com/customer-docs"
    },
    "github-readonly": {
      "type": "stdio",
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@example/github-readonly-mcp"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_READONLY_TOKEN}"
      }
    }
  }
}

Use case 1: GitHub और Notion issue triage

सबसे तेज़ value issue, PR और specification के बीच switching कम करने से आती है। Claude Code GitHub MCP से issue पढ़े, Notion docs खोजे, फिर risk और questions summarize करे।

GitHub issue #248 पढ़ें और product docs में related requirement खोजें।
अभी code edit न करें।
Return करें:
1. likely affected files
2. clear requirements
3. open questions
4. smallest safe implementation plan

“अभी code edit न करें” बहुत important है। MCP more context देता है, पर गलत confidence भी तेज़ कर सकता है।

Use case 2: Google Drive से proposal draft

Consulting, training और implementation work में meeting notes, पुराने proposals और pricing docs Drive में होते हैं। Read-only MCP proposal draft बनाने में मदद कर सकता है।

"2026-05 Customer A" folder search करें।
Proposal outline बनाएं:
1. customer की 5 problems
2. likely scope
3. questions to confirm
4. training, implementation support, operations support plans

Names, emails और exact contract values mask करें।

Safety design: limited folder, read-only, human review before sending.

Use case 3: read-only metrics

MCP product metrics या analytics API भी पढ़ सकता है। Analysis के लिए production write permission न दें।

claude mcp add --scope local --transport http product-metrics https://mcp.example.com/readonly-metrics \
  --header "Authorization: Bearer $METRICS_READONLY_TOKEN"
पिछले 14 दिन के traffic source, article PV, conversion clicks देखें।
Pages को topic से group करें।
अगले 5 article themes recommend करें और हर recommendation का metric दें।
Weak या noisy data भी बताएं।

यह monetization से जुड़ता है, क्योंकि content planning guesswork से data loop बन जाता है।

10,000 token warning

MCP tool बहुत data लौटाए तो Claude Code 10,000 token warning दिखा सकता है। Full document bodies, long issue lists, full HTML, unlimited DB rows इससे होते हैं।

पहले output कम करें।

Maximum 10 results लौटाएं।
हर result में title, URL, updated date और match reason दें।
Full body न दें जब तक मैं specific item न मांगूं।

One-off analysis के लिए limit बढ़ा सकते हैं।

MAX_MCP_OUTPUT_TOKENS=50000 claude
$env:MAX_MCP_OUTPUT_TOKENS = "50000"
claude

Daily workflow को हमेशा यह चाहिए तो server redesign करें: pagination, filters, summaries.

Common failures

पहला failure: .mcp.json में secrets। Project config shared होती है। Token env, OAuth या secret manager में रखें।

दूसरा: convenience के लिए --scope user। Client-specific integration दूसरे projects में दिख सकती है।

तीसरा: remote document को instruction मान लेना। MCP से आया text data है, command नहीं।

चौथा: OAuth के बाद /mcp न देखना। Login successful होने से सही workspace approve हुआ, यह साबित नहीं होता।

पाँचवाँ: huge responses पर workflow बनाना। Stable workflow filter, summary और detail-on-demand use करता है।

Troubleshooting

claude mcp list
claude mcp get repo-files

Claude Code में:

/mcp

Project approval reset:

claude mcp reset-project-choices

Smoke test:

सिर्फ repo-files MCP connection verify करें।
Allowed directory के अंदर maximum 10 filenames list करें।
File content न पढ़ें और कुछ modify न करें।

Monetization angle

MCP revenue के करीब है क्योंकि यह Claude Code को real team systems से जोड़ता है। “MCP server install कर दूंगा” weak offer है। Strong offer है: “GitHub, Notion, Google Drive और internal SaaS को सुरक्षित Claude Code workflow में जोड़ना”।

  • Low-cost product: .mcp.json templates और safety checklist
  • Team service: GitHub, Notion, Drive, permissions review
  • Premium implementation: scope, OAuth, hooks, monitoring, training

पहले filesystem example को test folder में चलाएँ। Team के लिए एक read-only SaaS और एक project-scoped .mcp.json से शुरू करें। फिर इसे Claude Code Harness Engineering के safe workflow model से जोड़ें।

यह article official Claude Code MCP documentation के claude mcp add, scopes, .mcp.json, /mcp, OAuth, project server approval और MAX_MCP_OUTPUT_TOKENS पर आधारित है। Rule simple है: छोटा scope, read-only first, no shared secrets, हर connection verify करें।

#Claude Code #MCP #MCP server #SaaS integration #security
मुफ़्त

मुफ़्त PDF: Claude Code cheatsheet

Email डालें और commands, review habits तथा safe workflow वाली एक-page PDF पाएँ.

हम आपका data सुरक्षित रखते हैं और spam नहीं भेजते.

Masa

लेखक के बारे में

Masa

Claude Code workflow और team adoption पर काम करने वाला engineer.