Skip to main content
Model Context Protocol (MCP) lets your model call tools you expose via an MCP server.

Single MCP server

Define an input schema for your tool:
Initialize KarmaAI with MCP options:
Ask the model to use your tool:
Ensure your MCP server is running and reachable at the URL you configured, and that the auth token matches.

Multiple MCP servers

Use either SetMCPServers to replace servers or AddMCPServer to append.
Example usage:
Note: Not all models support MCP. Use a model where Model.SupportsMCP() is true (e.g., Grok variants shown above).