nia-mcp-server 1.0.21__tar.gz → 1.0.22__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nia-mcp-server might be problematic. Click here for more details.
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/PKG-INFO +1 -1
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/pyproject.toml +1 -1
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/__init__.py +1 -1
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/api_client.py +29 -3
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/server.py +125 -17
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/.gitignore +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/ARCHITECTURE.md +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/LICENSE +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/README.md +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/nia_analytics.log +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/nia_mcp_server.log +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/__main__.py +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/claude_rules.md +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/cursor_rules.md +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/nia_rules.md +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/vscode_rules.md +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/windsurf_rules.md +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/cli.py +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/profiles.py +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/project_init.py +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/rule_transformer.py +0 -0
- {nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/setup.py +0 -0
|
@@ -28,7 +28,7 @@ class NIAApiClient:
|
|
|
28
28
|
self.client = httpx.AsyncClient(
|
|
29
29
|
headers={
|
|
30
30
|
"Authorization": f"Bearer {api_key}",
|
|
31
|
-
"User-Agent": "nia-mcp-server/1.0.
|
|
31
|
+
"User-Agent": "nia-mcp-server/1.0.22",
|
|
32
32
|
"Content-Type": "application/json"
|
|
33
33
|
},
|
|
34
34
|
timeout=720.0 # 12 minute timeout for deep research operations
|
|
@@ -685,18 +685,44 @@ class NIAApiClient:
|
|
|
685
685
|
"source_identifier": source_identifier,
|
|
686
686
|
"metadata": metadata or {}
|
|
687
687
|
}
|
|
688
|
-
|
|
688
|
+
|
|
689
689
|
response = await self.client.post(
|
|
690
690
|
f"{self.base_url}/v2/sources/content",
|
|
691
691
|
json=payload
|
|
692
692
|
)
|
|
693
693
|
response.raise_for_status()
|
|
694
694
|
return response.json()
|
|
695
|
-
|
|
695
|
+
|
|
696
696
|
except httpx.HTTPStatusError as e:
|
|
697
697
|
raise self._handle_api_error(e)
|
|
698
698
|
except Exception as e:
|
|
699
699
|
raise APIError(f"Failed to get source content: {str(e)}")
|
|
700
|
+
|
|
701
|
+
async def submit_bug_report(
|
|
702
|
+
self,
|
|
703
|
+
description: str,
|
|
704
|
+
bug_type: str = "bug",
|
|
705
|
+
additional_context: Optional[str] = None
|
|
706
|
+
) -> Dict[str, Any]:
|
|
707
|
+
"""Submit a bug report or feature request."""
|
|
708
|
+
try:
|
|
709
|
+
payload = {
|
|
710
|
+
"description": description,
|
|
711
|
+
"bug_type": bug_type,
|
|
712
|
+
"additional_context": additional_context
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
response = await self.client.post(
|
|
716
|
+
f"{self.base_url}/v2/bug-report",
|
|
717
|
+
json=payload
|
|
718
|
+
)
|
|
719
|
+
response.raise_for_status()
|
|
720
|
+
return response.json()
|
|
721
|
+
|
|
722
|
+
except httpx.HTTPStatusError as e:
|
|
723
|
+
raise self._handle_api_error(e)
|
|
724
|
+
except Exception as e:
|
|
725
|
+
raise APIError(f"Failed to submit bug report: {str(e)}")
|
|
700
726
|
|
|
701
727
|
async def index_local_filesystem(
|
|
702
728
|
self,
|
|
@@ -335,19 +335,18 @@ async def search_documentation(
|
|
|
335
335
|
|
|
336
336
|
Args:
|
|
337
337
|
query: Natural language search query. Don't just use keywords or unstrctured query, make a comprehensive question to get the best results possible.
|
|
338
|
-
sources: List of documentation identifiers to search.
|
|
339
|
-
- Source UUIDs (e.g., "550e8400-e29b-41d4-a716-446655440000") - RECOMMENDED
|
|
338
|
+
sources: List of documentation identifiers to search. Can be:
|
|
340
339
|
- Display names (e.g., "Vercel AI SDK - Core")
|
|
341
340
|
- URLs (e.g., "https://sdk.vercel.ai/docs")
|
|
341
|
+
- Source IDs (UUID format for backwards compatibility)
|
|
342
342
|
include_sources: Whether to include source references in results
|
|
343
343
|
|
|
344
344
|
Returns:
|
|
345
345
|
Search results with relevant documentation excerpts
|
|
346
346
|
|
|
347
347
|
Important:
|
|
348
|
-
-
|
|
349
|
-
-
|
|
350
|
-
- Display names and URLs are also supported for convenience
|
|
348
|
+
- You can now use friendly names instead of UUIDs! Try display names or URLs.
|
|
349
|
+
- If you don't know the identifiers, use `list_documentation` tool to see available options.
|
|
351
350
|
"""
|
|
352
351
|
try:
|
|
353
352
|
client = await ensure_api_client()
|
|
@@ -357,17 +356,20 @@ async def search_documentation(
|
|
|
357
356
|
return [TextContent(
|
|
358
357
|
type="text",
|
|
359
358
|
text="📚 **Please specify which documentation sources to search:**\n\n"
|
|
360
|
-
"1. Use `list_documentation` to see available sources
|
|
361
|
-
"2. Then call `search_documentation(\"your query\", [\"
|
|
362
|
-
"**
|
|
363
|
-
"- UUIDs: `\"550e8400-e29b-41d4-a716-446655440000\"` - RECOMMENDED\n"
|
|
359
|
+
"1. Use `list_documentation` to see available sources\n"
|
|
360
|
+
"2. Then call `search_documentation(\"your query\", [\"source1\", \"source2\"])`\n\n"
|
|
361
|
+
"**You can use any of these identifier formats:**\n"
|
|
364
362
|
"- Display names: `\"Vercel AI SDK - Core\"`\n"
|
|
365
|
-
"- URLs: `\"https://docs.trynia.ai/\"`\n
|
|
366
|
-
"
|
|
363
|
+
"- URLs: `\"https://docs.trynia.ai/\"`\n"
|
|
364
|
+
"- UUIDs: `\"550e8400-e29b-41d4-a716-446655440000\"`\n\n"
|
|
365
|
+
"**Example:**\n"
|
|
367
366
|
"```\n"
|
|
368
|
-
"search_documentation(\"API reference\", [\"
|
|
367
|
+
"search_documentation(\"API reference\", [\"Vercel AI SDK - Core\"])\n"
|
|
369
368
|
"```\n\n"
|
|
370
|
-
"**📌 Tip:**
|
|
369
|
+
"**📌 Tip:** Mix different identifier types in the same search:\n"
|
|
370
|
+
"```\n"
|
|
371
|
+
"search_documentation(\"query\", [\"Display Name\", \"https://docs.example.com/\"])\n"
|
|
372
|
+
"```"
|
|
371
373
|
)]
|
|
372
374
|
|
|
373
375
|
# Build messages for the query
|
|
@@ -845,7 +847,7 @@ async def rename_resource(
|
|
|
845
847
|
resource_type: Type of resource - "repository" or "documentation"
|
|
846
848
|
identifier:
|
|
847
849
|
- For repository: Repository in owner/repo format (e.g., "facebook/react")
|
|
848
|
-
- For documentation:
|
|
850
|
+
- For documentation: Can be display name, URL, or UUID (e.g., "Vercel AI SDK - Core", "https://docs.trynia.ai/", or "doc-id-123")
|
|
849
851
|
new_name: New display name for the resource (1-100 characters)
|
|
850
852
|
|
|
851
853
|
Returns:
|
|
@@ -853,7 +855,7 @@ async def rename_resource(
|
|
|
853
855
|
|
|
854
856
|
Examples:
|
|
855
857
|
- rename_resource("repository", "facebook/react", "React Framework")
|
|
856
|
-
- rename_resource("documentation", "
|
|
858
|
+
- rename_resource("documentation", "Vercel AI SDK - Core", "Python Official Docs")
|
|
857
859
|
- rename_resource("documentation", "https://docs.trynia.ai/", "NIA Documentation")
|
|
858
860
|
"""
|
|
859
861
|
try:
|
|
@@ -916,14 +918,14 @@ async def delete_resource(
|
|
|
916
918
|
resource_type: Type of resource - "repository" or "documentation"
|
|
917
919
|
identifier:
|
|
918
920
|
- For repository: Repository in owner/repo format (e.g., "facebook/react")
|
|
919
|
-
- For documentation:
|
|
921
|
+
- For documentation: Can be display name, URL, or UUID (e.g., "Vercel AI SDK - Core", "https://docs.trynia.ai/", or "doc-id-123")
|
|
920
922
|
|
|
921
923
|
Returns:
|
|
922
924
|
Confirmation of deletion
|
|
923
925
|
|
|
924
926
|
Examples:
|
|
925
927
|
- delete_resource("repository", "facebook/react")
|
|
926
|
-
- delete_resource("documentation", "
|
|
928
|
+
- delete_resource("documentation", "Vercel AI SDK - Core")
|
|
927
929
|
- delete_resource("documentation", "https://docs.trynia.ai/")
|
|
928
930
|
"""
|
|
929
931
|
try:
|
|
@@ -2979,6 +2981,112 @@ async def visualize_codebase(
|
|
|
2979
2981
|
text=f"❌ Error opening visualization: {str(e)}"
|
|
2980
2982
|
)]
|
|
2981
2983
|
|
|
2984
|
+
|
|
2985
|
+
@mcp.tool()
|
|
2986
|
+
async def nia_bug_report(
|
|
2987
|
+
description: str,
|
|
2988
|
+
bug_type: str = "bug",
|
|
2989
|
+
additional_context: Optional[str] = None
|
|
2990
|
+
) -> List[TextContent]:
|
|
2991
|
+
"""
|
|
2992
|
+
Submit a bug report or feature request to the Nia development team.
|
|
2993
|
+
|
|
2994
|
+
This tool allows users to report bugs, request features, or provide feedback
|
|
2995
|
+
directly to the development team. Reports are sent via email and Slack for
|
|
2996
|
+
immediate attention.
|
|
2997
|
+
|
|
2998
|
+
Args:
|
|
2999
|
+
description: Detailed description of the bug or feature request (10-5000 characters)
|
|
3000
|
+
bug_type: Type of report - "bug", "feature-request", "improvement", or "other" (default: "bug")
|
|
3001
|
+
additional_context: Optional additional context, steps to reproduce, or related information
|
|
3002
|
+
|
|
3003
|
+
Returns:
|
|
3004
|
+
Confirmation of successful submission with reference ID
|
|
3005
|
+
|
|
3006
|
+
Examples:
|
|
3007
|
+
- nia_bug_report("The search is not returning any results for my repository")
|
|
3008
|
+
- nia_bug_report("Add support for searching within specific file types", "feature-request")
|
|
3009
|
+
- nia_bug_report("Repository indexing fails with large repos", "bug", "Happens with repos over 1GB")
|
|
3010
|
+
"""
|
|
3011
|
+
try:
|
|
3012
|
+
client = await ensure_api_client()
|
|
3013
|
+
|
|
3014
|
+
# Validate input parameters
|
|
3015
|
+
if not description or len(description.strip()) < 10:
|
|
3016
|
+
return [
|
|
3017
|
+
TextContent(
|
|
3018
|
+
type="text",
|
|
3019
|
+
text="❌ Error: Bug description must be at least 10 characters long."
|
|
3020
|
+
)
|
|
3021
|
+
]
|
|
3022
|
+
|
|
3023
|
+
if len(description) > 5000:
|
|
3024
|
+
return [
|
|
3025
|
+
TextContent(
|
|
3026
|
+
type="text",
|
|
3027
|
+
text="❌ Error: Bug description must be 5000 characters or less."
|
|
3028
|
+
)
|
|
3029
|
+
]
|
|
3030
|
+
|
|
3031
|
+
valid_types = ["bug", "feature-request", "improvement", "other"]
|
|
3032
|
+
if bug_type not in valid_types:
|
|
3033
|
+
return [
|
|
3034
|
+
TextContent(
|
|
3035
|
+
type="text",
|
|
3036
|
+
text=f"❌ Error: bug_type must be one of: {', '.join(valid_types)}"
|
|
3037
|
+
)
|
|
3038
|
+
]
|
|
3039
|
+
|
|
3040
|
+
if additional_context and len(additional_context) > 2000:
|
|
3041
|
+
return [
|
|
3042
|
+
TextContent(
|
|
3043
|
+
type="text",
|
|
3044
|
+
text="❌ Error: Additional context must be 2000 characters or less."
|
|
3045
|
+
)
|
|
3046
|
+
]
|
|
3047
|
+
|
|
3048
|
+
logger.info(f"Submitting bug report: type={bug_type}, description_length={len(description)}")
|
|
3049
|
+
|
|
3050
|
+
# Submit bug report via API client
|
|
3051
|
+
result = await client.submit_bug_report(
|
|
3052
|
+
description=description.strip(),
|
|
3053
|
+
bug_type=bug_type,
|
|
3054
|
+
additional_context=additional_context.strip() if additional_context else None
|
|
3055
|
+
)
|
|
3056
|
+
|
|
3057
|
+
if result.get("success"):
|
|
3058
|
+
return [
|
|
3059
|
+
TextContent(
|
|
3060
|
+
type="text",
|
|
3061
|
+
text=f"✅ Bug report submitted successfully!\n\n"
|
|
3062
|
+
f"Thank you for your feedback. Your report has been sent to the development team "
|
|
3063
|
+
f"and will be reviewed promptly.\n\n"
|
|
3064
|
+
f"Reference ID: {result.get('message', '').split(': ')[-1] if ': ' in result.get('message', '') else 'N/A'}\n"
|
|
3065
|
+
f"Type: {bug_type.title()}\n"
|
|
3066
|
+
f"Status: The team will be notified immediately via email and Slack.\n\n"
|
|
3067
|
+
f"You can also track issues and feature requests on our GitHub repository:\n"
|
|
3068
|
+
f"https://github.com/nozomio-labs/nia/issues"
|
|
3069
|
+
)
|
|
3070
|
+
]
|
|
3071
|
+
else:
|
|
3072
|
+
return [
|
|
3073
|
+
TextContent(
|
|
3074
|
+
type="text",
|
|
3075
|
+
text=f"❌ Failed to submit bug report: {result.get('message', 'Unknown error')}\n\n"
|
|
3076
|
+
f"Please try again or contact support directly at support@trynia.ai"
|
|
3077
|
+
)
|
|
3078
|
+
]
|
|
3079
|
+
|
|
3080
|
+
except Exception as e:
|
|
3081
|
+
logger.error(f"Error submitting bug report: {e}")
|
|
3082
|
+
return [
|
|
3083
|
+
TextContent(
|
|
3084
|
+
type="text",
|
|
3085
|
+
text=f"❌ Error submitting bug report: {str(e)}\n\n"
|
|
3086
|
+
f"Please try again or contact support directly at support@trynia.ai"
|
|
3087
|
+
)
|
|
3088
|
+
]
|
|
3089
|
+
|
|
2982
3090
|
# Resources
|
|
2983
3091
|
|
|
2984
3092
|
# Note: FastMCP doesn't have list_resources or read_resource decorators
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/claude_rules.md
RENAMED
|
File without changes
|
{nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/cursor_rules.md
RENAMED
|
File without changes
|
{nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/nia_rules.md
RENAMED
|
File without changes
|
{nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/vscode_rules.md
RENAMED
|
File without changes
|
{nia_mcp_server-1.0.21 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/windsurf_rules.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|