Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ coverage

# Generated files
packages/mcp-server/src/toolDefinitions.json
packages/mcp-server/src/skillDefinitions.json
120 changes: 0 additions & 120 deletions docs/permissions-and-scopes.md

This file was deleted.

34 changes: 17 additions & 17 deletions docs/testing-remote.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ The web UI provides a chat interface for testing the MCP server.
**1. Authentication:**
- Click "Connect to Sentry"
- Authorize the application
- Grant permissions (select scopes)
- Grant permissions (select skills)

**2. Basic Queries:**
- "Who am I?" - Test authentication
Expand Down Expand Up @@ -292,14 +292,14 @@ Opens at `http://localhost:6274`
- Redirected back to Inspector

**3. Test Tools:**
- Click "List Tools" - Verify 19-20 tools appear
- Click "List Tools" - Verify tools appear
- Test individual tools with parameters
- View responses and errors

### Inspector Testing Patterns

**Basic verification:**
1. List tools → Verify count and names
1. List tools → Verify expected tools available
2. Call `whoami` → Verify authentication
3. Call `find_organizations` → Verify data access

Expand Down Expand Up @@ -348,19 +348,19 @@ ls -la ~/.sentry-mcp-tokens.json
pnpm -w run cli "list organizations"
```

### 2. Test Scope Permissions
### 2. Test Skills Permissions

**In Sentry OAuth approval screen, test:**
- Minimal scopes (org:read only)
- Standard scopes (org:read, project:read, event:read)
- Write scopes (add event:write, project:write)
**In OAuth approval screen, test:**
- Minimal skills (inspect, docs only)
- Default skills (inspect, seer, docs)
- All skills (inspect, seer, docs, triage, project-management)

**Verify tools filtered by scopes:**
**Verify tools filtered by skills:**
```bash
# Read-only: should have ~15 tools
# With inspect, docs only: no write tools
pnpm -w run cli "list tools" | grep "create_"

# With write: should have 19-20 tools
# With all skills: includes write tools
# Should see: create_project, create_team, update_issue, etc.
```

Expand Down Expand Up @@ -470,21 +470,21 @@ cat packages/mcp-cloudflare/.env | grep SENTRY_CLIENT

### "Permission denied" errors

**Cause:** Insufficient scopes granted during OAuth.
**Cause:** Insufficient skills granted during OAuth.

**Solution:**
```bash
# Force re-authorization with more scopes
# Force re-authorization with more skills
rm ~/.sentry-mcp-tokens.json
pnpm -w run cli "who am I?"

# In OAuth approval screen, select all needed permissions
# In OAuth approval screen, select all needed skills
```

### "Tool not found" errors

**Causes:**
1. Tool filtered by scopes
1. Tool filtered by skills
2. Build issue
3. Server version mismatch

Expand All @@ -493,8 +493,8 @@ pnpm -w run cli "who am I?"
# Check tool list
pnpm -w run cli "list tools" | jq '.tools[] | .name'

# Verify scopes include required permissions
# Example: create_project requires project:write scope
# Verify skills include required permissions
# Example: create_project requires project-management skill

# Rebuild and restart
pnpm -w run build && pnpm dev
Expand Down
24 changes: 11 additions & 13 deletions docs/testing-stdio.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ This opens the MCP Inspector at `http://localhost:6274`
### 3. Test Tools Interactively

**Basic workflow:**
1. **List Tools** - Verify all expected tools appear (should see 19-20 tools)
1. **List Tools** - Verify expected tools appear
2. **Call a tool** - Start with `whoami` (no parameters required)
3. **Test with parameters** - Try `find_organizations()`
4. **Test complex operations** - Try `search_events(naturalLanguageQuery="errors in the last hour")`
Expand Down Expand Up @@ -379,9 +379,8 @@ Add to `.vscode/settings.json`:
# Host configuration
--host=sentry.example.com # Self-hosted Sentry (hostname only)

# Scope management
--scopes=org:read,event:read # Override default scopes (replaces all)
--add-scopes=event:write # Add to default scopes (keeps defaults)
# Skills management
--skills=inspect,docs,triage # Limit to specific skills (default: all available)

# AI features (optional)
--openai-base-url=URL # Custom OpenAI endpoint
Expand All @@ -407,9 +406,8 @@ SENTRY_ACCESS_TOKEN=your-token
# Host (self-hosted only)
SENTRY_HOST=sentry.example.com

# Scopes
MCP_SCOPES=org:read,event:read # Override (replaces defaults)
MCP_ADD_SCOPES=event:write # Add (keeps defaults)
# Skills
MCP_SKILLS=inspect,docs,triage # Limit to specific skills

# AI features
OPENAI_API_KEY=your-key # For search_events/search_issues
Expand Down Expand Up @@ -449,17 +447,17 @@ node dist/index.js \
--host=sentry.local.dev
```

### 3. Test Scope Permissions
### 3. Test Skills

```bash
# Test read-only (default)
# Test with all skills (default)
pnpm start --access-token=TOKEN

# Test with write permissions
pnpm start --access-token=TOKEN --add-scopes=event:write,project:write
# Test with specific skills only
pnpm start --access-token=TOKEN --skills=inspect,docs

# Test minimal permissions
pnpm start --access-token=TOKEN --scopes=org:read,project:read
# Test read-only skills
pnpm start --access-token=TOKEN --skills=inspect,seer,docs
```

### 4. Test AI-Powered Tools
Expand Down
Loading