mcp-use 0.0.5__tar.gz → 0.0.6__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-use might be problematic. Click here for more details.

Files changed (39) hide show
  1. {mcp_use-0.0.5 → mcp_use-0.0.6}/PKG-INFO +10 -49
  2. {mcp_use-0.0.5 → mcp_use-0.0.6}/README.md +9 -48
  3. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/__init__.py +1 -1
  4. mcp_use-0.0.6/mcp_use/agents/prompts/default.py +22 -0
  5. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/config.py +0 -34
  6. {mcp_use-0.0.5 → mcp_use-0.0.6}/pyproject.toml +1 -1
  7. mcp_use-0.0.6/static/mcpusegrass.png +0 -0
  8. mcp_use-0.0.5/mcp_use/agents/prompts/default.py +0 -11
  9. mcp_use-0.0.5/static/ghibli.png +0 -0
  10. {mcp_use-0.0.5 → mcp_use-0.0.6}/.github/workflows/publish.yml +0 -0
  11. {mcp_use-0.0.5 → mcp_use-0.0.6}/.github/workflows/tests.yml +0 -0
  12. {mcp_use-0.0.5 → mcp_use-0.0.6}/.gitignore +0 -0
  13. {mcp_use-0.0.5 → mcp_use-0.0.6}/.pre-commit-config.yaml +0 -0
  14. {mcp_use-0.0.5 → mcp_use-0.0.6}/LICENSE +0 -0
  15. {mcp_use-0.0.5 → mcp_use-0.0.6}/examples/airbnb_mcp.json +0 -0
  16. {mcp_use-0.0.5 → mcp_use-0.0.6}/examples/airbnb_use.py +0 -0
  17. {mcp_use-0.0.5 → mcp_use-0.0.6}/examples/blender_use.py +0 -0
  18. {mcp_use-0.0.5 → mcp_use-0.0.6}/examples/browser_mcp.json +0 -0
  19. {mcp_use-0.0.5 → mcp_use-0.0.6}/examples/browser_use.py +0 -0
  20. {mcp_use-0.0.5 → mcp_use-0.0.6}/examples/chat_example.py +0 -0
  21. {mcp_use-0.0.5 → mcp_use-0.0.6}/examples/filesystem_use.py +0 -0
  22. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/agents/__init__.py +0 -0
  23. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/agents/base.py +0 -0
  24. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/agents/langchain_agent.py +0 -0
  25. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/agents/mcpagent.py +0 -0
  26. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/client.py +0 -0
  27. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/connectors/__init__.py +0 -0
  28. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/connectors/base.py +0 -0
  29. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/connectors/http.py +0 -0
  30. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/connectors/stdio.py +0 -0
  31. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/connectors/websocket.py +0 -0
  32. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/logging.py +0 -0
  33. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/session.py +0 -0
  34. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/task_managers/__init__.py +0 -0
  35. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/task_managers/base.py +0 -0
  36. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/task_managers/http.py +0 -0
  37. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/task_managers/stdio.py +0 -0
  38. {mcp_use-0.0.5 → mcp_use-0.0.6}/mcp_use/task_managers/websocket.py +0 -0
  39. {mcp_use-0.0.5 → mcp_use-0.0.6}/tests/unit/test_placeholder.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-use
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: MCP Library for LLMs
5
5
  Author-email: Pietro Zullo <pietro.zullo@gmail.com>
6
6
  License: MIT
@@ -38,7 +38,7 @@ Requires-Dist: openai>=1.10.0; extra == 'openai'
38
38
  Description-Content-Type: text/markdown
39
39
 
40
40
  <picture>
41
- <img alt="" src="./static/ghibli.png" width="full">
41
+ <img alt="" src="./static/mcpusegrass.png" width="full">
42
42
  </picture>
43
43
 
44
44
  <h1 align="center">Open Source MCP CLient Library </h1>
@@ -285,51 +285,12 @@ if __name__ == "__main__":
285
285
  asyncio.run(main())
