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

Add GenKitKraft to your Claude Desktop MCP config (claude_desktop_config.json):

{
"mcpServers": {
"genkitkraft": {
"url": "http://localhost:8080/mcp"
}
}
}

If authentication is enabled, add an Authorization header:

{
"mcpServers": {
"genkitkraft": {
"url": "http://localhost:8080/mcp",
"headers": {
"Authorization": "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, configure the Basic Auth header as above.

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
playground_sessions_deleteDelete a chat session
playground_messages_listList messages in a session
playground_chatSend a message and get a response

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 a create-agent prompt that provides the LLM with a comprehensive guide to all available tools and the correct workflow for creating agents. MCP clients that support server-side prompts (like Claude Desktop) can load this prompt automatically to give the LLM full context.

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.

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