# Agentcore Register

Given an MCP server URL, probe the server via curl to discover its metadata and tools...

- Repository: https://github.com/agentic-community/mcp-gateway-registry (1032 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add agentic-community/mcp-gateway-registry --skill agentcore-register -g -a claude-code -y`
Codex: `npx skills add agentic-community/mcp-gateway-registry --skill agentcore-register -g -a codex -y`
Cursor: `npx skills add agentic-community/mcp-gateway-registry --skill agentcore-register -g -a cursor -y`
Gemini CLI: `npx skills add agentic-community/mcp-gateway-registry --skill agentcore-register -g -a gemini-cli -y`

## Description

Given an MCP server URL, probe the server via curl to discover its metadata and tools, then generate a markdown file with copy-pasteable content for each field in the Amazon Bedrock AgentCore "Create record" form.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# AgentCore Register

Given a remote MCP server URL, probe it to discover server info and tools, then generate a markdown file containing copy-pasteable values for every field in the Amazon Bedrock AgentCore **Create record** form.

The MCP server URL is provided as `$ARGUMENTS`.

If `$ARGUMENTS` is empty, ask the user for the MCP server URL using AskUserQuestion.

## Steps

### 1. Initialize the MCP session

Send the MCP `initialize` request and capture the response headers (for the session ID) and body (for server info).

```bash
curl -s --max-time 15 -D /tmp/_agentcore_mcp_headers.txt \
  -X POST "$MCP_URL" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2024-11-05",
      "capabilities": {},
      "clientInfo": {"name": "agentcore-register", "version": "1.0.0"}
    }
  }' > /tmp/_agentcore_mcp_init.json 2>&1
```

Parse the response to extract:
- `serverInfo.name` - the server name
- `serverInfo.version` - the server version
- `protocolVersion` - the MCP protocol version
- `capabilities` - what the server supports

Extract the `mcp-session-id` header value from `/tmp/_agentcore_mcp_headers.txt`.

#### Error handling

- If the curl request fails or times out, tell the user the server is unreachable and stop.
- If the response is a 502/503/504, tell the user the server backend is down and stop.
- If the response is HTML (not JSON), tell the user the URL may not be an MCP endpoint and stop.

### 2. List the tools

Using the session ID from step 1, send a `tools/list` request:

```bash
SESSION_ID=$(grep -i 'mcp-session-id' /tmp/_agentcore_mcp_headers.txt | awk '{print $2}' | tr -d '\r')

The rest: https://github.com/agentic-community/mcp-gateway-registry/blob/HEAD/.claude/skills/agentcore-register/SKILL.md
