nia-mcp-server 1.0.19__py3-none-any.whl → 1.0.21__py3-none-any.whl
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/__init__.py +1 -1
- nia_mcp_server/api_client.py +15 -7
- nia_mcp_server/server.py +53 -46
- {nia_mcp_server-1.0.19.dist-info → nia_mcp_server-1.0.21.dist-info}/METADATA +1 -1
- {nia_mcp_server-1.0.19.dist-info → nia_mcp_server-1.0.21.dist-info}/RECORD +8 -8
- {nia_mcp_server-1.0.19.dist-info → nia_mcp_server-1.0.21.dist-info}/WHEEL +0 -0
- {nia_mcp_server-1.0.19.dist-info → nia_mcp_server-1.0.21.dist-info}/entry_points.txt +0 -0
- {nia_mcp_server-1.0.19.dist-info → nia_mcp_server-1.0.21.dist-info}/licenses/LICENSE +0 -0
nia_mcp_server/__init__.py
CHANGED
nia_mcp_server/api_client.py
CHANGED
|
@@ -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.21",
|
|
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:
|
nia_mcp_server/server.py
CHANGED
|
@@ -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,44 @@ 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. Preferred format is UUID, but also supports:
|
|
339
|
+
- Source UUIDs (e.g., "550e8400-e29b-41d4-a716-446655440000") - RECOMMENDED
|
|
340
|
+
- Display names (e.g., "Vercel AI SDK - Core")
|
|
341
|
+
- URLs (e.g., "https://sdk.vercel.ai/docs")
|
|
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
|
+
- UUIDs are the preferred identifier format for best performance
|
|
349
|
+
- Use `list_documentation` tool to see available sources and their UUIDs
|
|
350
|
+
- Display names and URLs are also supported for convenience
|
|
358
351
|
"""
|
|
359
352
|
try:
|
|
360
353
|
client = await ensure_api_client()
|
|
361
354
|
|
|
362
|
-
#
|
|
355
|
+
# Require explicit source selection
|
|
363
356
|
if not sources:
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
357
|
+
return [TextContent(
|
|
358
|
+
type="text",
|
|
359
|
+
text="📚 **Please specify which documentation sources to search:**\n\n"
|
|
360
|
+
"1. Use `list_documentation` to see available sources and their UUIDs\n"
|
|
361
|
+
"2. Then call `search_documentation(\"your query\", [\"uuid1\", \"uuid2\"])`\n\n"
|
|
362
|
+
"**Supported identifier formats (UUIDs preferred):**\n"
|
|
363
|
+
"- UUIDs: `\"550e8400-e29b-41d4-a716-446655440000\"` - RECOMMENDED\n"
|
|
364
|
+
"- Display names: `\"Vercel AI SDK - Core\"`\n"
|
|
365
|
+
"- URLs: `\"https://docs.trynia.ai/\"`\n\n"
|
|
366
|
+
"**Example (preferred):**\n"
|
|
367
|
+
"```\n"
|
|
368
|
+
"search_documentation(\"API reference\", [\"550e8400-e29b-41d4-a716-446655440000\"])\n"
|
|
369
|
+
"```\n\n"
|
|
370
|
+
"**📌 Tip:** UUIDs provide best performance and reliability"
|
|
371
|
+
)]
|
|
371
372
|
|
|
372
373
|
# Build messages for the query
|
|
373
374
|
messages = [
|
|
@@ -844,7 +845,7 @@ async def rename_resource(
|
|
|
844
845
|
resource_type: Type of resource - "repository" or "documentation"
|
|
845
846
|
identifier:
|
|
846
847
|
- For repository: Repository in owner/repo format (e.g., "facebook/react")
|
|
847
|
-
- For documentation:
|
|
848
|
+
- For documentation: UUID preferred, also supports display name or URL (e.g., "550e8400-e29b-41d4-a716-446655440000", "Vercel AI SDK - Core", or "https://docs.trynia.ai/")
|
|
848
849
|
new_name: New display name for the resource (1-100 characters)
|
|
849
850
|
|
|
850
851
|
Returns:
|
|
@@ -852,7 +853,8 @@ async def rename_resource(
|
|
|
852
853
|
|
|
853
854
|
Examples:
|
|
854
855
|
- rename_resource("repository", "facebook/react", "React Framework")
|
|
855
|
-
- rename_resource("documentation", "
|
|
856
|
+
- rename_resource("documentation", "550e8400-e29b-41d4-a716-446655440000", "Python Official Docs")
|
|
857
|
+
- rename_resource("documentation", "https://docs.trynia.ai/", "NIA Documentation")
|
|
856
858
|
"""
|
|
857
859
|
try:
|
|
858
860
|
# Validate resource type
|
|
@@ -914,14 +916,15 @@ async def delete_resource(
|
|
|
914
916
|
resource_type: Type of resource - "repository" or "documentation"
|
|
915
917
|
identifier:
|
|
916
918
|
- For repository: Repository in owner/repo format (e.g., "facebook/react")
|
|
917
|
-
- For documentation:
|
|
919
|
+
- For documentation: UUID preferred, also supports display name or URL (e.g., "550e8400-e29b-41d4-a716-446655440000", "Vercel AI SDK - Core", or "https://docs.trynia.ai/")
|
|
918
920
|
|
|
919
921
|
Returns:
|
|
920
922
|
Confirmation of deletion
|
|
921
923
|
|
|
922
924
|
Examples:
|
|
923
925
|
- delete_resource("repository", "facebook/react")
|
|
924
|
-
- delete_resource("documentation", "
|
|
926
|
+
- delete_resource("documentation", "550e8400-e29b-41d4-a716-446655440000")
|
|
927
|
+
- delete_resource("documentation", "https://docs.trynia.ai/")
|
|
925
928
|
"""
|
|
926
929
|
try:
|
|
927
930
|
# Validate resource type
|
|
@@ -976,14 +979,18 @@ async def check_resource_status(
|
|
|
976
979
|
resource_type: Type of resource - "repository" or "documentation"
|
|
977
980
|
identifier:
|
|
978
981
|
- For repository: Repository in owner/repo format (e.g., "facebook/react")
|
|
979
|
-
- For documentation:
|
|
982
|
+
- For documentation: Source ID (UUID format only) - use list_resources to get the UUID
|
|
980
983
|
|
|
981
984
|
Returns:
|
|
982
985
|
Current status of the resource
|
|
983
986
|
|
|
984
987
|
Examples:
|
|
985
988
|
- check_resource_status("repository", "facebook/react")
|
|
986
|
-
- check_resource_status("documentation", "
|
|
989
|
+
- check_resource_status("documentation", "550e8400-e29b-41d4-a716-446655440000")
|
|
990
|
+
|
|
991
|
+
Note:
|
|
992
|
+
- Documentation status checking requires UUID identifiers only
|
|
993
|
+
- Use list_resources("documentation") to find the UUID for a documentation source
|
|
987
994
|
"""
|
|
988
995
|
try:
|
|
989
996
|
# Validate resource type
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
nia_mcp_server/__init__.py,sha256=
|
|
1
|
+
nia_mcp_server/__init__.py,sha256=U4ztjfv89tU3YlGCCf3CKfTS2ZEeFmjpjjSMHRujBVM,85
|
|
2
2
|
nia_mcp_server/__main__.py,sha256=YQSpFtDeKp18r8mKr084cHnRFV4416_EKCu9FTM8_ik,394
|
|
3
|
-
nia_mcp_server/api_client.py,sha256=
|
|
3
|
+
nia_mcp_server/api_client.py,sha256=e-U_RUGCGrC4DfjokIygWiprNQUAHt-stPxpwdsLG4I,35034
|
|
4
4
|
nia_mcp_server/cli.py,sha256=32VSPNIocXtDgVBDZNZsxvj3kytBn54_a1pIE84vOdY,1834
|
|
5
5
|
nia_mcp_server/profiles.py,sha256=2DD8PFRr5Ij4IK4sPUz0mH8aKjkrEtkKLC1R0iki2bA,7221
|
|
6
6
|
nia_mcp_server/project_init.py,sha256=T0-ziJhofL4L8APwnM43BLhxtlmOHaYH-V9PF2yXLw4,7138
|
|
7
7
|
nia_mcp_server/rule_transformer.py,sha256=wCxoQ1Kl_rI9mUFnh9kG5iCXYU4QInrmFQOReZfAFVo,11000
|
|
8
|
-
nia_mcp_server/server.py,sha256=
|
|
8
|
+
nia_mcp_server/server.py,sha256=BWSeAft-9El_nsf-69rDnt1HpUuz5_vB-9MrPHgsbr8,130666
|
|
9
9
|
nia_mcp_server/setup.py,sha256=nJXVY8NHGtWROtoH8DW-3uOgyuPs4F9dW0cNhcbCLrM,5355
|
|
10
10
|
nia_mcp_server/assets/rules/claude_rules.md,sha256=HNL5GJMUbFxSpNbIAJUQWqAywjMl4lf530I1in69aNY,7380
|
|
11
11
|
nia_mcp_server/assets/rules/cursor_rules.md,sha256=hd6lhzNrK1ULQUYIEVeOnyKnuLKq4hmwZPbMqGUI1Lk,1720
|
|
12
12
|
nia_mcp_server/assets/rules/nia_rules.md,sha256=l6sx000uqoczoHYqOPp4hnNgyfpnhvO9NyT0fVx5nU0,8059
|
|
13
13
|
nia_mcp_server/assets/rules/vscode_rules.md,sha256=fqn4aJO_bhftaCGkVoquruQHf3EaREQJQWHXq6a4FOk,6967
|
|
14
14
|
nia_mcp_server/assets/rules/windsurf_rules.md,sha256=PzU2as5gaiVsV6PAzg8T_-GR7VCyRQGMjAHcSzYF_ms,3354
|
|
15
|
-
nia_mcp_server-1.0.
|
|
16
|
-
nia_mcp_server-1.0.
|
|
17
|
-
nia_mcp_server-1.0.
|
|
18
|
-
nia_mcp_server-1.0.
|
|
19
|
-
nia_mcp_server-1.0.
|
|
15
|
+
nia_mcp_server-1.0.21.dist-info/METADATA,sha256=v0nxEs-TwVywd4bN4HbdCHBLI9AgZkq_kmt84-r8J2o,1324
|
|
16
|
+
nia_mcp_server-1.0.21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
17
|
+
nia_mcp_server-1.0.21.dist-info/entry_points.txt,sha256=V74FQEp48pfWxPCl7B9mihtqvIJNVjCSbRfCz4ww77I,64
|
|
18
|
+
nia_mcp_server-1.0.21.dist-info/licenses/LICENSE,sha256=IrdVKi3bsiB2MTLM26MltBRpwyNi-8P6Cy0EnmAN76A,1557
|
|
19
|
+
nia_mcp_server-1.0.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|