nia-mcp-server 1.0.23__py3-none-any.whl → 1.0.42__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 +511 -99
- nia_mcp_server/cli.py +31 -4
- nia_mcp_server/profiles.py +20 -4
- nia_mcp_server/project_init.py +1 -1
- nia_mcp_server/rule_transformer.py +2 -2
- nia_mcp_server/server.py +2706 -2361
- nia_mcp_server/setup.py +593 -79
- {nia_mcp_server-1.0.23.dist-info → nia_mcp_server-1.0.42.dist-info}/METADATA +7 -4
- nia_mcp_server-1.0.42.dist-info/RECORD +19 -0
- {nia_mcp_server-1.0.23.dist-info → nia_mcp_server-1.0.42.dist-info}/WHEEL +1 -1
- nia_mcp_server-1.0.23.dist-info/RECORD +0 -19
- {nia_mcp_server-1.0.23.dist-info → nia_mcp_server-1.0.42.dist-info}/entry_points.txt +0 -0
- {nia_mcp_server-1.0.23.dist-info → nia_mcp_server-1.0.42.dist-info}/licenses/LICENSE +0 -0
nia_mcp_server/cli.py
CHANGED
|
@@ -4,7 +4,7 @@ CLI interface for NIA MCP Server
|
|
|
4
4
|
import sys
|
|
5
5
|
import argparse
|
|
6
6
|
from typing import Optional
|
|
7
|
-
from .setup import setup_mcp_config
|
|
7
|
+
from .setup import setup_mcp_config, SUPPORTED_IDES, REMOTE_SUPPORTED_IDES
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def validate_api_key(api_key: str) -> bool:
|
|
@@ -40,10 +40,21 @@ def main():
|
|
|
40
40
|
)
|
|
41
41
|
setup_parser.add_argument(
|
|
42
42
|
"--ide",
|
|
43
|
-
choices=
|
|
43
|
+
choices=SUPPORTED_IDES,
|
|
44
44
|
default="cursor",
|
|
45
45
|
help="IDE to configure (default: cursor)"
|
|
46
46
|
)
|
|
47
|
+
setup_parser.add_argument(
|
|
48
|
+
"--remote",
|
|
49
|
+
action="store_true",
|
|
50
|
+
help="Use remote MCP server (no local installation, connects via HTTP)"
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
# List command
|
|
54
|
+
list_parser = subparsers.add_parser(
|
|
55
|
+
"list-ides",
|
|
56
|
+
help="List all supported IDEs and their capabilities"
|
|
57
|
+
)
|
|
47
58
|
|
|
48
59
|
# Parse arguments
|
|
49
60
|
args = parser.parse_args()
|
|
@@ -57,13 +68,29 @@ def main():
|
|
|
57
68
|
sys.exit(1)
|
|
58
69
|
|
|
59
70
|
# Run setup
|
|
60
|
-
success = setup_mcp_config(args.api_key, args.ide)
|
|
71
|
+
success = setup_mcp_config(args.api_key, args.ide, args.remote)
|
|
61
72
|
sys.exit(0 if success else 1)
|
|
62
73
|
|
|
74
|
+
elif args.command == "list-ides":
|
|
75
|
+
print("\n🖥️ Supported IDEs:\n")
|
|
76
|
+
print("Remote + Local (both modes supported):")
|
|
77
|
+
for ide in sorted(SUPPORTED_IDES):
|
|
78
|
+
if ide in REMOTE_SUPPORTED_IDES:
|
|
79
|
+
print(f" ✅ {ide}")
|
|
80
|
+
|
|
81
|
+
print("\nLocal only:")
|
|
82
|
+
for ide in sorted(SUPPORTED_IDES):
|
|
83
|
+
if ide not in REMOTE_SUPPORTED_IDES:
|
|
84
|
+
print(f" 📦 {ide}")
|
|
85
|
+
|
|
86
|
+
print("\n💡 Use --remote for cloud-hosted MCP (no local deps)")
|
|
87
|
+
print(" Use default (local) for self-hosted MCP via pipx\n")
|
|
88
|
+
sys.exit(0)
|
|
89
|
+
|
|
63
90
|
# If no command specified, show help
|
|
64
91
|
parser.print_help()
|
|
65
92
|
sys.exit(1)
|
|
66
93
|
|
|
67
94
|
|
|
68
95
|
if __name__ == "__main__":
|
|
69
|
-
main()
|
|
96
|
+
main()
|
nia_mcp_server/profiles.py
CHANGED
|
@@ -109,6 +109,22 @@ PROFILE_CONFIGS: Dict[str, Dict[str, Any]] = {
|
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
|
|
112
|
+
"antigravity": {
|
|
113
|
+
"name": "Google Antigravity",
|
|
114
|
+
"target_dir": ".gemini/antigravity",
|
|
115
|
+
"file_extension": ".md",
|
|
116
|
+
"file_map": {
|
|
117
|
+
"nia_rules.md": "nia_antigravity_guide.md"
|
|
118
|
+
},
|
|
119
|
+
"mcp_config": True,
|
|
120
|
+
"format": "markdown",
|
|
121
|
+
"features": ["ai_assistant", "code_generation", "multi_modal"],
|
|
122
|
+
"global_replacements": {
|
|
123
|
+
"# Nia": "# Nia for Google Antigravity",
|
|
124
|
+
"{{IDE}}": "Google Antigravity"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
|
|
112
128
|
"zed": {
|
|
113
129
|
"name": "Zed",
|
|
114
130
|
"target_dir": ".zed",
|
|
@@ -187,9 +203,9 @@ TEMPLATE_CONFIGS = {
|
|
|
187
203
|
"problemMatcher": []
|
|
188
204
|
},
|
|
189
205
|
{
|
|
190
|
-
"label": "Nia: Search
|
|
206
|
+
"label": "Nia: Search",
|
|
191
207
|
"type": "shell",
|
|
192
|
-
"command": "echo 'Run:
|
|
208
|
+
"command": "echo 'Run: search \\"${input:searchQuery}\\"'",
|
|
193
209
|
"problemMatcher": []
|
|
194
210
|
},
|
|
195
211
|
{
|
|
@@ -223,8 +239,8 @@ TEMPLATE_CONFIGS = {
|
|
|
223
239
|
},
|
|
224
240
|
"Nia Search": {
|
|
225
241
|
"prefix": "nia-search",
|
|
226
|
-
"body": ["
|
|
227
|
-
"description": "Search indexed repositories"
|
|
242
|
+
"body": ["search \\"${1:query}\\""],
|
|
243
|
+
"description": "Search indexed repositories and docs"
|
|
228
244
|
},
|
|
229
245
|
"Nia Web Search": {
|
|
230
246
|
"prefix": "nia-web",
|
nia_mcp_server/project_init.py
CHANGED
|
@@ -166,7 +166,7 @@ class NIAProjectInitializer:
|
|
|
166
166
|
# General steps
|
|
167
167
|
steps.extend([
|
|
168
168
|
"Explore available commands with list_repositories",
|
|
169
|
-
"Search
|
|
169
|
+
"Search across code and docs with search",
|
|
170
170
|
"Find new libraries with nia_web_search"
|
|
171
171
|
])
|
|
172
172
|
|
|
@@ -266,7 +266,7 @@ def enhance_mcp_code_blocks(content: str) -> str:
|
|
|
266
266
|
code = match.group(2)
|
|
267
267
|
|
|
268
268
|
# If it's a NIA command, add annotation
|
|
269
|
-
if any(cmd
|
|
269
|
+
if any(re.search(rf'\b{re.escape(cmd)}\b', code, re.IGNORECASE) for cmd in ["index_repository", "search", "list_repositories"]):
|
|
270
270
|
return f'```{lang}\n# MCP Command - Run this in your AI assistant\n{code}\n```'
|
|
271
271
|
return match.group(0)
|
|
272
272
|
|
|
@@ -327,7 +327,7 @@ Quick aliases for your terminal:
|
|
|
327
327
|
```bash
|
|
328
328
|
# Add to your shell profile (.bashrc, .zshrc, etc.)
|
|
329
329
|
alias nia-index='echo "index_repository"'
|
|
330
|
-
alias nia-search='echo "
|
|
330
|
+
alias nia-search='echo "search"'
|
|
331
331
|
alias nia-list='echo "list_repositories"'
|
|
332
332
|
```
|
|
333
333
|
|