Skip to main content
Glama

connect_mcp_server

Starts an MCP server in a project sandbox and publishes its tools; use it when automatic detection fails or the server needs custom arguments or environment variables.

Instructions

Start an MCP server that lives inside a project's sandbox (stdio transport) and publish its tools as "__". Use it when the project is an MCP server that was not detected automatically or needs arguments or environment variables. Registering the same name again replaces the earlier registration. Environment values are stored unencrypted in the local registry file.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project": "<project>",
      "command": "<command>"
    },
    "name": "connect_mcp_server"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory (default /workspace/repo; relative paths resolve against it).
envNoEnvironment variables for the server, e.g. API keys.
nameNoName for this server within the project (default: the program name).
commandYesProgram and arguments, e.g. ["node", "build/index.js"] or ["mcp-server-filesystem", "/workspace/work"]. Not interpreted by a shell.
projectYesInstalled project: its slug, or its id such as "github:owner/name".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does well on several points: stdio transport, re-registration replacing the earlier entry, and the warning that env values are stored unencrypted. It omits lifecycle details such as whether the server process persists across sessions, what happens on startup failure, and how it relates to disconnect_mcp_server.

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

Conciseness5/5

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

Four sentences, each carrying distinct information: what it does, when to use it, replacement semantics, and a security caveat. The core action is front-loaded and nothing is redundant.

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

Completeness4/5

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

For a five-parameter tool with no annotations and no output schema, the description covers transport, naming, idempotency, and a security caveat. Remaining gaps are lifecycle and failure behavior, which are secondary but would help an agent decide whether to call disconnect_mcp_server afterward.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents all five parameters, establishing a baseline of 3. The description adds only marginal meaning beyond that, mainly the tool-naming convention and the unencrypted storage of env values, without clarifying command, cwd, or project semantics further.

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

Purpose5/5

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

States a specific verb and resource ('Start an MCP server that lives inside a project's sandbox') plus the observable effect ('publish its tools as "<slug>__<tool>"'). This clearly separates it from discovery-oriented siblings like discover_tools and find_project_tools.

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

Usage Guidelines4/5

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

Gives an explicit selection condition: use it when the project is an MCP server that was not detected automatically or needs arguments or environment variables. That implicitly routes the agent away from automatic detection, though it does not name the sibling tool that performs detection.

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