mcp_server
Class info¶
Classes¶
Name | Children | Inherits |
---|---|---|
MCPServerBase llmling_agent.models.mcp_server Base model for MCP server configuration. |
||
PoolServerConfig llmling_agent.models.mcp_server Configuration for pool-based MCP server. |
||
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¶
MCPServerBase
¶
Bases: BaseModel
Base model for MCP server configuration.
Source code in src/llmling_agent/models/mcp_server.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
enabled
class-attribute
instance-attribute
¶
enabled: bool = True
Whether this server is currently enabled.
environment
class-attribute
instance-attribute
¶
Environment variables to pass to the server process.
name
class-attribute
instance-attribute
¶
name: str | None = None
Optional name for referencing the server.
get_env_vars
¶
Get environment variables for the server process.
Source code in src/llmling_agent/models/mcp_server.py
26 27 28 29 30 31 32 |
|
PoolServerConfig
¶
Bases: BaseModel
Configuration for pool-based MCP server.
Source code in src/llmling_agent/models/mcp_server.py
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 |
|
cors_origins
class-attribute
instance-attribute
¶
Allowed CORS origins (SSE only).
enabled
class-attribute
instance-attribute
¶
enabled: bool = False
Whether this server is currently enabled.
host
class-attribute
instance-attribute
¶
host: str = 'localhost'
Host to bind server to (SSE only).
serve_nodes
class-attribute
instance-attribute
¶
Which nodes to expose as tools: - True: All nodes - False: No nodes - list[str]: Specific node names
serve_prompts
class-attribute
instance-attribute
¶
Which prompts to expose: - True: All prompts from manifest - False: No prompts - list[str]: Specific prompt names
transport
class-attribute
instance-attribute
¶
transport: Literal['stdio', 'sse'] = 'stdio'
Transport type to use.
zed_mode
class-attribute
instance-attribute
¶
zed_mode: bool = False
Enable Zed editor compatibility mode.
should_serve_node
¶
Check if a node should be exposed.
Source code in src/llmling_agent/models/mcp_server.py
112 113 114 115 116 117 118 119 120 121 122 |
|
should_serve_prompt
¶
Check if a prompt should be exposed.
Source code in src/llmling_agent/models/mcp_server.py
124 125 126 127 128 129 130 131 132 133 134 |
|
SSEMCPServer
¶
Bases: MCPServerBase
MCP server using Server-Sent Events transport.
Connects to a server over HTTP with SSE for real-time communication.
Source code in src/llmling_agent/models/mcp_server.py
57 58 59 60 61 62 63 64 65 66 67 |
|
StdioMCPServer
¶
Bases: MCPServerBase
MCP server started via stdio.
Uses subprocess communication through standard input/output streams.
Source code in src/llmling_agent/models/mcp_server.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
args
class-attribute
instance-attribute
¶
Command arguments (e.g. ["run", "some-server", "--debug"]).
type
class-attribute
instance-attribute
¶
type: Literal['stdio'] = Field('stdio', init=False)
Stdio server coniguration.
from_string
classmethod
¶
from_string(command: str) -> StdioMCPServer
Create a MCP server from a command string.
Source code in src/llmling_agent/models/mcp_server.py
50 51 52 53 54 |
|