Skip to main content
Glama
moimran

EVE-NG MCP Server

by moimran

connect_eveng_server

Establish a connection to an EVE-NG server for network emulation management by providing authentication credentials to enable subsequent operations.

Instructions

    Connect to EVE-NG server and authenticate.
    
    This tool establishes a connection to the EVE-NG server using the provided
    credentials. The connection will be maintained for subsequent operations.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argumentsYes

Implementation Reference

  • The core handler function for the 'connect_eveng_server' tool. It updates the EVENG client configuration with provided arguments, connects to the server, retrieves status, and returns success/error messages via TextContent.
    async def connect_eveng_server(arguments: ConnectServerArgs) -> list[TextContent]:
        """
        Connect to EVE-NG server and authenticate.
        
        This tool establishes a connection to the EVE-NG server using the provided
        credentials. The connection will be maintained for subsequent operations.
        """
        try:
            logger.info(f"Attempting to connect to EVE-NG server at {arguments.host}")
            
            # Update client configuration
            config = eveng_client.config
            config.eveng.host = arguments.host
            config.eveng.username = arguments.username
            config.eveng.password = arguments.password
            config.eveng.port = arguments.port
            config.eveng.protocol = arguments.protocol
            
            # Connect to server
            await eveng_client.connect()
            
            # Get server status for confirmation
            status = await eveng_client.get_server_status()
            
            result = {
                "status": "connected",
                "server": f"{arguments.protocol}://{arguments.host}:{arguments.port}",
                "username": arguments.username,
                "server_info": status
            }
            
            logger.info(f"Successfully connected to EVE-NG server at {arguments.host}")
            
            return [TextContent(
                type="text",
                text=f"Successfully connected to EVE-NG server!\n\n"
                     f"Server: {arguments.protocol}://{arguments.host}:{arguments.port}\n"
                     f"Username: {arguments.username}\n"
                     f"Server Version: {status.get('version', 'Unknown')}\n"
                     f"Status: {status.get('status', 'Unknown')}"
            )]
            
        except EVENGAuthenticationError as e:
            logger.error(f"Authentication failed: {e}")
            return [TextContent(
                type="text",
                text=f"Authentication failed: {str(e)}\n\n"
                     f"Please check your username and password and try again."
            )]
            
        except EVENGConnectionError as e:
            logger.error(f"Connection failed: {e}")
            return [TextContent(
                type="text",
                text=f"Connection failed: {str(e)}\n\n"
                     f"Please check the server address and network connectivity."
            )]
            
        except Exception as e:
            logger.error(f"Unexpected error: {e}")
            return [TextContent(
                type="text",
                text=f"Unexpected error occurred: {str(e)}\n\n"
                     f"Please check your configuration and try again."
            )]
  • Pydantic model defining the input schema for the connect_eveng_server tool, specifying fields for host, username, password, port, and protocol with descriptions and defaults.
    class ConnectServerArgs(BaseModel):
        """Arguments for connect_eveng_server tool."""
        host: str = Field(description="EVE-NG server hostname or IP address")
        username: str = Field(description="Username for authentication")
        password: str = Field(description="Password for authentication")
        port: int = Field(default=80, description="Server port (default: 80)")
        protocol: str = Field(default="http", description="Protocol (http/https, default: http)")
  • The registration function for connection tools, where the @mcp.tool() decorator is applied to define and register the connect_eveng_server handler.
    def register_connection_tools(mcp: "FastMCP", eveng_client: "EVENGClientWrapper") -> None:
        """Register connection management tools."""
        
        @mcp.tool()
  • Top-level call to register_tools in the main server class, which chains to registering the connect_eveng_server tool.
    # Register tools
    register_tools(self.mcp, self.eveng_client)
  • Intermediate registration call within tools/__init__.py's register_tools function, specifically invoking the connection tools registration.
    # Connection management tools
    register_connection_tools(mcp, eveng_client)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions authentication and that the connection is maintained, but doesn't disclose critical behavioral traits: what happens on authentication failure, whether credentials are stored/encrypted, session timeout details, rate limits, or error handling. For a security-sensitive authentication tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two short paragraphs. The first sentence states the purpose clearly, and the second adds useful context about connection persistence. There's no unnecessary fluff, and it's front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (authentication/connection tool with security implications), no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It doesn't cover parameter meanings, error conditions, return values, or security considerations. For this context, it should provide more guidance about authentication behavior and parameter usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning the schema provides no parameter descriptions. The tool description mentions 'credentials' generically but doesn't explain any of the 5 parameters (host, username, password, port, protocol) or their semantics. It fails to compensate for the complete lack of schema documentation, leaving parameters undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Connect to EVE-NG server and authenticate' and 'establishes a connection to the EVE-NG server using the provided credentials.' It specifies the verb (connect/authenticate) and resource (EVE-NG server), but doesn't explicitly differentiate from sibling tools like 'test_connection' or 'disconnect_eveng_server' beyond the obvious connection vs. disconnection distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance: it mentions the connection 'will be maintained for subsequent operations,' implying this should be used before other operations. However, it doesn't specify when to use this versus alternatives like 'test_connection' (which might check connectivity without authentication) or clarify prerequisites. No explicit when-not-to-use or comparison with siblings is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/moimran/eveng-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server