286
286
  ```
287
287
 
288
- # MCPClient for Managing Multiple Servers
289
-
290
- The `MCPClient` class provides a higher-level abstraction for managing multiple MCP servers from a single client:
291
-
292
- ```python
293
- import asyncio
294
- from langchain_anthropic import ChatAnthropic
295
- from mcp_use import MCPAgent, MCPClient
296
-
297
- async def main():
298
- # Create a client from a config file
299
- client = MCPClient.from_config_file("mcp-config.json")
300
-
301
- # Or initialize with a config file path
302
- # client = MCPClient("mcp-config.json")
303
-
304
- # Or programmatically add servers
305
- client.add_server(
306
- "local-ws",
307
- {
308
- "command": "npx",
309
- "args": ["@playwright/mcp@latest", "headless"]
310
- }
311
- )
312
-
313
- # Create an LLM
314
- llm = ChatAnthropic(model="claude-3-5-sonnet-20240620")
315
-
316
- # Create an agent using the client
317
- agent = MCPAgent(
318
- llm=llm,
319
- client=client,
320
- server_name="playwright", # Optional, uses first server if not specified
321
- max_steps=30
322
- )
323
-
324
- # Run a query
325
- result = await agent.run("Your query here")
326
-
327
- # Close all sessions
328
- await client.close_all_sessions()
329
-
330
- if __name__ == "__main__":
331
- asyncio.run(main())
332
- ```
288
+ ## Roadmap
289
+ <ul>
290
+ <li>[ ] Multiple Servers at once </li>
291
+ <li>[ ] Test remote connectors (http, ws)</li>
292
+ <li>[ ] ... </li>
293
+ </ul>
333
294
 
334
295
  ## Contributing
335
296
 
@@ -346,10 +307,10 @@ We love contributions! Feel free to open issues for bugs or feature requests.
346
307
  If you use MCP-Use in your research or project, please cite:
347
308
 
348
309
  ```bibtex
