Skip to content

feat: support Amazon Q Developer #68

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

Closed
Closed
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
2 changes: 2 additions & 0 deletions src/mcp_scan/mcp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from mcp.client.streamable_http import streamablehttp_client

from mcp_scan.models import (
AmazonQDeveloperMCPConfigFile,
ClaudeConfigFile,
MCPConfig,
ServerSignature,
Expand Down Expand Up @@ -142,6 +143,7 @@ def parse_and_validate(config: dict) -> MCPConfig:
ClaudeConfigFile, # used by most clients
VSCodeConfigFile, # used by vscode settings.json
VSCodeMCPConfig, # used by vscode mcp.json
AmazonQDeveloperMCPConfigFile, # used by amazon q developer
]
for model in models:
try:
Expand Down
11 changes: 11 additions & 0 deletions src/mcp_scan/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ def set_servers(self, servers: dict[str, SSEServer | StdioServer | StreamableHTT
self.mcp.servers = servers


class AmazonQDeveloperMCPConfigFile(MCPConfig):
model_config = ConfigDict()
mcpServers: dict[str, SSEServer | StdioServer | StreamableHTTPServer]

def get_servers(self) -> dict[str, SSEServer | StdioServer | StreamableHTTPServer]:
return self.mcpServers

def set_servers(self, servers: dict[str, SSEServer | StdioServer | StreamableHTTPServer]) -> None:
self.mcpServers = servers


class ScanError(BaseModel):
model_config = ConfigDict(arbitrary_types_allowed=True)
message: str | None = None
Expand Down
3 changes: 3 additions & 0 deletions src/mcp_scan/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"windsurf": ["~/.codeium/windsurf/mcp_config.json"],
"cursor": ["~/.cursor/mcp.json"],
"vscode": ["~/.vscode/mcp.json", "~/.config/Code/User/settings.json"],
"amazonqdeveloper": ["~/.aws/amazonq/mcp.json"],
}
WELL_KNOWN_MCP_PATHS = [path for client, paths in CLIENT_PATHS.items() for path in paths]
elif sys.platform == "darwin":
Expand All @@ -16,6 +17,7 @@
"cursor": ["~/.cursor/mcp.json"],
"claude": ["~/Library/Application Support/Claude/claude_desktop_config.json"],
"vscode": ["~/.vscode/mcp.json", "~/Library/Application Support/Code/User/settings.json"],
"amazonqdeveloper": ["~/.aws/amazonq/mcp.json"],
}
WELL_KNOWN_MCP_PATHS = [path for client, paths in CLIENT_PATHS.items() for path in paths]
elif sys.platform == "win32":
Expand All @@ -24,6 +26,7 @@
"cursor": ["~/.cursor/mcp.json"],
"claude": ["~/AppData/Roaming/Claude/claude_desktop_config.json"],
"vscode": ["~/.vscode/mcp.json", "~/AppData/Roaming/Code/User/settings.json"],
"amazonqdeveloper": ["~/.aws/amazonq/mcp.json"],
}

WELL_KNOWN_MCP_PATHS = [path for client, paths in CLIENT_PATHS.items() for path in paths]
Expand Down