nia-mcp-server 1.0.19__tar.gz → 1.0.20__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.19 → nia_mcp_server-1.0.20}/PKG-INFO +1 -1
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/pyproject.toml +1 -1
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/__init__.py +1 -1
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/api_client.py +15 -7
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/server.py +55 -46
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/.gitignore +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/ARCHITECTURE.md +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/LICENSE +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/README.md +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/nia_analytics.log +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/nia_mcp_server.log +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/__main__.py +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/assets/rules/claude_rules.md +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/assets/rules/cursor_rules.md +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/assets/rules/nia_rules.md +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/assets/rules/vscode_rules.md +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/assets/rules/windsurf_rules.md +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/cli.py +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/profiles.py +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/project_init.py +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/rule_transformer.py +0 -0
- {nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/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.20",
|
|
32
32
|
"Content-Type": "application/json"
|
|
33
33
|
},
|
|
34
34
|
timeout=720.0 # 12 minute timeout for deep research operations
|
|
@@ -552,15 +552,23 @@ class NIAApiClient:
|
|
|
552
552
|
for repo in repositories:
|
|
553
553
|
repo_list.append({"repository": repo})
|
|
554
554
|
|
|
555
|
-
# Build data source list
|
|
555
|
+
# Build data source list
|
|
556
556
|
source_list = []
|
|
557
557
|
if data_sources:
|
|
558
|
-
for
|
|
559
|
-
# Handle
|
|
560
|
-
|
|
561
|
-
|
|
558
|
+
for source in data_sources:
|
|
559
|
+
# Handle flexible identifier formats:
|
|
560
|
+
# 1. String directly (display_name, URL, or source_id) - NEW
|
|
561
|
+
# 2. Dict with "source_id" (backwards compatible)
|
|
562
|
+
# 3. Dict with "identifier" (new format)
|
|
563
|
+
if isinstance(source, str):
|
|
564
|
+
# Pass string directly - backend will resolve it
|
|
565
|
+
source_list.append(source)
|
|
566
|
+
elif isinstance(source, dict):
|
|
567
|
+
# Keep dict format as-is (backwards compatible)
|
|
568
|
+
source_list.append(source)
|
|
562
569
|
else:
|
|
563
|
-
|
|
570
|
+
# Convert other types to string
|
|
571
|
+
source_list.append(str(source))
|
|
564
572
|
|
|
565
573
|
# Validate at least one source
|
|
566
574
|
if not repo_list and not source_list:
|
|
@@ -186,34 +186,22 @@ async def search_codebase(
|
|
|
186
186
|
try:
|
|
187
187
|
client = await ensure_api_client()
|
|
188
188
|
|
|
189
|
-
#
|
|
189
|
+
# Require explicit repository selection
|
|
190
190
|
if not repositories:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
if repo_name:
|
|
206
|
-
repositories.append(repo_name)
|
|
207
|
-
else:
|
|
208
|
-
logger.warning(f"Repository missing 'repository' field: {repo}")
|
|
209
|
-
else:
|
|
210
|
-
logger.warning(f"Unexpected repository format: {type(repo)}, value: {repo}")
|
|
211
|
-
|
|
212
|
-
if not repositories:
|
|
213
|
-
return [TextContent(
|
|
214
|
-
type="text",
|
|
215
|
-
text="❌ No indexed repositories found. Use `index_repository` to index a codebase first."
|
|
216
|
-
)]
|
|
191
|
+
return [TextContent(
|
|
192
|
+
type="text",
|
|
193
|
+
text="🔍 **Please specify which repositories to search:**\n\n"
|
|
194
|
+
"1. Use `list_repositories` to see available repositories\n"
|
|
195
|
+
"2. Then call `search_codebase(\"your query\", [\"owner/repo1\", \"owner/repo2\"])`\n\n"
|
|
196
|
+
"**Example:**\n"
|
|
197
|
+
"```\n"
|
|
198
|
+
"search_codebase(\"How does auth work?\", [\"facebook/react\"])\n"
|
|
199
|
+
"```\n\n"
|
|
200
|
+
"**📌 Tip:** You can search specific folders using the exact format from `list_repositories`:\n"
|
|
201
|
+
"```\n"
|
|
202
|
+
"search_codebase(\"query\", [\"owner/repo/tree/branch/folder\"])\n"
|
|
203
|
+
"```"
|
|
204
|
+
)]
|
|
217
205
|
|
|
218
206
|
# Build messages for the query
|
|
219
207
|
messages = [
|
|
@@ -343,31 +331,46 @@ async def search_documentation(
|
|
|
343
331
|
include_sources: bool = True
|
|
344
332
|
) -> List[TextContent]:
|
|
345
333
|
"""
|
|
346
|
-
Search indexed documentation using natural language.
|
|
347
|
-
|
|
334
|
+
Search indexed documentation using natural language.
|
|
335
|
+
|
|
348
336
|
Args:
|
|
349
337
|
query: Natural language search query. Don't just use keywords or unstrctured query, make a comprehensive question to get the best results possible.
|
|
350
|
-
sources: List of documentation
|
|
338
|
+
sources: List of documentation identifiers to search. Can be:
|
|
339
|
+
- Display names (e.g., "Vercel AI SDK - Core")
|
|
340
|
+
- URLs (e.g., "https://sdk.vercel.ai/docs")
|
|
341
|
+
- Source IDs (UUID format for backwards compatibility)
|
|
351
342
|
include_sources: Whether to include source references in results
|
|
352
|
-
|
|
343
|
+
|
|
353
344
|
Returns:
|
|
354
345
|
Search results with relevant documentation excerpts
|
|
355
346
|
|
|
356
347
|
Important:
|
|
357
|
-
-
|
|
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.
|
|
358
350
|
"""
|
|
359
351
|
try:
|
|
360
352
|
client = await ensure_api_client()
|
|
361
353
|
|
|
362
|
-
#
|
|
354
|
+
# Require explicit source selection
|
|
363
355
|
if not sources:
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
356
|
+
return [TextContent(
|
|
357
|
+
type="text",
|
|
358
|
+
text="📚 **Please specify which documentation sources to search:**\n\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"
|
|
362
|
+
"- Display names: `\"Vercel AI SDK - Core\"`\n"
|
|
363
|
+
"- URLs: `\"https://docs.trynia.ai/\"`\n"
|
|
364
|
+
"- UUIDs: `\"550e8400-e29b-41d4-a716-446655440000\"`\n\n"
|
|
365
|
+
"**Example:**\n"
|
|
366
|
+
"```\n"
|
|
367
|
+
"search_documentation(\"API reference\", [\"Vercel AI SDK - Core\"])\n"
|
|
368
|
+
"```\n\n"
|
|
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
|
+
"```"
|
|
373
|
+
)]
|
|
371
374
|
|
|
372
375
|
# Build messages for the query
|
|
373
376
|
messages = [
|
|
@@ -844,7 +847,7 @@ async def rename_resource(
|
|
|
844
847
|
resource_type: Type of resource - "repository" or "documentation"
|
|
845
848
|
identifier:
|
|
846
849
|
- For repository: Repository in owner/repo format (e.g., "facebook/react")
|
|
847
|
-
- 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")
|
|
848
851
|
new_name: New display name for the resource (1-100 characters)
|
|
849
852
|
|
|
850
853
|
Returns:
|
|
@@ -852,7 +855,8 @@ async def rename_resource(
|
|
|
852
855
|
|
|
853
856
|
Examples:
|
|
854
857
|
- rename_resource("repository", "facebook/react", "React Framework")
|
|
855
|
-
- rename_resource("documentation", "
|
|
858
|
+
- rename_resource("documentation", "Vercel AI SDK - Core", "Python Official Docs")
|
|
859
|
+
- rename_resource("documentation", "https://docs.trynia.ai/", "NIA Documentation")
|
|
856
860
|
"""
|
|
857
861
|
try:
|
|
858
862
|
# Validate resource type
|
|
@@ -914,14 +918,15 @@ async def delete_resource(
|
|
|
914
918
|
resource_type: Type of resource - "repository" or "documentation"
|
|
915
919
|
identifier:
|
|
916
920
|
- For repository: Repository in owner/repo format (e.g., "facebook/react")
|
|
917
|
-
- 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")
|
|
918
922
|
|
|
919
923
|
Returns:
|
|
920
924
|
Confirmation of deletion
|
|
921
925
|
|
|
922
926
|
Examples:
|
|
923
927
|
- delete_resource("repository", "facebook/react")
|
|
924
|
-
- delete_resource("documentation", "
|
|
928
|
+
- delete_resource("documentation", "Vercel AI SDK - Core")
|
|
929
|
+
- delete_resource("documentation", "https://docs.trynia.ai/")
|
|
925
930
|
"""
|
|
926
931
|
try:
|
|
927
932
|
# Validate resource type
|
|
@@ -976,14 +981,18 @@ async def check_resource_status(
|
|
|
976
981
|
resource_type: Type of resource - "repository" or "documentation"
|
|
977
982
|
identifier:
|
|
978
983
|
- For repository: Repository in owner/repo format (e.g., "facebook/react")
|
|
979
|
-
- For documentation:
|
|
984
|
+
- For documentation: Source ID (UUID format only) - use list_resources to get the UUID
|
|
980
985
|
|
|
981
986
|
Returns:
|
|
982
987
|
Current status of the resource
|
|
983
988
|
|
|
984
989
|
Examples:
|
|
985
990
|
- check_resource_status("repository", "facebook/react")
|
|
986
|
-
- check_resource_status("documentation", "
|
|
991
|
+
- check_resource_status("documentation", "550e8400-e29b-41d4-a716-446655440000")
|
|
992
|
+
|
|
993
|
+
Note:
|
|
994
|
+
- Documentation status checking requires UUID identifiers only
|
|
995
|
+
- Use list_resources("documentation") to find the UUID for a documentation source
|
|
987
996
|
"""
|
|
988
997
|
try:
|
|
989
998
|
# Validate resource type
|
|
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.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/assets/rules/claude_rules.md
RENAMED
|
File without changes
|
{nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/assets/rules/cursor_rules.md
RENAMED
|
File without changes
|
{nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/assets/rules/nia_rules.md
RENAMED
|
File without changes
|
{nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/src/nia_mcp_server/assets/rules/vscode_rules.md
RENAMED
|
File without changes
|
{nia_mcp_server-1.0.19 → nia_mcp_server-1.0.20}/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
|