-
Notifications
You must be signed in to change notification settings - Fork 79
feat: add search and fetch tool for organizations, projects, and branches #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add new search tool that searches across all user organizations, projects, and branches - Implement parallel branch searching for improved performance - Support both personal and organization account contexts - Return structured results with MCP-compatible IDs and console URLs - Add helper functions for modular code organization - Minimum query length of 3 characters to optimize performance - Graceful error handling for inaccessible resources 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
![]() |
Infrastructure as Code | ![]() ![]() ![]() ![]() |
View in Orca |
![]() |
SAST | ![]() ![]() ![]() ![]() |
View in Orca |
![]() |
Secrets | ![]() ![]() ![]() ![]() |
View in Orca |
![]() |
Vulnerabilities | ![]() ![]() ![]() ![]() |
View in Orca |
🚀 Preview deployment ready: https://preview-mcp.neon.tech |
): Promise<CallToolResult> { | ||
try { | ||
// Parse the ID format | ||
if (id.startsWith('org:') || id.startsWith('org-')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add these to constants
} else if (id.startsWith('branch:')) { | ||
const [projectId, branchId] = id.slice(7).split('/'); | ||
return await fetchBranchDetails(projectId, branchId, neonClient, extra); | ||
} else if (id.startsWith('project:')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for these
projects = projectsData.projects || []; | ||
} catch { | ||
// Skip if we can't access projects | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we paralelize these 2 calls? listProjects
and getOrganizationMembers
?
}, | ||
{ | ||
name: 'fetch' as const, | ||
description: `Fetches detailed information about a specific organization, project, or branch using the ID returned by the search tool. This tool provides comprehensive information about Neon resources for detailed analysis and management.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that this tool can only be used with the search
tool combined?
Summary
This PR adds a new
search
tool to the Neon MCP server that allows users to search across all their organizations, projects, and branches with a single query.Key Features
id
,title
,url
, andtype
fieldsImplementation Details
search
tool with query parameter (minimum 3 characters)org:
,project:
,branch:
)Test plan