Docs menu

Core Concepts

MCP

MCP is how Midas connects to tools that live outside the repository. Add a server, authenticate if it needs it, and its tools and prompts appear in the session.

Add a server

midas mcp add linear --url https://mcp.linear.app/mcp
midas mcp add local -- npx -y @acme/mcp-server
midas mcp auth linear
midas mcp list

A remote server is a URL. A local server is a command, with an optional working directory, environment, and timeout. midas mcp auth runs the OAuth flow for a remote server that needs one. midas mcp logout removes the stored credential.

Or write it in config

{
  "mcp": {
    "linear": {
      "type": "remote",
      "url": "https://mcp.linear.app/mcp",
      "oauth": true
    },
    "local": {
      "type": "local",
      "command": ["npx", "-y", "@acme/mcp-server"],
      "environment": { "ACME_TOKEN": "{env:ACME_TOKEN}" }
    }
  }
}

A remote entry can carry headers. A local entry can carry an environment and a timeout. Both can be disabled without deleting the entry, which is useful when a server is flaky.

What appears in the session

  • The server's tools are available to the agent, named by the server.
  • A prompt the server exposes becomes a slash command.
  • The session can turn a server off with /mcps without editing config.
  • MCP calls follow the same permission rules as the built-in tools.

Security

An MCP server acts with its own credentials. Adding one is a trust decision, the same as installing a plugin. Read what the server can do before you connect it to a repository with production access.

Use midas mcp debug <name> when a server will not connect. It shows the handshake and the tools the server reported.