---
name: mcp-core
description: 'Core MCP usage skill for Kusillo. Use when you need to initialize, discover, and call tools through POST /mcp with JSON-RPC 2.0.'
argument-hint: 'base_url, auth_token?'
---

# MCP Core Skill

## Purpose

Provide the canonical MCP calling pattern for all Kusillo agents and skills.

## When to Use

- First time connecting to Kusillo backend orchestration.
- Migrating from direct backend routes to MCP.
- Debugging tool invocation format.

## Endpoint

`POST {{BASE_URL}}/mcp`

## Required Headers

- `Content-Type: application/json`
- `Authorization: Bearer {{AUTH_TOKEN}}` for admin tools

## Procedure

1. Call `initialize`.
2. Call `tools/list`.
3. Call `tools/call` for the selected tool and arguments.
4. Validate `result.isError` before continuing.

## Example Requests

### initialize

```json
{
  "jsonrpc": "2.0",
  "id": "init-1",
  "method": "initialize",
  "params": {}
}
```

### tools/list

```json
{
  "jsonrpc": "2.0",
  "id": "list-1",
  "method": "tools/list",
  "params": {}
}
```

### tools/call

```json
{
  "jsonrpc": "2.0",
  "id": "call-1",
  "method": "tools/call",
  "params": {
    "name": "guides.read",
    "arguments": {
      "path": "agentic-dev/SKILL.md"
    }
  }
}
```

## Rules

1. Use MCP tools for orchestration instead of direct REST routes.
2. Keep tool calls atomic and explicit.
3. Handle MCP errors before attempting the next phase.

## Reference

- [MCP Endpoints](../mcp-endpoints.md)
