Wiki / Setting Up MCP Servers

Setting Up MCP Servers

Through the Model Context Protocol (MCP), Apis AI connects external tools and data sources – from local file system servers to hosted APIs. They are managed in the Settings, then Extensions tab.

For Users Do you just want to know what MCPs are and how to use them in everyday life? Then start with Understanding & Using MCPs. This page here is the technical reference for setup.

What Is MCP?

MCP is an open standard through which an LLM can discover and call a server's tools. Apis AI uses the official Kotlin SDK and supports both local processes and remote HTTP servers. The AI calls MCP tools within its normal tool loop – until the round limit is reached.

Local (stdio) vs. Remote (HTTP)

TypeBehavior
Local (stdio)Apis AI starts a local process and communicates via stdin/stdout. Suitable for servers running on your machine.
Remote (HTTP)Connects to an HTTP URL. Suitable for hosted MCP servers; optionally with headers and OAuth.

Adding a Server

  1. Create a server – in the Extensions tab under MCP servers, click Add MCP server.
  2. Choose a type – Local (stdio) or Remote (HTTP).
  3. Fill in the fields – depending on the type (see below).
  4. Save & connect – the app connects the server and shows the number of tools found.

Fields – Local (stdio)

FieldMeaning
CommandThe program to execute (e.g. npx, python, uvx). A leading ~, $HOME or ${HOME} is replaced with your home directory.
ArgumentsSpace-separated arguments (e.g. -y @modelcontextprotocol/server-filesystem ~/Documents). Split at spaces only – no shell: quotes, * and | are passed on literally, and a leading ~ / $HOME is expanded per argument.
Environment variablesKey=Value, one per line – e.g. for API keys.
How the command is found In Kommando (Command) you can enter a name such as npx or a full path such as /usr/local/bin/uvx. A name is searched in the app's PATH and in the tool directories that a program started from the desktop does not have in its PATH: ~/.local/bin (uv/uvx, pipx), ~/.bun/bin, ~/.volta/bin, ~/.asdf/shims, the fnm default alias and the bin directory of the newest nvm Node version under ~/.config/nvm or ~/.nvm, plus /usr/local/bin and /snap/bin. The server process receives this widened search path as well, so npx finds its node. If a server still reports a command that was not found, see When Something Doesn't Work.

On Windows a bare name is completed with PATHEXT, so npx becomes npx.cmd. npm also ships an extension-less npx shell script, which Windows cannot start (error=193) – it is skipped on purpose. Batch shims (.cmd, .bat) are started through cmd.exe. The additional directories are %APPDATA%\npm, %ProgramFiles%\nodejs, nvm-windows (%APPDATA%\nvm, %NVM_HOME%, %NVM_SYMLINK%), fnm (%APPDATA%\fnm\node-versions), Volta (%LOCALAPPDATA%\Volta\bin), pnpm, uv, scoop (%USERPROFILE%\scoop\shims), Chocolatey and %SystemRoot%\System32. A full path works as well, e.g. C:\Program Files\nodejs\npx.cmd.

The process is started without a shell: there is no quoting, no globbing and no variable substitution. A path therefore belongs into the arguments as plain text – ~/Documents works because the app expands a leading ~, "~/My Documents" does not (the quote characters would be part of the path).
First start with npx – the package is pre-installed A local server configured as npx <package> downloads its package on the first start. On Windows, with an antivirus filter inspecting every unpacked file, that regularly takes longer than a minute – longer than the 60-second window the MCP SDK grants for the handshake. The server was then reported as Connection failed although nothing was wrong with it. Apis AI therefore pulls the package into the local npm cache before the handshake (npm cache add <package>), once per package and app run; only the npm cache is written, no node_modules tree is created. Servers started with uvx, pnpm dlx or a plain program are not affected.

If the warm-up is not possible (no npm, no network) the server starts exactly as before. A handshake that still runs into the timeout is reported separately, with a hint that a retry now uses the already downloaded package.
Credentials belong in the environment, not in the URL Passwords in a command line end up in the protocol log of the server and in your shell history. Prefer an environment variable (PGPASSWORD) or a password file that the program reads on its own (e.g. ~/.pgpass, mode 600). Apis AI masks passwords in URLs and secret parameters in its own logs (user:***@host), but the server's own log files are outside its control.

Fields – Remote (HTTP)

FieldMeaning
URLAddress of the MCP endpoint.
HeadersKey=Value, one per line – e.g. a bearer token.
OAuth Client ID / SecretOptional. Leave empty for automatic client registration.

MCP Library

The MCP library helps with quick setup:

With + you adopt an entry as a server card and then adjust paths, credentials or environment variables.

OAuth Sign-In

If a remote server requires a sign-in, the server card shows the status Sign-in required and a Sign in button. After successful authorization the token is stored locally and the server connects automatically.

Connection Status

StatusMeaning
Connected (N tools)Server is active; N tools are available to the AI.
Connecting…Connection is being established.
Sign-in requiredOAuth authorization pending.
Connection failedServer could not be reached or started – check the configuration. The card shows the reason below the status, e.g. a missing program or a wrong path. If the server itself failed at startup, its last output lines follow in a box below; they usually name the actual cause (missing dependency, unresolvable version, unreadable file).
DisabledServer is switched off individually.

The sidebar always shows how many MCP servers are active. In workflow nodes, MCP servers can additionally be enabled or disabled individually (see Workflows).

Tip Use Reconnect MCP servers to rebuild all connections after a configuration change.