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_config.resources Information about an available resource. |
||
ResourceProvider llmling_agent.resource_providers.base Base class for resource providers. |
||
SSEMCPServerConfig llmling_agent_config.mcp_server MCP server using Server-Sent Events transport. |
|
|
StdioMCPServerConfig llmling_agent_config.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
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 201 202 203 204 205 206 207 208 |
|
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
77 78 79 80 81 82 83 84 |
|
cleanup
async
¶
cleanup()
Clean up all MCP connections.
Source code in src/llmling_agent/mcp_server/manager.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
|
get_tools
async
¶
Get all tools from all connected servers.
Source code in src/llmling_agent/mcp_server/manager.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
list_prompts
async
¶
list_prompts() -> list[StaticPrompt]
Get all available prompts from MCP servers.
Source code in src/llmling_agent/mcp_server/manager.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
|
list_resources
async
¶
list_resources() -> list[ResourceInfo]
Get all available resources from MCP servers.
Source code in src/llmling_agent/mcp_server/manager.py
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
|
setup_server
async
¶
setup_server(config: MCPServerConfig)
Set up a single MCP server connection.
Source code in src/llmling_agent/mcp_server/manager.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|
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
34 35 36 37 38 39 40 41 42 43 44 45 |
|
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
48 49 50 51 52 |
|