manager
Class info¶
Classes¶
Name | Children | Inherits |
---|---|---|
MCPClient llmling_agent.mcp_server.client MCP client for communicating with MCP servers. |
||
MCPManager llmling_agent.mcp_server.manager Manages MCP server connections and tools. |
||
ResourceInfo llmling_agent.models.resources Information about an available resource. |
||
ResourceProvider llmling_agent.resource_providers.base Base class for resource providers. |
||
SSEMCPServer llmling_agent.models.mcp_server MCP server using Server-Sent Events transport. |
||
StdioMCPServer llmling_agent.models.mcp_server MCP server started via stdio. |
🛈 DocStrings¶
Tool management for LLMling agents.
MCPManager
¶
Bases: ResourceProvider
Manages MCP server connections and tools.
Source code in src/llmling_agent/mcp_server/manager.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
|
add_server_config
¶
add_server_config(server: MCPServerConfig | str)
Add a new MCP server to the manager.
Source code in src/llmling_agent/mcp_server/manager.py
73 74 75 76 |
|
cleanup
async
¶
cleanup()
Clean up all MCP connections.
Source code in src/llmling_agent/mcp_server/manager.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
|
get_tools
async
¶
Get all tools from all connected servers.
Source code in src/llmling_agent/mcp_server/manager.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
list_prompts
async
¶
list_prompts() -> list[StaticPrompt]
Get all available prompts from MCP servers.
Source code in src/llmling_agent/mcp_server/manager.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
list_resources
async
¶
list_resources() -> list[ResourceInfo]
Get all available resources from MCP servers.
Source code in src/llmling_agent/mcp_server/manager.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
setup_server
async
¶
setup_server(config: MCPServerConfig)
Set up a single MCP server connection.
Source code in src/llmling_agent/mcp_server/manager.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
convert_mcp_prompt
async
¶
convert_mcp_prompt(client: MCPClient, prompt: Prompt) -> StaticPrompt
Convert MCP prompt to StaticPrompt.
Source code in src/llmling_agent/mcp_server/manager.py
30 31 32 33 34 35 36 37 38 39 40 41 |
|
convert_mcp_resource
async
¶
convert_mcp_resource(resource: Resource) -> ResourceInfo
Convert MCP resource to ResourceInfo.
Source code in src/llmling_agent/mcp_server/manager.py
44 45 46 47 48 |
|