diff --git a/.github/workflows/docs-update-check.yml b/.github/workflows/docs-update-check.yml new file mode 100644 index 000000000..cb625cd3b --- /dev/null +++ b/.github/workflows/docs-update-check.yml @@ -0,0 +1,181 @@ +name: Documentation Update Check + +on: + pull_request: + types: [opened, synchronize, ready_for_review] + paths: + - 'core/**/*.ts' + - 'core/**/*.js' + - 'extensions/**/*.ts' + - 'extensions/**/*.js' + - 'packages/**/*.ts' + - 'packages/**/*.js' + - 'gui/**/*.tsx' + - 'gui/**/*.jsx' + +jobs: + check-docs-needed: + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install Continue CLI + run: npm i -g @continuedev/cli + + - name: Analyze changes for documentation needs + id: analyze + env: + CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Get the diff of changed files + git diff origin/main..HEAD --name-only > changed_files.txt + + # Create a detailed diff for analysis + git diff origin/main..HEAD > detailed_diff.txt + + # Use Continue to analyze if docs are needed + ANALYSIS=$(cn --auto --headless \ + "Analyze these code changes and determine if documentation updates are needed. + Consider: + 1. New features or APIs added + 2. Breaking changes to existing functionality + 3. New configuration options or settings + 4. Changes to CLI commands or flags + 5. New integrations or MCP servers + 6. Modified agent behavior or capabilities + + Changed files: $(cat changed_files.txt | tr '\n' ' ') + + If documentation updates are needed, list specific docs that should be updated. + Format as markdown bullet list. + If no docs updates needed, respond with 'NO_DOCS_NEEDED'. + Be concise and specific." 2>&1) || true + + # Save the analysis + echo "$ANALYSIS" > docs_analysis.md + + # Check if docs are needed + if grep -q "NO_DOCS_NEEDED" docs_analysis.md; then + echo "docs_needed=false" >> $GITHUB_OUTPUT + else + echo "docs_needed=true" >> $GITHUB_OUTPUT + fi + + - name: Format documentation suggestions + if: steps.analyze.outputs.docs_needed == 'true' + id: format + run: | + # Create a formatted comment + cat > comment.md << 'EOF' + ## šŸ“š Documentation Update Suggested + + Based on the changes in this PR, the following documentation may need updates: + + EOF + + # Add the analysis (excluding any system output) + cat docs_analysis.md | grep -E "^[\*\-\+]|^[[:space:]]*[\*\-\+]|^#{1,6}" >> comment.md || echo "See detailed analysis below." >> comment.md + + cat >> comment.md << 'EOF' + + --- + + ### Next Steps + + 1. Review the suggested documentation areas + 2. Update relevant docs in the `/docs` folder + 3. Consider updating: + - API references if interfaces changed + - Guides if workflows changed + - Configuration docs if settings changed + - MCP cookbook if new integrations added + + ### Resources + + - [Documentation Contributing Guide](/docs/CONTRIBUTING.mdx) + - [MCP Integration Guide](/docs/guides/mcp-continue-cookbook.mdx) + - [Continue Hub](https://hub.continue.dev) + + This analysis was generated automatically. Please review and update as needed. + EOF + + - name: Post PR comment + if: steps.analyze.outputs.docs_needed == 'true' + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const fs = require('fs'); + const comment = fs.readFileSync('comment.md', 'utf8'); + + // Check if we already commented + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number + }); + + const botComment = comments.find(c => + c.user.type === 'Bot' && + c.body.includes('Documentation Update Suggested') + ); + + if (botComment) { + // Update existing comment + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: botComment.id, + body: comment + }); + } else { + // Create new comment + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: comment + }); + } + + - name: Add label if docs needed + if: steps.analyze.outputs.docs_needed == 'true' + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: ['docs-needed'] + }); + + - name: Remove label if docs not needed + if: steps.analyze.outputs.docs_needed == 'false' + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + try { + await github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + name: 'docs-needed' + }); + } catch (error) { + // Label might not exist, that's okay + console.log('Label does not exist or already removed'); + } \ No newline at end of file diff --git a/analyze-sentry-errors.js b/analyze-sentry-errors.js new file mode 100755 index 000000000..534084d52 --- /dev/null +++ b/analyze-sentry-errors.js @@ -0,0 +1,172 @@ +#!/usr/bin/env node + +/** + * Sentry Error Analysis Script + * Analyzes errors from the past 24 hours using Sentry's API + */ + +const https = require('https'); +const readline = require('readline'); + +const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout +}); + +// Function to make API requests to Sentry +function sentryRequest(token, endpoint) { + return new Promise((resolve, reject) => { + const options = { + hostname: 'sentry.io', + path: `/api/0/${endpoint}`, + method: 'GET', + headers: { + 'Authorization': `Bearer ${token}`, + 'Content-Type': 'application/json' + } + }; + + const req = https.request(options, (res) => { + let data = ''; + res.on('data', (chunk) => data += chunk); + res.on('end', () => { + try { + resolve(JSON.parse(data)); + } catch (e) { + reject(e); + } + }); + }); + + req.on('error', reject); + req.end(); + }); +} + +// Format date for Sentry API +function getDateRange() { + const now = new Date(); + const yesterday = new Date(now.getTime() - 24 * 60 * 60 * 1000); + return { + start: yesterday.toISOString(), + end: now.toISOString() + }; +} + +// Analyze errors +async function analyzeErrors(token) { + try { + console.log('\nšŸ” Fetching Sentry organizations...'); + const orgs = await sentryRequest(token, 'organizations/'); + + if (!orgs || orgs.length === 0) { + console.log('āŒ No organizations found. Please check your token permissions.'); + return; + } + + console.log(`\nšŸ“Š Found ${orgs.length} organization(s):\n`); + + for (const org of orgs) { + console.log(`\nšŸ¢ Organization: ${org.name} (${org.slug})`); + console.log('─'.repeat(50)); + + // Get projects + const projects = await sentryRequest(token, `organizations/${org.slug}/projects/`); + console.log(` šŸ“ Projects: ${projects.length}`); + + const { start, end } = getDateRange(); + + for (const project of projects) { + console.log(`\n šŸ“Œ Project: ${project.name}`); + + // Get issues for the past 24 hours + const issues = await sentryRequest( + token, + `projects/${org.slug}/${project.slug}/issues/?statsPeriod=24h&query=is:unresolved` + ); + + if (issues && issues.length > 0) { + console.log(` šŸ› Unresolved issues (24h): ${issues.length}`); + + // Analyze top issues + const topIssues = issues.slice(0, 5); + console.log('\n Top 5 Issues:'); + console.log(' ' + '─'.repeat(45)); + + topIssues.forEach((issue, index) => { + const errorCount = issue.count || 0; + const userCount = issue.userCount || 0; + const level = issue.level || 'unknown'; + const title = issue.title || issue.culprit || 'Unknown Error'; + + console.log(`\n ${index + 1}. ${title}`); + console.log(` Level: ${level.toUpperCase()}`); + console.log(` Events: ${errorCount} | Users affected: ${userCount}`); + console.log(` First seen: ${new Date(issue.firstSeen).toLocaleString()}`); + console.log(` Last seen: ${new Date(issue.lastSeen).toLocaleString()}`); + + if (issue.metadata && issue.metadata.type) { + console.log(` Type: ${issue.metadata.type}`); + } + }); + + // Summary statistics + const totalEvents = issues.reduce((sum, issue) => sum + (issue.count || 0), 0); + const totalUsers = issues.reduce((sum, issue) => sum + (issue.userCount || 0), 0); + const criticalIssues = issues.filter(i => i.level === 'error' || i.level === 'fatal').length; + + console.log('\n šŸ“Š 24-Hour Summary:'); + console.log(' ' + '─'.repeat(45)); + console.log(` Total issues: ${issues.length}`); + console.log(` Total events: ${totalEvents}`); + console.log(` Users affected: ${totalUsers}`); + console.log(` Critical issues: ${criticalIssues}`); + } else { + console.log(` āœ… No unresolved issues in the past 24 hours`); + } + } + } + + console.log('\n' + '='.repeat(50)); + console.log('āœ… Analysis complete!'); + + } catch (error) { + console.error('\nāŒ Error analyzing Sentry data:', error.message); + if (error.message.includes('401')) { + console.log('\nšŸ’” Tip: Make sure your token has the correct permissions:'); + console.log(' - project:read'); + console.log(' - org:read'); + console.log(' - event:read'); + } + } +} + +// Main execution +console.log('='.repeat(50)); +console.log('šŸ” SENTRY ERROR ANALYZER (Past 24 Hours)'); +console.log('='.repeat(50)); + +console.log('\nTo get your Sentry Auth Token:'); +console.log('1. Visit: https://sentry.io/settings/account/api/auth-tokens/'); +console.log('2. Create a new token with these scopes:'); +console.log(' - project:read'); +console.log(' - org:read'); +console.log(' - event:read'); +console.log('3. Copy the token and paste it below\n'); + +rl.question('Enter your Sentry Auth Token: ', async (token) => { + if (!token) { + console.log('āŒ No token provided. Exiting...'); + rl.close(); + return; + } + + await analyzeErrors(token.trim()); + rl.close(); +}); + +// Handle cleanup +rl.on('close', () => { + console.log('\nšŸ‘‹ Goodbye!'); + process.exit(0); +}); \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json index 94be18094..a3991caa3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -260,8 +260,10 @@ "icon": "book-open-cover", "pages": [ "guides/posthog-github-continuous-ai", + "guides/continue-docs-mcp-cookbook", "guides/snyk-mcp-continue-cookbook", "guides/dlt-mcp-continue-cookbook", + "guides/sanity-mcp-continue-cookbook", "guides/netlify-mcp-continuous-deployment" ] } diff --git a/docs/guides/continue-docs-mcp-cookbook.mdx b/docs/guides/continue-docs-mcp-cookbook.mdx new file mode 100644 index 000000000..3dab28a94 --- /dev/null +++ b/docs/guides/continue-docs-mcp-cookbook.mdx @@ -0,0 +1,542 @@ +--- +title: "Contributing to Continue with Model Context Protocol (MCP)" +description: "Use the Continue Docs MCP to write cookbooks, guides, and documentation with AI-powered workflows." +sidebarTitle: "Continue Docs MCP Cookbook" +--- + + + Master using the Continue Docs MCP to contribute documentation, create cookbooks, and maintain consistency across Continue's docs - all through natural language prompts. + + +## Prerequisites + +Before starting, ensure you have: + +- Continue account with **Hub access** +- Read: [Contributing to Continue Documentation](/CONTRIBUTING) for setup instructions +- Forked the [continuedev/continue](https://github.com/continuedev/continue) repository +- Node.js 20+ and Continue CLI installed + + + This cookbook assumes you've read the setup in the [CONTRIBUTING guide](/CONTRIBUTING). If you haven't, start there first. + + +## Continue Docs MCP Setup + + + Use the pre-built [Docs Assistant - Mintlify agent](https://hub.continue.dev/continuedev/docs-mintlify) that includes the Continue Docs MCP and is ready to use immediately. + + + + + ```bash + # From your Continue docs directory + cn --config continuedev/docs-mintlify + ``` + + This agent includes: + - **Continue Docs MCP** for searching Continue documentation + - **Mintlify formatting rules** for proper component usage + - **Documentation-focused prompts** for common tasks + + + + If you want to customize, create your own agent and add: + 1. [Continue Docs MCP](https://hub.continue.dev/continuedev/continue-docs-mcp) + 2. [Mintlify Technical Writing Rule](https://hub.continue.dev/mintlify/technical-writing-rule) + + See the [CONTRIBUTING guide](/CONTRIBUTING#option-2-create-your-own-custom-agent) for details. + + + +--- + +## What is the Continue Docs MCP? + + + A Model Context Protocol server built with [Mintlify's MCP generation](https://www.mintlify.com/blog/generate-mcp-servers-for-your-docs) that enables semantic search across Continue documentation. [Learn more →](/reference/continue-mcp) + + +The MCP helps you: +- **Find examples** from existing documentation +- **Maintain consistency** with established patterns +- **Source accurate information** about Continue features +- **Write better documentation** faster + +--- + +## Documentation Workflows with Prompts + +### šŸ†• Creating a New Cookbook + +Cookbooks show how to use Continue CLI with specific tools or services. Here's how to create one using the Continue Docs MCP: + + + + ```bash + cn --config continuedev/docs-mintlify + ``` + + **Prompt:** + ``` + "Show me the structure of existing MCP cookbooks in the Continue docs. + I want to create a cookbook for GitHub MCP." + ``` + + The agent will find examples like the dlt, Snyk, and Sanity cookbooks. + + + + **Prompt:** + ``` + "Using the Continue Docs MCP, find information about how GitHub MCP works. + Then search the web for the official GitHub MCP documentation and combine + both sources to create a cookbook following the same structure as the + dlt cookbook." + ``` + + The agent will: + - Search Continue docs for MCP patterns + - Fetch GitHub MCP official documentation + - Combine both sources + - Generate a cookbook with consistent formatting + + + + **Prompt:** + ``` + "Add my new github-mcp-continue-cookbook.mdx to the docs.json navigation + under the Cookbooks section." + ``` + + + + ```bash + npm run dev + # Visit http://localhost:3000 + ``` + + **Refine with prompts:** + ``` + "Add more examples to the troubleshooting section" + "Include a CI/CD workflow example using GitHub Actions" + "Add authentication setup using environment variables" + ``` + + + + + **Pro Tip:** The agent uses the Continue Docs MCP to maintain consistency with existing cookbooks automatically. + + +--- + +### āœļø Updating Existing Documentation + + + + **Prompt:** + ``` + "Where is the MCP tools documentation located? Show me the file path." + ``` + + + + **Prompt:** + ``` + "Update the MCP tools documentation at docs/customization/mcp-tools.mdx + to include information about the new Slack MCP server. Use the Continue + Docs MCP to find examples of how other MCP servers are documented, then + add a similar section for Slack." + ``` + + + +--- + +### šŸ“ Adding New Guides + + + + **Prompt:** + ``` + "I want to create a guide for setting up Continue with Amazon Bedrock. + Search the Continue docs for similar model provider setup guides and + show me the common structure they follow." + ``` + + + + **Prompt:** + ``` + "Create a new guide at docs/guides/amazon-bedrock-setup.mdx following + the structure you found. Include: + - Prerequisites + - Step-by-step setup with code examples + - Configuration options + - Troubleshooting common issues + + Use the Continue Docs MCP to find accurate information about Continue's + model provider configuration." + ``` + + + + **Prompt:** + ``` + "Add this guide to docs.json under the Model Providers section" + ``` + + + +--- + +## Real-World Cookbook Examples + +### Example 1: PostgreSQL MCP Cookbook + +**Prompt:** +``` +"Create a cookbook for using Continue with PostgreSQL MCP. Follow the same +structure as the dlt cookbook, but customize it for database operations. + +Include these sections: +1. Quick start with pre-built agent +2. Manual setup with MCP configuration +3. Common database tasks (schema exploration, query writing, migrations) +4. Troubleshooting database connection issues + +Use the Continue Docs MCP to find MCP configuration patterns and search the +web for PostgreSQL MCP documentation." +``` + +### Example 2: Sentry Error Tracking Cookbook + +**Prompt:** +``` +"Create a cookbook showing how to use Continue to analyze Sentry errors. + +The cookbook should demonstrate: +1. Setting up Sentry MCP integration +2. Querying recent errors +3. Analyzing error patterns with AI +4. Generating fixes for common errors +5. CI/CD integration for automated error analysis + +Research the Snyk cookbook structure since it's also about error detection, +and adapt it for Sentry." +``` + +### Example 3: OpenAPI Documentation Cookbook + +**Prompt:** +``` +"I want to create a cookbook for using Continue to work with OpenAPI specs. + +Show how to: +1. Load OpenAPI specs into Continue's context +2. Generate API client code from specs +3. Create tests based on API endpoints +4. Update documentation when APIs change + +Use the Continue Docs MCP to find how context providers work, then combine +that with OpenAPI MCP information." +``` + +--- + +## Advanced Prompt Patterns + + + + ```bash + "Use the Continue Docs MCP to understand how agents + work in Continue, then search the web for Anthropic's + Computer Use MCP. Create a cookbook showing how to + combine Continue agents with Computer Use for + automated testing." + ``` + + + + ```bash + "Find all mentions of MCP servers across Continue + documentation. Then create a comprehensive reference + page that links to all MCP-related guides and + configurations." + ``` + + + + ```bash + "Review all cookbook files in docs/guides/ and check + if they follow the same structure. List any + inconsistencies and suggest updates to make them + uniform." + ``` + + + + ```bash + "Extract all code examples showing MCP server + configuration from the Continue docs. Format them + as a single reference page with explanations for + each pattern." + ``` + + + +--- + +## Testing Your Documentation + +### Local Preview + +```bash +cd docs +npm run dev +# Visit http://localhost:3000 +``` + +### Validation Prompts + +```bash +# Check formatting +"Review this documentation for Mintlify formatting issues and fix any problems" + +# Verify links +"Check all links in this file and ensure they point to existing documentation" + +# Test code examples +"Verify that all code examples in this cookbook are syntactically correct" +``` + +--- + +## Submitting Your Contribution + +**Prompt:** +```bash +"Create a pull request with my documentation changes and use the repo's +PR template to write the description" +``` + +The agent will: +- Create a feature branch +- Stage and commit your changes +- Push to your fork +- Generate a PR description following the template +- Open the PR for review + + + See the full [Contributing Guide](/CONTRIBUTING#submitting-your-contribution) for manual PR submission details. + + +--- + +## Automated Documentation Checks with GitHub Actions + +Add automated documentation checks to your PR workflow using the Continue Docs MCP agent: + +```yaml title=".github/workflows/docs-check.yml" +name: Documentation Check + +on: + pull_request: + types: [opened, synchronize] + paths: + - 'core/**' + - 'extensions/**' + - 'packages/**' + - 'gui/**' + +jobs: + check-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install Continue CLI + run: npm i -g @continuedev/cli + + - name: Analyze Changes for Documentation Needs + id: analyze + env: + CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} + run: | + echo "šŸ” Analyzing code changes for documentation needs..." + + # Get changed files + git diff origin/main..HEAD --name-only > changed_files.txt + + # Create detailed diff + git diff origin/main..HEAD > changes.diff + + # Use Continue agent to check if docs need updates + PROMPT="Review these code changes and determine if documentation updates are needed. + + Changed files: $(cat changed_files.txt | tr '\n' ' ') + + Consider: + - New features or APIs + - Breaking changes + - New configuration options + - Modified CLI commands + - New MCP integrations + + If docs updates are needed, specify which files in docs/ should be updated. + If no updates needed, respond with 'NO_DOCS_NEEDED'. + Be specific and concise." + + cn --config continuedev/docs-mintlify -p "$PROMPT" --auto > analysis.md || { + echo "āš ļø Analysis failed" + echo "needs_docs=false" >> $GITHUB_OUTPUT + exit 0 + } + + if grep -q "NO_DOCS_NEEDED" analysis.md; then + echo "needs_docs=false" >> $GITHUB_OUTPUT + else + echo "needs_docs=true" >> $GITHUB_OUTPUT + fi + + - name: Post Documentation Recommendation + if: steps.analyze.outputs.needs_docs == 'true' + env: + GH_TOKEN: ${{ github.token }} + run: | + echo "šŸ“ Creating PR comment with documentation recommendations..." + + cat > pr-comment.md <<'EOF' +## šŸ“š Documentation Update Recommended + +Based on the code changes in this PR, documentation updates may be needed: + +EOF + + cat analysis.md >> pr-comment.md + + cat >> pr-comment.md <<'EOF' + +--- + +### Next Steps + +1. Review the suggested documentation areas above +2. Update relevant files in the `/docs` folder +3. Consider updating: + - API references for interface changes + - Guides for workflow changes + - Configuration docs for new settings + - MCP cookbooks for new integrations + +### Resources +- [Contributing to Docs](/CONTRIBUTING) +- [Continue Docs MCP Cookbook](/guides/continue-docs-mcp-cookbook) + +*This analysis was generated using the Continue Docs MCP agent.* +EOF + + gh pr comment ${{ github.event.pull_request.number }} --body-file pr-comment.md + + - name: Add Label + if: steps.analyze.outputs.needs_docs == 'true' + env: + GH_TOKEN: ${{ github.token }} + run: | + gh pr edit ${{ github.event.pull_request.number }} --add-label "docs-needed" +``` + + + This workflow uses the Continue Docs MCP agent to analyze code changes and automatically comment on PRs when documentation updates are recommended. + + +--- + +## Documentation MCP for Other Projects + +Want to create documentation MCPs for your own projects? Mintlify makes it easy: + + + + ```bash + npm i -g mintlify + mintlify init + ``` + + + + Mintlify automatically generates an MCP server for your documentation, enabling semantic search. + + [Learn more about Mintlify MCP generation →](https://www.mintlify.com/blog/generate-mcp-servers-for-your-docs) + + + + Share your docs MCP on [Continue Hub](https://hub.continue.dev/new?type=mcp) so others can use it with Continue agents. + + + + + The [Continue Docs MCP](/reference/continue-mcp) itself was built this way! + + +--- + +## Key Prompts Cheat Sheet + +| Task | Prompt | +|:-----|:-------| +| **Find structure** | "Show me the structure of existing cookbooks in Continue docs" | +| **Create cookbook** | "Create a cookbook for [tool] MCP following the dlt cookbook structure" | +| **Update docs** | "Update [file] to include information about [feature], using Continue Docs MCP to find examples" | +| **Add navigation** | "Add [file] to docs.json under the [section] section" | +| **Check consistency** | "Review this file for consistency with other Continue documentation" | +| **Fix formatting** | "Review for Mintlify formatting issues and fix any problems" | +| **Extract examples** | "Find all examples of [topic] in Continue docs" | +| **Research feature** | "Use Continue Docs MCP to explain how [feature] works in Continue" | + +--- + +## Resources + +### Continue Documentation +- [Contributing Guide](/CONTRIBUTING) - Setup and submission process +- [Continue Docs MCP Reference](/reference/continue-mcp) - MCP server details +- [Understanding Agents](/guides/understanding-agents) - How agents work + +### Mintlify +- [MCP Generation Guide](https://www.mintlify.com/blog/generate-mcp-servers-for-your-docs) +- [Mintlify Documentation](https://mintlify.com/docs) + +### Community +- [Continue Discord](https://discord.gg/continue) - #documentation channel +- [GitHub Discussions](https://github.com/continuedev/continue/discussions) + +--- + +## Next Steps + + + + Set up your environment + + + + Install pre-built agent + + + + See cookbook examples + + + + Get help from community + + diff --git a/docs/guides/overview.mdx b/docs/guides/overview.mdx index 3ca80dae0..1a29b9a66 100644 --- a/docs/guides/overview.mdx +++ b/docs/guides/overview.mdx @@ -22,6 +22,8 @@ Step-by-step guides for integrating Model Context Protocol (MCP) servers with Co - [PostHog Session Analysis Cookbook](/guides/posthog-github-continuous-ai) - Analyze user behavior data to optimize your codebase with automatic issue creation - [Netlify Performance Optimization Cookbook](/guides/netlify-mcp-continuous-deployment) - Optimize web performance with A/B testing and automated monitoring using Netlify MCP - [Snyk + Continue Hub Agent Cookbook (MCP)](/guides/snyk-mcp-continue-cookbook) - Integrate Snyk MCP via Continue Hub to scan code, deps, IaC, and containers +- [dlt Data Pipelines Cookbook](/guides/dlt-mcp-continue-cookbook) - Build AI-powered data pipelines with dlt MCP for pipeline inspection, schema management, and debugging +- [Sanity CMS Cookbook](/guides/sanity-mcp-continue-cookbook) - Manage content, schemas, and GROQ queries with Sanity MCP for AI-powered content management ## What Advanced Tutorials Are Available diff --git a/docs/test-sentry-mcp.js b/docs/test-sentry-mcp.js new file mode 100644 index 000000000..0d206c229 --- /dev/null +++ b/docs/test-sentry-mcp.js @@ -0,0 +1,82 @@ +#!/usr/bin/env node + +// Test script to verify Sentry MCP connection +console.log(` +======================================== +Sentry MCP Setup Guide +======================================== + +To set up Sentry MCP with Continue: + +1. CONFIGURE CONTINUE: + Open VS Code and add this to your Continue config: + + { + "mcpServers": { + "sentry": { + "command": "npx", + "args": ["@sentry/mcp-server@latest"], + "type": "stdio" + } + } + } + +2. TEST THE CONNECTION: + Run this command in your terminal: + + cn + + Then type: + "Show me recent Sentry errors" + +3. OAUTH AUTHENTICATION: + - On first use, Sentry MCP will prompt for OAuth + - Follow the browser authentication flow + - Grant access to your Sentry organization + +4. EXAMPLE QUERIES YOU CAN USE: + + a) View recent errors: + "Show me Sentry errors from the past 24 hours" + + b) Analyze critical issues: + "Find the most critical Sentry error affecting users in production" + + c) Performance analysis: + "Analyze Sentry performance data for slow transactions" + + d) Create GitHub issues: + "Analyze recent Sentry errors and create GitHub issues for critical bugs" + +======================================== +Alternative: Manual Setup with Auth Token +======================================== + +If OAuth doesn't work, you can use a Sentry auth token: + +1. Get your Sentry auth token from: + https://sentry.io/settings/account/api/auth-tokens/ + +2. Run the MCP server manually: + npx @sentry/mcp-server@latest --access-token=YOUR_TOKEN --host=sentry.io + +======================================== +`); + +// Check if Sentry MCP server is installed +const { exec } = require('child_process'); +exec('npx @sentry/mcp-server@latest --version', (error, stdout, stderr) => { + if (error) { + console.log('āŒ Sentry MCP server not found. Installing...'); + exec('npm install -g @sentry/mcp-server@latest', (err, out, serr) => { + if (err) { + console.log('Error installing:', err.message); + } else { + console.log('āœ… Sentry MCP server installed successfully!'); + } + }); + } else { + console.log('āœ… Sentry MCP server is installed!'); + console.log('Version:', stdout.trim()); + } +}); \ No newline at end of file