Skip to main content

MCP Quickstart

GenKitKraft exposes all of its management APIs as MCP tools. This lets you manage agents, providers, prompts, tools, and even chat — directly from any MCP-compatible client (Claude Desktop, Cursor, custom agents, etc.).

Prerequisites​

Endpoint​

The MCP server is available at:

http://<host>:<port>/mcp

Default: http://localhost:8080/mcp

It uses the Streamable HTTP transport.

Authentication​

  • If AUTH_CREDENTIALS is set, the MCP endpoint requires HTTP Basic Auth with the same username and password.
  • If AUTH_CREDENTIALS is not set, the MCP endpoint is open (no auth).

Connecting from Claude Desktop​

Claude Desktop connects to a remote server through the mcp-remote bridge. This needs Node.js (for npx). Add GenKitKraft to your Claude Desktop MCP config (claude_desktop_config.json):

{
"mcpServers": {
"genkitkraft": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8080/mcp"]
}
}
}

If authentication is enabled, pass an Authorization header to mcp-remote:

{
"mcpServers": {
"genkitkraft": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8080/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Basic <base64-encoded username:password>"
}
}
}
}
tip

Generate the base64 value with: echo -n "admin:changeme" | base64

Connecting from Cursor​

In Cursor settings, add an MCP server with:

  • Type: Streamable HTTP
  • URL: http://localhost:8080/mcp

If auth is required, add this header:

"headers": {
"Authorization": "Basic <base64-encoded username:password>"
}

Available Tools​

Once connected, your MCP client will discover all available tools automatically. Here's a summary:

Agents​

ToolDescription
agents_listList all agents with pagination
agents_getGet an agent by ID
agents_createCreate a new agent
agents_updateUpdate an agent
agents_deleteDelete an agent

Agent Tool Config​

ToolDescription
agent_tools_getGet which tools are assigned to an agent
agent_tools_updateUpdate tool assignments for an agent

Prompts​

ToolDescription
prompts_listList all system prompts
prompts_getGet a prompt by ID
prompts_createCreate a new system prompt
prompts_updateUpdate a prompt
prompts_deleteDelete a prompt

Providers​

ToolDescription
providers_listList all LLM providers
providers_getGet a provider by ID
providers_createCreate a new provider
providers_updateUpdate a provider
providers_deleteDelete a provider
providers_testTest provider connectivity
provider_types_listList supported provider types

HTTP Tools​

ToolDescription
http_tools_listList all HTTP tools
http_tools_getGet an HTTP tool by ID
http_tools_createCreate a new HTTP tool
http_tools_updateUpdate an HTTP tool
http_tools_deleteDelete an HTTP tool

MCP Servers​

ToolDescription
mcp_servers_listList all registered MCP servers
mcp_servers_getGet an MCP server by ID
mcp_servers_createRegister a new MCP server
mcp_servers_updateUpdate an MCP server
mcp_servers_deleteDelete an MCP server
mcp_servers_list_toolsDiscover tools from an MCP server

Playground​

ToolDescription
playground_sessions_listList chat sessions for an agent
playground_sessions_createCreate a new chat session (title is optional)
playground_sessions_deleteDelete a chat session
playground_messages_listList messages in a session
playground_chatSend a message and get a response

playground_chat and playground_messages_list need a session ID. Send it as session_id. If your client cannot send session_id, send the same value as fallback_session_id. When both fields are set, fallback_session_id takes precedence.

playground_chat accepts the same optional overrides as the HTTP API: provider, model, system prompt, sampling settings (temperature, top_p, top_k), reasoning effort (reasoning_effort_enabled, reasoning_effort), max_tool_calls, http_tool_ids, mcp_servers and built_in_tool_ids. An override applies to that request only. It does not change the saved agent.

Gaps​

ToolDescription
gaps_listList the gaps an agent reported, with pagination
gaps_getGet a gap by ID
gaps_resolveMark a gap as resolved
gaps_dismissDismiss a gap with a reason category. A gap dismissed as unrelated can never be reopened
gaps_reopenReopen a resolved or dismissed gap

See the Gaps guide for more about gaps.

Built-in Tools​

ToolDescription
built_in_tools_listList all available built-in tools. Use the IDs with agent_tools_update (built_in_tool_ids)

Auth​

ToolDescription
auth_loginLog in with username/password
auth_logoutLog out (invalidate session)
auth_get_meGet current user info
auth_get_statusCheck if auth is required

Health​

ToolDescription
health_livenessLiveness check
health_readinessReadiness check

Example: Set up a new agent via MCP​

Using any MCP client, you can create a fully configured agent in a few tool calls:

  1. provider_types_list — see available provider types
  2. providers_create — configure an LLM provider (e.g., OpenAI with your API key)
  3. prompts_create — create a system prompt
  4. agents_create — create an agent using the provider and prompt
  5. playground_sessions_create — start a chat session
  6. playground_chat — chat with your agent

For a detailed walkthrough with examples and input schemas, see the Agent Creation Guide.

Built-in Prompts​

The MCP server includes these prompts. MCP clients that support server-side prompts (like Claude Desktop) can load them automatically.

PromptDescription
create-agentA guide to all available tools and the correct workflow to create agents
backupA guide to back up all configurations (tools, MCP servers, prompts, agents) to a structured markdown file
restoreA guide to restore configurations from a backup file, with conflict detection and resolution

Troubleshooting​

401 Unauthorized: AUTH_CREDENTIALS is set but your client isn't sending the correct Basic Auth header. Double-check the base64-encoded username:password.

Connection refused: Make sure GenKitKraft is running and the URL/port are correct. If running in Docker, ensure the port is mapped.

A tool says session_id is missing, but the client sent it: Some clients drop the session_id argument before it reaches the server. Send the same value as fallback_session_id.

Empty tool list: The MCP client may not support the Streamable HTTP transport. Check your client's MCP transport support.