Skip to content

Conversation

@adityathebe
Copy link
Member

@adityathebe adityathebe commented Nov 4, 2025

resolves: #429

Summary by CodeRabbit

  • Documentation
    • Updated Claude Code setup guide to configure MCP via project-level .mcp.json file instead of browser-based settings
    • Changed authentication method to Bearer token for mission-control server integration
    • Streamlined setup workflow with clearer file-based configuration instructions and examples

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Nov 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs Ready Ready Preview Jan 15, 2026 6:45am

@netlify
Copy link

netlify bot commented Nov 4, 2025

Deploy Preview for flanksource-docs failed. Why did it fail? →

Name Link
🔨 Latest commit ffb893e
🔍 Latest deploy log https://app.netlify.com/projects/flanksource-docs/deploys/6909d3e526d3710008054a12

@netlify
Copy link

netlify bot commented Nov 4, 2025

Deploy Preview for canarychecker canceled.

Name Link
🔨 Latest commit c61622c
🔍 Latest deploy log https://app.netlify.com/projects/canarychecker/deploys/69688ccf08cdce0008e84de6

@moshloop
Copy link
Member

@copilot fix the build errors

Copy link

Copilot AI commented Nov 14, 2025

@moshloop I've opened a new pull request, #434, to work on those changes. Once the pull request is ready, I'll request review from you.

@coderabbitai
Copy link

coderabbitai bot commented Dec 8, 2025

Walkthrough

Updated Claude Code MCP setup documentation to use project-level .mcp.json configuration file instead of browser-based settings. Replaced Basic authentication example with Bearer token. Removed in-browser setup steps and alternative URL-based configuration guidance.

Changes

Cohort / File(s) Summary
Documentation - MCP Client Setup
mission-control/docs/guide/mcp/client-setup.mdx
Updated Claude Code tab to describe .mcp.json configuration approach with mcpServers object and Bearer token authentication. Removed previous browser-based Settings instructions and URL-based alternative setup. Modified code block header formatting and authentication example.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title describes adding Claude Code CLI setup documentation, which aligns with the raw summary showing changes to MCP client setup documentation and the PR objective of fixing instructions for Claude Code.
Linked Issues check ✅ Passed The PR updates MCP documentation to provide Claude Code CLI setup instructions instead of web-based setup, directly addressing issue #429's concern that Claude Code was showing web instructions.
Out of Scope Changes check ✅ Passed All changes are focused on updating the MCP client setup documentation for Claude Code, directly related to resolving the linked issue with no out-of-scope modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-mcp-client-configuration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
mission-control/docs/guide/mcp/client-setup.mdx (1)

352-387: Remove duplicate Troubleshooting and Next Steps sections.

Lines 352-387 are exact duplicates of lines 315-351. This appears to be a copy-paste error and should be removed.

Suggested fix - remove lines 352-387
 - [Catalog Tools](./tools/catalog_tools.mdx) - Query and manage configuration items
 - [Connection Tools](./tools/connection_tools.mdx) - Manage connections and integrations
 - [Playbook Tools](./tools/playbook_tools.mdx) - Execute and manage playbooks
-
-## Troubleshooting
-
-### Common Issues
-
-1. **Connection Refused**
-   - Verify the server URL is correct
-   - Check if you're behind a firewall or proxy
-   - Ensure the token has proper permissions
-
-2. **Authentication Failed**
-   - Verify token is valid and not expired
-   - Ensure token has `mcp.*` permissions
-   - Check if Basic prefix is included
-
-3. **Tools Not Appearing**
-   - Restart the client application
-   - Check client logs for errors
-   - Verify MCP server is properly configured
-
-### Testing Connection
-
-You can test your MCP connection using the MCP CLI:
-
-```bash
-npx `@modelcontextprotocol/cli` connect \
-  --transport http \
-  --url https://mc.<org-id>.workload-prod-eu-02.flanksource.com/mcp \
-  --header "Authorization: Basic YOUR_TOKEN_HERE"
-```
-
-## Next Steps
-
-Once connected, explore the available tools:
-- [Catalog Tools](./tools/catalog_tools.mdx) - Query and manage configuration items
-- [Connection Tools](./tools/connection_tools.mdx) - Manage connections and integrations
-- [Playbook Tools](./tools/playbook_tools.mdx) - Execute and manage playbooks
🤖 Fix all issues with AI agents
In `@mission-control/docs/guide/mcp/client-setup.mdx`:
- Around line 102-104: Update the Claude Code example's Authorization header to
use Basic auth instead of Bearer: change the "Authorization" header value in the
Claude Code section from "Bearer YOUR_TOKEN_HERE" to "Basic YOUR_TOKEN_HERE" so
it matches the Prerequisites' generated base64 token and the other client
examples; ensure the example uses the same token format described earlier.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a310cc3 and c61622c.

📒 Files selected for processing (1)
  • mission-control/docs/guide/mcp/client-setup.mdx
🔇 Additional comments (1)
mission-control/docs/guide/mcp/client-setup.mdx (1)

