Skip to content

Commit 110cbb4

Browse files
committed
Remove agent names and version constraints in MCP server documentation
1 parent 2b64d0f commit 110cbb4

2 files changed

Lines changed: 64 additions & 14 deletions

File tree

docs/deploy/mcp-server-deploy.mdx

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ This guide focuses on deploying Model Context Protocol (MCP) servers for product
1515
<Step title="Install Dependencies">
1616
Make sure you have the required packages installed:
1717
```bash
18-
pip install "praisonaiagents[mcp]>=0.0.81"
18+
pip install "praisonaiagents[mcp]"
1919
```
2020

2121
For the multi-agent example with search capabilities:
2222
```bash
23-
pip install "praisonaiagents[mcp]>=0.0.81" duckduckgo-search
23+
pip install "praisonaiagents[mcp]" duckduckgo-search
2424
```
2525
</Step>
2626
<Step title="Create MCP Server Files">
@@ -30,12 +30,12 @@ This guide focuses on deploying Model Context Protocol (MCP) servers for product
3030
```python
3131
from praisonaiagents import Agent
3232

33-
agent = Agent(name="TweetAgent", instructions="Create a Tweet based on the topic provided")
33+
agent = Agent(instructions="Create a Tweet based on the topic provided")
3434
agent.launch(port=8080, host="0.0.0.0", protocol="mcp")
3535
```
3636

3737
**Multi-Agent MCP Server with Custom Tools**
38-
38+
3939
Create a file named `simple-mcp-multi-agents-server.py`:
4040
```python
4141
from praisonaiagents import Agent, Agents
@@ -52,10 +52,44 @@ This guide focuses on deploying Model Context Protocol (MCP) servers for product
5252
})
5353
return results
5454

55-
agent = Agent(name="SearchAgent", instructions="You Search the internet for information", tools=[internet_search_tool])
56-
agent2 = Agent(name="SummariseAgent", instructions="You Summarise the information")
55+
agent = Agent(instructions="You Search the internet for information", tools=[internet_search_tool])
56+
agent2 = Agent(instructions="You Summarise the information")
57+
58+
agents = Agents(agents=[agent, agent2])
59+
agents.launch(port=8080, host="0.0.0.0", protocol="mcp")
60+
```
61+
62+
**Simple Multi-Agent MCP Server**
63+
64+
Create a file named `simple-multi-agents-server.py`:
65+
```python
66+
from praisonaiagents import Agent, Agents
67+
68+
agent = Agent(instructions="You Search the internet for information")
69+
agent2 = Agent(instructions="You Summarise the information")
70+
71+
agents = Agents(agents=[agent, agent2])
72+
agents.launch(port=8080, host="0.0.0.0", protocol="mcp")
73+
```
74+
```python
75+
from praisonaiagents import Agent, Agents
76+
from duckduckgo_search import DDGS
77+
78+
def internet_search_tool(query: str):
79+
results = []
80+
ddgs = DDGS()
81+
for result in ddgs.text(keywords=query, max_results=5):
82+
results.append({
83+
"title": result.get("title", ""),
84+
"url": result.get("href", ""),
85+
"snippet": result.get("body", "")
86+
})
87+
return results
88+
89+
agent = Agent(instructions="You Search the internet for information", tools=[internet_search_tool])
90+
agent2 = Agent(instructions="You Summarise the information")
5791

58-
agents = Agents(name="MultiAgents", agents=[agent, agent2])
92+
agents = Agents(agents=[agent, agent2])
5993
agents.launch(port=8080, host="0.0.0.0", protocol="mcp")
6094
```
6195
</Step>
@@ -86,7 +120,7 @@ This guide focuses on deploying Model Context Protocol (MCP) servers for product
86120

87121
Create a `requirements.txt` file:
88122
```
89-
praisonaiagents[mcp]>=0.0.81
123+
praisonaiagents[mcp]
90124
duckduckgo-search # Only needed for the multi-agent example
91125
```
92126
</Step>

docs/mcp/mcp-server.mdx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Creating MCP Servers"
2+
title: "MCP Servers"
33
sidebarTitle: "MCP Servers"
44
description: "Learn how to create Model Context Protocol (MCP) servers with PraisonAI agents"
55
icon: "server"
@@ -25,7 +25,7 @@ The simplest way to create an MCP server is with a single agent. This approach i
2525
```python
2626
from praisonaiagents import Agent
2727

28-
agent = Agent(name="TweetAgent", instructions="Create a Tweet based on the topic provided")
28+
agent = Agent(instructions="Create a Tweet based on the topic provided")
2929
agent.launch(port=8080, protocol="mcp")
3030
```
3131
</Step>
@@ -45,7 +45,7 @@ For more complex scenarios, you can create an MCP server with multiple agents an
4545
<Steps>
4646
<Step title="Install Additional Dependencies">
4747
```bash
48-
pip install "praisonaiagents[mcp]>=0.0.81" duckduckgo-search
48+
pip install "praisonaiagents[mcp]" duckduckgo-search
4949
```
5050
</Step>
5151
<Step title="Create a Multi-Agent MCP Server">
@@ -65,10 +65,10 @@ For more complex scenarios, you can create an MCP server with multiple agents an
6565
})
6666
return results
6767

68-
agent = Agent(name="SearchAgent", instructions="You Search the internet for information", tools=[internet_search_tool])
69-
agent2 = Agent(name="SummariseAgent", instructions="You Summarise the information")
68+
agent = Agent(instructions="You Search the internet for information", tools=[internet_search_tool])
69+
agent2 = Agent(instructions="You Summarise the information")
7070

71-
agents = Agents(name="MultiAgents", agents=[agent, agent2])
71+
agents = Agents(agents=[agent, agent2])
7272
agents.launch(port=8080, protocol="mcp")
7373
```
7474
</Step>
@@ -81,6 +81,22 @@ For more complex scenarios, you can create an MCP server with multiple agents an
8181
</Step>
8282
</Steps>
8383

84+
## Multi-Agent MCP Server (Simple)
85+
86+
For scenarios where you need multiple agents to collaborate without custom tools, you can create a simpler multi-agent MCP server:
87+
88+
```python
89+
from praisonaiagents import Agent, Agents
90+
91+
agent = Agent(instructions="You Search the internet for information")
92+
agent2 = Agent(instructions="You Summarise the information")
93+
94+
agents = Agents(agents=[agent, agent2])
95+
agents.launch(port=8080, protocol="mcp")
96+
```
97+
98+
This approach is ideal for cases where you want agents with different specializations to work together using their built-in capabilities.
99+
84100
## Connecting to MCP Servers
85101

86102
You can connect to MCP servers using various clients:

0 commit comments

Comments
 (0)