mcp-server-milvus 0.1.1.dev0__tar.gz → 0.1.1.dev2__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 mcp-server-milvus might be problematic. Click here for more details.

@@ -0,0 +1,12 @@
1
+ {
2
+ "mcpServers": {
3
+ "milvus": {
4
+ "command": "uvx",
5
+ "args": [
6
+ "mcp-server-milvus@latest",
7
+ "--milvus-uri",
8
+ "http://127.0.0.1:19530"
9
+ ]
10
+ }
11
+ }
12
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-server-milvus
3
- Version: 0.1.1.dev0
3
+ Version: 0.1.1.dev2
4
4
  Summary: MCP server for Milvus
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: click>=8.0.0
@@ -72,12 +72,9 @@ This MCP server can be used with various LLM applications that support the Model
72
72
  {
73
73
  "mcpServers": {
74
74
  "milvus": {
75
- "command": "/PATH/TO/uv",
76
- "args": [
77
- "--directory",
78
- "/path/to/mcp-server-milvus/src/mcp_server_milvus",
79
- "run",
80
- "server.py",
75
+ "command": "uvx",
76
+ "args": [
77
+ "mcp-server-milvus@latest",
81
78
  "--milvus-uri",
82
79
  "http://localhost:19530"
83
80
  ]
@@ -60,12 +60,9 @@ This MCP server can be used with various LLM applications that support the Model
60
60
  {
61
61
  "mcpServers": {
62
62
  "milvus": {
63
- "command": "/PATH/TO/uv",
64
- "args": [
65
- "--directory",
66
- "/path/to/mcp-server-milvus/src/mcp_server_milvus",
67
- "run",
68
- "server.py",
63
+ "command": "uvx",
64
+ "args": [
65
+ "mcp-server-milvus@latest",
69
66
  "--milvus-uri",
70
67
  "http://localhost:19530"
71
68
  ]
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mcp-server-milvus"
3
- version = "0.1.1.dev0"
3
+ version = "0.1.1.dev2"
4
4
  description = "MCP server for Milvus"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -13,7 +13,7 @@ dependencies = [
13
13
  ]
14
14
 
15
15
  [project.scripts]
16
- mcp-server-milvus = "mcp_server_milvus.server:main"
16
+ mcp-server-milvus = "mcp_server_milvus:main"
17
17
 
18
18
  [build-system]
19
19
  requires = ["hatchling"]
@@ -0,0 +1,4 @@
1
+ from mcp_server_milvus.server import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
@@ -139,7 +139,7 @@ class MilvusConnector:
139
139
  output_fields: Fields to return in results
140
140
  metric_type: Distance metric (COSINE, L2, IP)
141
141
  """
142
- raise NotImplementedError('This method is not yet supported.')
142
+ raise NotImplementedError('This method is not yet supported.')
143
143
 
144
144
  async def create_collection(
145
145
  self,
@@ -426,7 +426,7 @@ class MilvusConnector:
426
426
  return self.client.get_load_state(collection_name)
427
427
  except Exception as e:
428
428
  raise ValueError(f"Failed to get loading progress: {str(e)}")
429
-
429
+
430
430
  async def list_databases(self) -> list[str]:
431
431
  """List all databases in the Milvus instance."""
432
432
  try:
@@ -436,15 +436,15 @@ class MilvusConnector:
436
436
 
437
437
  async def use_database(self, db_name: str) -> bool:
438
438
  """Switch to a different database.
439
-
439
+
440
440
  Args:
441
441
  db_name: Name of the database to use
442
442
  """
443
443
  try:
444
444
  # Create a new client with the specified database
445
445
  self.client = MilvusClient(
446
- uri=self.uri,
447
- token=self.token,
446
+ uri=self.uri,
447
+ token=self.token,
448
448
  db_name=db_name
449
449
  )
450
450
  return True
@@ -701,13 +701,13 @@ async def milvus_list_databases(ctx: Context = None) -> str:
701
701
  async def milvus_use_database(db_name: str, ctx: Context = None) -> str:
702
702
  """
703
703
  Switch to a different database.
704
-
704
+
705
705
  Args:
706
706
  db_name: Name of the database to use
707
707
  """
708
708
  connector = ctx.request_context.lifespan_context.connector
709
709
  success = await connector.use_database(db_name)
710
-
710
+
711
711
  return f"Switched to database '{db_name}' successfully"
712
712
 
713
713
  def parse_arguments():
@@ -720,8 +720,7 @@ def parse_arguments():
720
720
  default="default", help="Milvus database name")
721
721
  return parser.parse_args()
722
722
 
723
-
724
- if __name__ == "__main__":
723
+ def main():
725
724
  load_dotenv()
726
725
  args = parse_arguments()
727
726
  mcp.config = {
@@ -731,3 +730,6 @@ if __name__ == "__main__":
731
730
  }
732
731
 
733
732
  mcp.run()
733
+
734
+ if __name__ == "__main__":
735
+ main()
@@ -1,15 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "milvus": {
4
- "command": "/path/to/uv",
5
- "args": [
6
- "--directory",
7
- "/path/to/mcp-server-milvus/src/mcp_server_milvus",
8
- "run",
9
- "server.py",
10
- "--milvus-uri",
11
- "http://127.0.0.1:19530"
12
- ]
13
- }
14
- }
15
- }