89-110: No issues found. The Claude Code CLI MCP configuration format in lines 89-110 is correct. The "name" field and "type": "http" are both appropriate for Claude Code CLI's configuration format and serve distinct purposes (display name and connection type respectively).

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +102 to +104
"headers": {
"Authorization": "Bearer YOUR_TOKEN_HERE"
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's check if the file exists and read the relevant sections
find . -name "client-setup.mdx" -type f

Repository: flanksource/docs

Length of output: 109


🌐 Web query:

Claude Code MCP configuration .mcp.json authorization Bearer Basic auth requirements

💡 Result:

Short answer — .mcp.json supports setting HTTP/SSE auth via headers (you supply an Authorization header). You can use Bearer tokens or Basic auth as normal HTTP headers.

Examples from Anthropic docs:

  • .mcp.json headers accept arbitrary headers, e.g. "Authorization": "Bearer ${API_KEY}". Use environment expansion for secrets. [1]
  • MCP HTTP/SSE servers are configured with a "type":"sse" or "url" and a "headers" object where you place Authorization. Basic auth would be supplied as "Authorization": "Basic <base64(user:pass)>". [2]

Minimal example (.mcp.json):
{
"mcpServers": {
"api-server": {
"type": "sse",
"url": "https://api.example.com/mcp",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
}

Notes:

  • Prefer injecting secrets via environment variables (variable expansion supported). [1]
  • If you need interactive OAuth flows, use the /mcp CLI auth helpers described in the docs. [1]

Sources:
[1] Anthropic — Connect Claude Code to tools via MCP (docs).
[2] Anthropic — MCP in the SDK (docs).


🌐 Web query:

Claude Code .mcp.json server configuration authentication header format

💡 Result:

Claude Code accepts authentication headers in .mcp.json either as a headers object (map) or as an array of header strings. Example formats:

  • Object form:
    {
    "mcpServers": {
    "api-server": {
    "type": "http",
    "url": "https://api.example.com/mcp",
    "headers": {
    "Authorization": "Bearer ${API_KEY}"
    }
    }
    }
    }
    [1]

  • Array-of-strings form:
    {
    "mcpServers": {
    "netdata": {
    "type": "http",
    "url": "http://host:19999/mcp",
    "headers": [
    "Authorization: Bearer ${NETDATA_API_KEY}"
    ]
    }
    }
    }
    [2]

Note: there is an open issue reporting that Claude Code may ignore headers in some releases (causing OAuth discovery to be attempted instead), so if headers don't take effect check your Claude Code version and related GitHub issue threads. [3]

Sources: [1] Claude Code docs; [2] Netdata/guide showing array format; [3] GitHub issue reporting headers ignored.


🏁 Script executed:

# Read the file to see the actual content and context around lines 102-104
cat -n ./mission-control/docs/guide/mcp/client-setup.mdx | sed -n '90,110p'

Repository: flanksource/docs

Length of output: 781


🏁 Script executed:

# Also check the Prerequisites section mentioned (lines 29-33)
cat -n ./mission-control/docs/guide/mcp/client-setup.mdx | sed -n '25,40p'

Repository: flanksource/docs

Length of output: 776


🏁 Script executed:

# Check other client tabs for comparison
cat -n ./mission-control/docs/guide/mcp/client-setup.mdx | sed -n '70,80p'
cat -n ./mission-control/docs/guide/mcp/client-setup.mdx | sed -n '135,145p'

Repository: flanksource/docs

Length of output: 679


🏁 Script executed:

# Check if there are more sections discussing other clients to see auth patterns
cat -n ./mission-control/docs/guide/mcp/client-setup.mdx | grep -A 10 "Authorization"

Repository: flanksource/docs

Length of output: 2927


🏁 Script executed:

# Check the full file length and structure
wc -l ./mission-control/docs/guide/mcp/client-setup.mdx

Repository: flanksource/docs

Length of output: 113


Fix authentication type mismatch in Claude Code section: Bearer should be Basic.

The Claude Code section (line 103) uses Bearer authentication, but the Prerequisites (lines 29-33) explicitly define the generated token as a Basic token that requires base64 encoding. All other client examples also use Basic auth. This inconsistency will cause authentication failures for users following the documented setup flow.

Change line 103 from:

"Authorization": "Bearer YOUR_TOKEN_HERE"

to:

"Authorization": "Basic YOUR_TOKEN_HERE"
🤖 Prompt for AI Agents
In `@mission-control/docs/guide/mcp/client-setup.mdx` around lines 102 - 104,
Update the Claude Code example's Authorization header to use Basic auth instead
of Bearer: change the "Authorization" header value in the Claude Code section
from "Bearer YOUR_TOKEN_HERE" to "Basic YOUR_TOKEN_HERE" so it matches the
Prerequisites' generated base64 token and the other client examples; ensure the
example uses the same token format described earlier.

@moshloop moshloop merged commit 6d724e2 into main Jan 15, 2026
15 checks passed
@moshloop moshloop deleted the fix-mcp-client-configuration branch January 15, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP: Claude code shows instructions for claude web

3 participants