MCP Integration (Model Context Protocol)
Connect Claude, ChatGPT, Cursor, and other AI assistants to your Contextium documentation. Set up in under 2 minutes with OAuth-style authorization.
Contextium MCP Integration
Connect any AI assistant to your Contextium documentation library - no copy-pasting, no switching tabs.
Works with: Claude, ChatGPT, Cursor, and any AI tool that supports the Model Context Protocol (MCP)
This guide uses Claude as the example (the most popular MCP implementation), but the same setup works for other MCP-compatible AI assistants.
What You'll Learn
By the end of this guide, you'll be able to:
- Understand what MCP is (in plain English)
- Connect your AI assistant to Contextium documentation in under 2 minutes
- Search your docs without leaving your AI chat
- Get AI answers based on YOUR company's documentation
- Save hours every week
Time required: 2 minutes (seriously!)
What is MCP? (Simple Explanation)
MCP stands for Model Context Protocol - but forget the jargon! Here's what it actually means:
The Old Way 😰
You: "Claude, how do we handle authentication in our API?"
Claude: "Here's how authentication typically works..." [gives generic answer from the internet]
You: "No, I mean OUR API specifically"
Claude: "I don't have access to your documentation. Can you paste it?"
You: Opens Contextium → Finds document → Copies → Pastes → Finally gets answer
Time wasted: 5 minutes every time you ask a question
The MCP Way ✨
You: "Claude, how do we handle authentication in our API?"
Claude: [Automatically searches your Contextium] "Based on your API Authentication Guide: Here's your exact authentication flow..." [shows YOUR company's specific code]
You: "Perfect!"
Time wasted: Zero seconds
That's MCP! It lets Claude read your Contextium documentation directly, without you having to copy-paste anything.
Why You Want This
Time Saved Per Week
| Without MCP | With MCP | Time Saved |
|---|---|---|
| Finding docs: 2 hours | Finding docs: 0 minutes | 2 hours |
| Copy-pasting: 1 hour | Copy-pasting: 0 minutes | 1 hour |
| Asking teammates: 1.5 hours | Self-service answers: 5 minutes | 1h 25m |
| Total: 4.5 hours | Total: 5 minutes | 4+ hours/week |
Per year: 200+ hours saved = $20,000+ value (at $100/hour)
Real Benefits
- Ask Claude about YOUR docs - Not generic internet answers
- Search your entire library - Without opening Contextium
- 📚 Always up-to-date - Claude reads the latest version automatically
- Secure - Respects your Contextium permissions
- Lightning fast - Instant answers, no tab-switching
Setup Just Got 10x Easier!
New: OAuth-Style Authorization (Like GitHub CLI)
Before (the old way):
- Open browser developer console
- Run JavaScript commands
- Copy cryptic tokens
- Edit JSON config files manually
- Figure out file paths for your OS
- Restart everything
- 15+ minutes, lots of confusion
Now (the new way):
- Run one command:
npx @contextium/mcp-server@latest setup - Authorize in your browser (just click!)
- Everything configures automatically
- Under 2 minutes, zero confusion
That's it! Just like connecting GitHub, Stripe, or Google.
Quick Setup - Choose Your Tool
Which Claude Tool Do You Use?
There are two main ways to use Claude:
Claude Desktop (Recommended for most users)
- Standalone desktop app from Anthropic
- Simple GUI interface
- Great for non-technical users
- Auto-configuration supported
- 👉 Jump to Claude Desktop Setup
Claude CLI (Claude Code)
- Command-line tool integrated with VS Code/Cursor
- For developers and technical users
- Full IDE integration
- Manual configuration required
- 👉 Jump to Claude CLI Setup
Quick Comparison
| Feature | Claude Desktop | Claude CLI (Code) |
|---|---|---|
| Interface | Standalone app | VS Code/Cursor integration |
| Users | Everyone | Developers |
| Setup | Automatic | Manual config |
| Config File | Auto-updated | You edit manually |
| Use Case | Chat, research | Coding, development |
| Setup Time | 2 minutes | 5 minutes |
Not sure which you have?
- If you downloaded the Claude app from Anthropic's website → Claude Desktop
- If you use Claude inside VS Code or Cursor → Claude CLI (Code)
Claude Desktop Setup
For Non-Technical Users (Easiest!)
Perfect if you: Use the Claude Desktop app, want automatic setup, prefer GUI interfaces
Step 1: Run the Setup Command
Open your Terminal (Mac) or Command Prompt (Windows) and run:
npx @contextium/mcp-server@latest setup
What happens next:
- Your browser opens automatically
- You authorize Contextium (just like connecting GitHub or Google)
- Select your workspace from the dropdown
- Click "Authorize"
- Done! Claude Desktop config is updated automatically
That's it! No copying tokens, no editing config files, no manual setup.
Step 2: Restart Claude Desktop
Important: You must restart Claude Desktop for changes to take effect.
- Quit Claude Desktop completely (not just close the window)
- Reopen Claude Desktop
- Test by asking: "List my Contextium workspaces"
Step 3: Test It!
Open Claude Desktop and try:
You: "List my Contextium workspaces"
Claude should respond:
Your Workspaces (2 total)
My Company Workspace ID: abc-123 Role: owner
Product Team ID: def-456 Role: member
If you see this - YOU'RE DONE! 🎉
Claude CLI Setup
For Developers & Technical Users
Perfect if you: Use VS Code, Cursor, or other code editors with Claude Code (Claude CLI)
Step 1: Generate Your Token
Option A: Automatic Setup (Recommended)
Run the setup command to generate credentials automatically:
npx @contextium/mcp-server@latest setup
This creates ~/.doxhub/credentials.json with your token.
Option B: Manual Token Generation
- Go to Contextium Settings → MCP Tokens
- Expand "For VS Code / Cursor / Other Tools" section
- Click "Generate New Token"
- Select your workspace and expiry (90 days recommended)
- Copy the token and credentials JSON
Step 2: Configure Claude Code
Claude CLI automatically reads from ~/.doxhub/credentials.json, so if you ran the setup command, you're already configured!
To verify your credentials file:
cat ~/.doxhub/credentials.json
Should show:
{ "profiles": { "default": { "apiUrl": "https://api.contextium.io/api/v1", "accessToken": "mcp_...", "workspaceId": "your-workspace-id", "createdAt": "2026-02-06T...", "expiresAt": "2026-05-06T..." } }, "currentProfile": "default" }
Step 3: Configure MCP Server in Your Editor
For VS Code with Claude Code extension:
Add to your settings or MCP configuration file:
{ "mcpServers": { "doxhub": { "command": "npx", "args": ["-y", "@contextium/mcp-server"] } } }
For Cursor:
Add to .cursor/config.json:
{ "mcpServers": { "doxhub": { "command": "npx", "args": ["-y", "@contextium/mcp-server"] } } }
The MCP server will automatically load credentials from ~/.doxhub/credentials.json.
Step 4: Restart Your Editor
VS Code: Reload window (Cmd+Shift+P → "Reload Window")
Cursor: Restart Cursor
Step 5: Test It!
Open your editor's Claude Code interface and try:
You: "List my Contextium workspaces"
Claude should respond:
Your Workspaces (2 total)
Engineering Workspace ID: abc-123 Role: owner
Product Workspace ID: def-456 Role: member
If you see this - YOU'RE DONE! 🎉
Configuration File Locations
Claude Desktop config (auto-updated by setup command):
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Contextium credentials (created by setup command):
- All platforms:
~/.doxhub/credentials.json
Manual edit example (if needed):
{ "mcpServers": { "doxhub": { "command": "npx", "args": ["-y", "@contextium/mcp-server"] } } }
Switching Between Workspaces
If you work across multiple workspaces:
# List all profiles npx @contextium/mcp-server profiles # Switch to a different profile npx @contextium/mcp-server switch work # Create a new profile npx @contextium/mcp-server@latest setup --profile work
Each profile can have a different workspace, making it easy to separate dev/prod or personal/work environments.
How to Use It
Explore Your Documentation (Start Here!)
The new workflow is designed to prevent information overload. Claude shows you summaries first, then you can drill down to specific content.
Step 1: See your workspaces
You: "List my workspaces"
Claude:
Your Workspaces (2 total)
Engineering Workspace ID: abc-123 Role: owner
Product Workspace ID: def-456 Role: member
Step 2: See projects and file counts
You: "Show me projects in Engineering workspace"
Claude:
Projects in Workspace (3 total)
API Documentation ID: proj-123 Files: 45 Folders: 4
Frontend Guidelines ID: proj-456 Files: 32 Folders: 3
Database Schema ID: proj-789 Files: 18 Folders: 2
Use list_files with a project ID to see files in a project.
Step 3: See file names and metadata (not full content yet)
You: "List files in API Documentation project"
Claude:
Files in Project (45 total)
Authentication Guide ID: file-001 Path: /authentication/guide.md Size: 12.4 KB Updated: 2026-02-05
JWT Tokens ID: file-002 Path: /authentication/jwt.md Size: 8.1 KB Updated: 2026-02-03
OAuth Setup ID: file-003 Path: /authentication/oauth.md Size: 15.7 KB Updated: 2026-02-01
[... 42 more files]
Use get_file with a file ID to retrieve the full content.
Step 4: Get specific file content
You: "Show me the Authentication Guide file"
Claude:
Here's your complete Authentication Guide:
[Shows full document content]
Key points:
- Authentication uses JWT tokens
- Tokens expire after 24 hours
- Refresh tokens valid for 30 days
Would you like me to help implement this in your code?
Search Your Documentation
You can also search directly if you know what you're looking for:
You: "Search my docs for authentication examples"
Claude:
I found 5 documents about authentication:
API Authentication Guide - Updated 2 days ago "Use Bearer tokens in the Authorization header..."
OAuth 2.0 Setup - Updated last week "Our OAuth implementation supports..."
SSO Configuration - Updated last month "For enterprise customers, configure SAML..."
Which would you like me to show you?
Ask Questions
You: "How do we handle API errors?"
Claude:
[Searches your Contextium automatically]
According to your Error Handling Guide, you use these error codes:
AUTH_001: Invalid credentialsRATE_001: Rate limit exceededVAL_001: Validation failedEach error includes:
- HTTP status code
- Error message
- Suggested fix
Here's the exact code from your docs:
try { await apiCall() } catch (error) { if (error.code === 'AUTH_001') { // Redirect to login } }
Browse Projects and Files
The workflow is designed to prevent overwhelming you with data:
You: "What projects do I have?"
Claude:
Projects in Workspace (4 total)
API Documentation Files: 45 Folders: 4
Frontend Guidelines Files: 32 Folders: 3
Database Schema Files: 18 Folders: 2
Deployment Guide Files: 12 Folders: 1
Use list_files with a project ID to see files in a project.
You: "List files in API Documentation"
Claude:
Files in Project (45 total)
README.md Path: /README.md Size: 5.2 KB Updated: 2026-02-05
authentication-guide.md Path: /auth/authentication-guide.md Size: 12.4 KB Updated: 2026-02-03
[... shows metadata for all 45 files, no content yet]
Use get_file to retrieve specific file content.
This prevents information overload - especially important if you have hundreds of files!
See Version History
You: "Show me the version history for authentication.md"
Claude:
Here are the recent changes to authentication.md:
Version 5 (2 days ago) - Current
- Added: OAuth 2.0 support
- Updated by: sarah@company.com
Version 4 (1 week ago)
- Updated: Token expiration to 24 hours
- Updated by: john@company.com
Version 3 (2 weeks ago)
- Fixed: Example code formatting
- Updated by: lisa@company.com
Would you like to see the full content of any version?
Real-World Examples
Example 1: Onboarding New Developer
Scenario: You just joined the company. Need to set up your dev environment.
You: "How do I set up my development environment?"
Claude: [Searches your onboarding docs]
Based on your Developer Setup Guide:
- Install Node.js 18.x (not 20.x)
- Clone repo:
git clone https://github.com/company/app- Run:
npm install- Copy
.env.exampleto.env- Get API keys from John (john@company.com)
- Run:
npm run devYour app will start on http://localhost:3000
Common issues:
- If port 3000 is taken, run:
npm run dev -- --port 3001- If install fails, delete
node_modulesand retry
Time saved: 2 hours (vs searching Slack, asking teammates, reading outdated wikis)
Example 2: Building a Feature
Scenario: Need to add payment processing.
You: "How do we handle payments?"
Claude: [Searches your payment docs]
According to your Payment Integration Guide:
We use Stripe with this exact pattern:
import { processPayment } from '@company/payments' const result = await processPayment({ amount: 5000, // in cents currency: 'usd', customerId: user.stripeId, metadata: { orderId: order.id } })Important:
- Always validate amount on backend
- Log to audit system before charging
- Handle these error codes: INSUFFICIENT_FUNDS, CARD_DECLINED
Full error handling in: error-handling.md
You: "Show me the error handling code"
Claude:
From your Error Handling Guide:
try { await processPayment(...) } catch (error) { if (error.code === 'INSUFFICIENT_FUNDS') { return { message: 'Insufficient funds. Please use different card.' } } if (error.code === 'CARD_DECLINED') { return { message: 'Card declined. Please contact your bank.' } } // Log unexpected errors to Sentry Sentry.captureException(error) }
Time saved: 3 hours (vs reading multiple docs, asking teammates, trial and error)
Example 3: Debugging Production Issue
Scenario: Users report checkout is broken.
You: "Search for checkout issues in recent docs"
Claude:
I found a recent update to checkout.md:
Updated 3 hours ago by sarah@company.com:
"URGENT FIX: Stripe webhook changed
Old webhook: payment_intent.succeeded New webhook: payment_intent.completed
Update your webhook listeners ASAP or checkouts will fail!"
Location: /api/webhooks/stripe.ts line 45
You: "Show me the exact fix"
Claude:
Here's the fix from the updated docs:
Before (broken):
case 'payment_intent.succeeded':After (working):
case 'payment_intent.completed':This was updated because Stripe deprecated the old event.
Time saved: 4+ hours (vs debugging without knowing what changed)
Security & Permissions
How Access Control Works
You can only search documentation you have permission to see.
MCP respects all Contextium permissions:
- Can read docs from your workspaces
- Can see projects you're a member of
- Cannot read restricted documents
- Cannot access other people's private projects
Example: Permission Denied
You: "Search for executive strategy docs"
Claude:
Access denied: You don't have permission to access the Executive workspace.
You have access to:
- Engineering Workspace
- Product Workspace
- Design Workspace
To request access, contact your workspace admin.
Your data stays secure - Claude can only see what you can see in Contextium.
Token Security
Your MCP token is like a password:
DO:
- Keep tokens private (stored securely at
~/.doxhub/credentials.json) - Regenerate tokens every 90 days (you'll get reminders)
- Revoke tokens from Settings → MCP Tokens if needed
DON'T:
- Share tokens with teammates (they need their own)
- Commit credentials file to Git
- Use tokens across multiple devices (generate one per device)
If compromised:
- Go to Contextium → Settings → MCP Tokens
- Click "Revoke" on the compromised token
- Run
npx @contextium/mcp-server@latest setupto create a new one - Done in 30 seconds!
Token Management:
- View all your tokens: Contextium → Settings → MCP Tokens
- See: Device name, last used, expiry date
- One-click revocation for any token
- Supports multiple profiles (dev/prod/work)
🛠️ Advanced Features
Filter by Workspace
You: "Search engineering docs for API examples"
Claude:
[Only searches Engineering workspace]
Found 12 API examples in Engineering workspace:
- REST API Setup
- GraphQL Integration
- WebSocket Examples ...
Filter by Project
You: "Show me files in the API Documentation project"
Claude:
API Documentation project has 45 files:
Authentication:
- auth-overview.md
- jwt-tokens.md
- oauth-setup.md
Endpoints:
- users-api.md
- payments-api.md
- webhooks-api.md
Error Handling:
- error-codes.md
- rate-limits.md
Would you like me to show any of these?
Compare Versions
You: "What changed in auth.md between version 3 and version 5?"
Claude:
Comparing auth.md versions 3 → 5:
Added:
- OAuth 2.0 support (v5)
- Refresh token rotation (v4)
Changed:
- Token expiration: 8 hours → 24 hours (v4)
- Required scope: 'read' → 'read:user' (v5)
Removed:
- Basic authentication (deprecated in v4)
Would you like to see the full content of either version?
See Project Structure
You: "Show me the structure of the API Documentation project"
Claude:
API Documentation project structure:
📁 Root Files:
- README.md
- getting-started.md
- changelog.md
📁 Authentication/
- overview.md
- jwt-tokens.md
- oauth-setup.md
- sso-config.md
📁 Endpoints/
- users.md
- payments.md
- webhooks.md
- websockets.md
📁 Guides/
- error-handling.md
- rate-limits.md
- pagination.md
- versioning.md
Total: 45 files across 4 folders
🆘 Troubleshooting
"MCP server not responding"
Possible causes:
- Token expired
- Contextium is down
- Network issue
Fix:
# 1. Check Contextium status curl https://contextium.io/health # 2. Test your token curl -H "Authorization: Bearer YOUR_TOKEN" https://api.contextium.io/v1/workspaces # 3. Regenerate token if expired # Go to contextium.io/settings → Generate new token
"Authentication failed"
Fix:
Easy way (recommended):
npx @contextium/mcp-server@latest setup
Re-authorize in your browser. Done!
Manual way:
- Go to Contextium → Settings → MCP Tokens
- Click "Revoke" on your old token
- Run
npx @contextium/mcp-server@latest setupagain
"No workspaces found"
Possible reasons:
- You're not a member of any workspace
- Token is for a different account
- All workspaces were deleted
Fix:
- Go to contextium.io/dashboard
- Check your workspaces
- Ask your admin for access
- Verify you're using the correct Contextium account
"Connection timeout"
Fix:
# Check your internet connection ping contextium.io # Check if corporate firewall is blocking curl -v https://api.contextium.io/health # If blocked, ask IT to whitelist: # - contextium.io # - api.contextium.io
"Claude can't see my docs"
For Claude Desktop:
Checklist:
- Token is valid (check
~/.doxhub/credentials.json) - Claude Desktop config has MCP server entry
- Claude Desktop was fully restarted (quit and reopen)
- You have permission to access docs in Contextium
Fix:
# Re-run setup to fix configuration npx @contextium/mcp-server@latest setup # Quit Claude Desktop completely (not just close window) # Reopen Claude Desktop # Test # Ask Claude: "List my Contextium workspaces"
Check config file manually:
# Mac cat ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows type %APPDATA%\Claude\claude_desktop_config.json # Should include: # { # "mcpServers": { # "doxhub": { # "command": "npx", # "args": ["-y", "@contextium/mcp-server"] # } # } # }
For Claude CLI (VS Code/Cursor):
Checklist:
- Token is valid (check
~/.doxhub/credentials.json) - MCP server configured in editor settings
- Editor was reloaded/restarted
- Claude Code extension is installed and active
Fix:
# Verify credentials exist cat ~/.doxhub/credentials.json # If missing, run setup npx @contextium/mcp-server@latest setup # Reload VS Code window # Cmd+Shift+P → "Reload Window" # Or restart Cursor completely
Test it:
You: "List my workspaces"
If Claude lists them → MCP is working! If Claude says "I can't access that" → Check config files
Pro Tips
Tip 1: Start Broad, Then Narrow
Good approach:
You: "Search for authentication docs"
Claude: [Shows 5 results]
You: "Show me the JWT tokens one"
Claude: [Shows full document]
Less efficient:
You: "Show me the exact section about JWT token expiration in the authentication guide"
Claude: [May not find it on first try]
Tip 2: Use Natural Language
You don't need to be technical!
Don't say:
"Query files table where projectId equals auth AND content LIKE '%token%'"
Just say:
"Find docs about tokens in the auth project"
Claude understands normal English!
Tip 3: Ask Follow-Up Questions
You: "How do we deploy to production?"
Claude: [Shows deployment guide]
You: "What about rollback?"
Claude: [Remembers context, shows rollback section]
You: "And monitoring?"
Claude: [Still has context, shows monitoring section]
Claude remembers the conversation - no need to repeat yourself!
Tip 4: Combine with Code
Powerful workflow:
You: "How do we handle payments?"
Claude: [Shows payment docs]
You: "Now write the code for me"
Claude: [Writes code using YOUR company's exact patterns from the docs]
Result: Code that matches your team's standards perfectly!
Tip 5: Keep Your Token Fresh
Tokens expire after 90 days for security.
Don't worry about it:
- Contextium will warn you when expiry is coming (30 days notice)
- Check status:
npx @contextium/mcp-server status - Refresh when needed: Just run
npx @contextium/mcp-server@latest setupagain - Takes 30 seconds
What You Can Do
Available Features
- List workspaces - See all workspaces you have access to
- List projects - See projects with file/folder counts (no content dumps)
- List files - See file names and metadata only (sizes, dates, paths)
- Get specific files - Retrieve full content when you need it
- Search documentation - Find relevant docs by keyword
- View version history - See what changed and when
- See project structure - Visualize folder organization
- Access control respected - Only see what you have permission for
Summary-first approach: Claude shows you summaries and counts first, then you drill down to specific content. This prevents overwhelming you with data, especially if you have hundreds of files.
Write Operations (New!)
You can now create, update, and delete files directly through Claude:
- Create files - "Create a new file in project X with title Y"
- Update files - "Update file ABC with new content"
- Delete files - "Delete file ABC" (moves to trash)
Write operations are disabled by default - admins can enable them in workspace settings for users with editor permissions.
Not Yet Available
- Manage permissions - Use Contextium web app
- Bulk operations - Use Contextium web app or CLI
- File uploads - Use Contextium web app
Common Workflows
Morning Routine
1. Open Claude
2. "List my workspaces"
3. "Show recent changes in Engineering workspace"
4. Start your day informed!
Coding New Feature
1. "What projects do I have?" → See all projects with file counts
2. "List files in API Documentation" → See file names and sizes
3. "How do we handle authentication?" → Search/get specific docs
4. [Claude shows your docs]
5. "Write the code for me"
6. [Claude generates code using your patterns]
7. Copy, test, done!
Debugging
1. "Search for [error message]"
2. [Claude finds relevant docs]
3. "What's changed recently?"
4. [Claude shows recent updates]
5. Problem identified!
Code Review
1. "How should we handle errors in this code?"
2. [Claude checks your error handling docs]
3. "Does this match our standards?"
4. [Claude compares code to your guidelines]
5. Feedback provided!
What's Next?
You Can Now:
- Search your Contextium docs without leaving Claude
- Get AI answers based on YOUR documentation
- Save 4+ hours per week
- Never copy-paste docs again
- Always have the latest information
Share with Your Team!
Everyone on your team should set this up:
- Share this guide → Send link:
docs.contextium.io/mcp - Each person gets their own token → Personal access only
- Everyone saves time → Entire team benefits
Team of 10 developers: 40+ hours saved per week = $4,000/week value!
Need Help?
Resources
- Full MCP Documentation: https://docs.contextium.io/mcp
- Community Forum: https://community.contextium.io
- Support Email: hello@contextium.io
- Report Issues: https://github.com/doxhub/mcp-server/issues
- Status Page: https://status.contextium.io
Quick Reference
| Task | Claude Command |
|---|---|
| List workspaces | "List my Contextium workspaces" |
| List projects | "Show me projects in [workspace]" or "What projects do I have?" |
| List files (metadata) | "List files in [project]" |
| Get specific file | "Show me [filename]" or "Get the [filename] file" |
| Search docs | "Search my docs for [topic]" |
| Version history | "Show versions of [file]" |
| Project structure | "Show structure of [project]" |
Tip: Start broad (workspaces → projects → files), then drill down to specific content!
You're All Set!
You now have Claude connected directly to your Contextium documentation library!
No more:
- Tab switching
- Copy-pasting
- Outdated information
- Generic internet answers
Just:
- Ask Claude questions
- Get answers from YOUR docs
- Work faster
- Stay in flow
We'd Love Your Feedback!
How's it working for you?
- Email us: hello@contextium.io
- Tweet us: @contextium
- Star us: github.com/doxhub/mcp-server
- Write review: reviews.contextium.io
Your feedback helps us improve!
Happy coding with Claude + Contextium! 🚀
Last updated: February 6, 2026 Version: 2.0 - Now with OAuth-style setup! Questions? Email hello@contextium.io