MCP

For Coding Agents

mcp.md

AGNT MCP

AGNT MCP auto-generates Model Context Protocol compatible endpoints from your Studio prompts. You define tools and skills in Studio's block editor, and MCP handles the rest -- discovery, invocation, and protocol compliance.

How it works

Skills and tools in Studio support two delivery modes:

Static mode inlines everything directly. Tools end up in the tools[] array. Skills get embedded in the system prompt. This is the default and works for most use cases.

MCP mode generates meta-tools for discovery and invocation. Instead of inlining a tool definition, the compiler produces list_tools and call_tool meta-tools. Instead of inlining a skill, it produces list_skills and get_skill meta-tools.

The underlying data is identical. The compiler just changes the delivery format. You toggle between static and MCP at deploy time -- no code changes, no schema rewrites.

Why this matters

MCP is a protocol for tool and context discovery. Implementing it from scratch means building a server, handling JSON-RPC, managing sessions, and keeping schemas in sync. AGNT does all of that from your existing Studio definitions.

You author once. The compiler generates both static and MCP-compatible outputs from the same source.

Skills

Skills follow the public skill convention established at github.com/anthropics/skills:

skill-name/
  SKILL.md          -- Entry point
  reference/        -- Supporting docs
  scenarios/        -- Contextual variants
  scripts/          -- Helper scripts
  assets/           -- Images, PDFs, etc.

Skills are richer than tools. A tool is a function signature with parameters. A skill is a bundle of instructions, reference material, contextual scenarios, and supporting assets. The model gets the full context it needs to execute a complex task, not just a function to call.

Skill library API

Base URL: https://studio.agnt.ai/api/v1

List skills

GET /tenants/:tenantId/library?type=skill

Returns all skills in your library. Filter by type to get just skills (the library also holds tools, variables, components, and other item types).

Create a skill

POST /tenants/:tenantId/library

Create a new skill in the library. The request body follows the standard library item schema with type: "skill".

Get a skill

GET /tenants/:tenantId/library/skill/:name

Returns the full skill definition including its SKILL.md entry point, reference materials, and scenario list.

Scenario peek

GET /tenants/:tenantId/library/skill/:name/scenarios

Returns lightweight scenario summaries without the full content. Use this when you need to know what scenarios exist without loading everything.

Import a skill

POST /tenants/:tenantId/library/import

Import a skill from a URL or raw content. Supports GitHub URLs with recursive tree fetching -- point it at a skill directory in a public repo and it pulls the entire structure.

Request body (URL import):

json
{
  "url": "https://github.com/org/repo/tree/main/skills/my-skill",
  "type": "skill"
}

Request body (raw import):

json
{
  "type": "skill",
  "content": {
    "name": "my-skill",
    "entry": "# My Skill\n\nInstructions here...",
    "reference": [],
    "scenarios": []
  }
}

Resolve import (preview)

POST /tenants/:tenantId/library/import/resolve

Resolves an import without actually creating the library item. Use this to preview what would be imported before committing.

Delivery modes in practice

When you compile a prompt with tools or skills, the output depends on the delivery mode:

Static output (default):

json
{
  "system": "You are an agent. You have the following skill: ...",
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "search_docs",
        "description": "Search documentation",
        "parameters": { ... }
      }
    }
  ]
}

MCP output:

json
{
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "list_tools",
        "description": "List available tools",
        "parameters": {}
      }
    },
    {
      "type": "function",
      "function": {
        "name": "call_tool",
        "description": "Invoke a tool by name",
        "parameters": {
          "type": "object",
          "properties": {
            "tool_name": { "type": "string" },
            "arguments": { "type": "object" }
          }
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "list_skills",
        "description": "List available skills",
        "parameters": {}
      }
    },
    {
      "type": "function",
      "function": {
        "name": "get_skill",
        "description": "Get full skill content by name",
        "parameters": {
          "type": "object",
          "properties": {
            "skill_name": { "type": "string" }
          }
        }
      }
    }
  ]
}

Same data. Different shape. The model discovers and invokes tools and skills through the meta-tool interface instead of receiving them upfront.