Skip to content
Docs Menu
Documentation

MCP

Model Context Protocol integration in packages/nikcli/src/mcp.

Overview

MCP clients are instantiated per configured server. Tools are dynamically converted into AI SDK tools.

Config

Local MCP servers use type: "local"; remote servers use type: "remote".

Field Notes
typelocal or remote.
commandLocal: command array to spawn server.
urlRemote: base URL for MCP server.
enabledDisable with false.
oauthRemote OAuth settings (clientId/clientSecret).

Auth

OAuth

Remote MCP servers support OAuth via McpOAuthProvider and callback handlers.

CLI Commands

mcp listList MCP servers and status.
mcp auth [name]Run OAuth auth for a server.
mcp logout [name]Remove stored MCP credentials.
mcp addInteractive MCP config generator.
mcp debug <name>Connect and list tools/resources.