349
- @software{mcp_use2024,
310
+ @software{mcp_use2025,
350
311
  author = {Zullo, Pietro},
351
312
  title = {MCP-Use: MCP Library for Python},
352
- year = {2024},
313
+ year = {2025},
353
314
  publisher = {GitHub},
354
315
  url = {https://github.com/pietrozullo/mcp-use}
355
316
  }
@@ -1,5 +1,5 @@
1
1
  <picture>
2
- <img alt="" src="./static/ghibli.png" width="full">
2
+ <img alt="" src="./static/mcpusegrass.png" width="full">
3
3
  </picture>
4
4
 
5
5
  <h1 align="center">Open Source MCP CLient Library </h1>
@@ -246,51 +246,12 @@ if __name__ == "__main__":
246
246
  asyncio.run(main())
247
247
  ```
248
248
 
249
- # MCPClient for Managing Multiple Servers
250
-
251
- The `MCPClient` class provides a higher-level abstraction for managing multiple MCP servers from a single client:
252
-
253
- ```python
254
- import asyncio
255
- from langchain_anthropic import ChatAnthropic
256
- from mcp_use import MCPAgent, MCPClient
257
-
258
- async def main():
259
- # Create a client from a config file
260
- client = MCPClient.from_config_file("mcp-config.json")
261
-
262
- # Or initialize with a config file path
263
- # client = MCPClient("mcp-config.json")
264
-
265
- # Or programmatically add servers
266
- client.add_server(
267
- "local-ws",
268
- {
269
- "command": "npx",
270
- "args": ["@playwright/mcp@latest", "headless"]
271
- }
272
- )
273
-
274
- # Create an LLM
275
- llm = ChatAnthropic(model="claude-3-5-sonnet-20240620")
276
-
277
- # Create an agent using the client
278
- agent = MCPAgent(
279
- llm=llm,
280
- client=client,
281
- server_name="playwright", # Optional, uses first server if not specified
282
- max_steps=30
283
- )
284
-
285
- # Run a query
286
- result = await agent.run("Your query here")
287
-
288
- # Close all sessions
289
- await client.close_all_sessions()
290
-
291
- if __name__ == "__main__":
292
- asyncio.run(main())
293
- ```
249
+ ## Roadmap
250
+ <ul>
251
+ <li>[ ] Multiple Servers at once </li>
252
+ <li>[ ] Test remote connectors (http, ws)</li>
253
+ <li>[ ] ... </li>
254
+ </ul>
294
255
 
295
256
  ## Contributing
296
257
 
@@ -307,10 +268,10 @@ We love contributions! Feel free to open issues for bugs or feature requests.
307
268
  If you use MCP-Use in your research or project, please cite:
308
269
 
309
270
  ```bibtex
310
- @software{mcp_use2024,
271
+ @software{mcp_use2025,
311
272
  author = {Zullo, Pietro},
312
273
  title = {MCP-Use: MCP Library for Python},
313
- year = {2024},
274
+ year = {2025},
314
275
  publisher = {GitHub},
315
276
  url = {https://github.com/pietrozullo/mcp-use}
316
277
  }
@@ -9,7 +9,7 @@ from importlib.metadata import version
9
9
 
10
10
  from .agents.mcpagent import MCPAgent
11
11
  from .client import MCPClient
12
- from .config import create_session_from_config, load_config_file
12
+ from .config import load_config_file
13
13
  from .connectors import BaseConnector, HttpConnector, StdioConnector, WebSocketConnector
14
14
  from .logging import logger
15
15
  from .session import MCPSession
@@ -0,0 +1,22 @@
1
+ DEFAULT_SYSTEM_PROMPT_TEMPLATE = """You are an assistant with access to these tools:
2
+
3
+ {tool_descriptions}
4
+
5
+ Proactively use these tools to:
6
+ - Retrieve and analyze information relevant to user requests
7
+ - Process and transform data in various formats
8
+ - Perform computations and generate insights
9
+ - Execute multi-step workflows by combining tools as needed
10
+ - Interact with external systems when authorized
11
+
12
+ When appropriate, use available tools rather than relying on your built-in knowledge alone.
13
+ Your tools enable you to perform tasks that would otherwise be beyond your capabilities.
14
+
15
+ For optimal assistance:
16
+ 1. Identify when a tool can help address the user's request
17
+ 2. Select the most appropriate tool(s) for the task
18
+ 3. Apply tools in the correct sequence when multiple tools are needed
19
+ 4. Clearly communicate your process and findings
20
+
21
+ Remember that you have real capabilities through your tools - use them confidently when needed.
22
+ """
@@ -8,7 +8,6 @@ import json
8
8
  from typing import Any
9
9
 
10
10
  from .connectors import BaseConnector, HttpConnector, StdioConnector, WebSocketConnector
11
- from .session import MCPSession
12
11
 
13
12
 
14
13
  def load_config_file(filepath: str) -> dict[str, Any]:
@@ -58,36 +57,3 @@ def create_connector_from_config(server_config: dict[str, Any]) -> BaseConnector
58
57
  )
59
58
 
60
59
  raise ValueError("Cannot determine connector type from config")
61
-
62
-
63
- def create_session_from_config(
64
- filepath: str,
65
- server_name: str | None = None,
66
- ) -> MCPSession:
67
- """Create an MCPSession from a configuration file.
68
-
69
- Args:
70
- filepath: Path to the configuration file
71
- server_name: Name of the server to use from config, uses first if None
72
-
73
- Returns:
74
- Configured MCPSession instance
75
- """
76
- config = load_config_file(filepath)
77
-
78
- # Get server config
79
- servers = config.get("mcpServers", {})
80
- if not servers:
81
- raise ValueError("No MCP servers defined in config")
82
-
83
- # If server_name not specified, use the first one
84
- if not server_name:
85
- server_name = next(iter(servers.keys()))
86
-
87
- if server_name not in servers:
88
- raise ValueError(f"Server '{server_name}' not found in config")
89
-
90
- server_config = servers[server_name]
91
- connector = create_connector_from_config(server_config)
92
-
93
- return MCPSession(connector)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mcp-use"
3
- version = "0.0.5"
3
+ version = "0.0.6"
4
4
  description = "MCP Library for LLMs"
5
5
  authors = [
6
6
  {name = "Pietro Zullo", email = "pietro.zullo@gmail.com"}
Binary file
@@ -1,11 +0,0 @@
1
- DEFAULT_SYSTEM_PROMPT_TEMPLATE = """You are an assistant with access to these tools:
2
-
3
- {tool_descriptions}
4
-
5
- Proactively use these tools to:
6
- - Find real-time information (weather, news, prices)
7
- - Perform web searches and extract relevant data
8
- - Execute multi-step tasks by combining tools
9
-
10
- You CAN access current information using your tools. Never claim you lack access to real-time data.
11
- """
Binary file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes