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.
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)
| Type | Behavior |
|---|---|
| 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
- Create a server – in the Extensions tab under MCP servers, click Add MCP server.
- Choose a type – Local (stdio) or Remote (HTTP).
- Fill in the fields – depending on the type (see below).
- Save & connect – the app connects the server and shows the number of tools found.
Fields – Local (stdio)
| Field | Meaning |
|---|---|
| Command | The program to execute (e.g. npx, python, uvx). A leading ~, $HOME or ${HOME} is replaced with your home directory. |
| Arguments | Space-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 variables | Key=Value, one per line – e.g. for API keys. |
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).
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.
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)
| Field | Meaning |
|---|---|
| URL | Address of the MCP endpoint. |
| Headers | Key=Value, one per line – e.g. a bearer token. |
| OAuth Client ID / Secret | Optional. Leave empty for automatic client registration. |
MCP Library
The MCP library helps with quick setup:
- Curated – hand-picked, common servers to adopt directly.
- Registry (online) – search the official MCP registry with "Load more" pagination.
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
| Status | Meaning |
|---|---|
| Connected (N tools) | Server is active; N tools are available to the AI. |
| Connecting… | Connection is being established. |
| Sign-in required | OAuth authorization pending. |
| Connection failed | Server 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). |
| Disabled | Server 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).