Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mcp-server-info-bot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MCP Server Info Bot
name: [DEPRECATED] MCP Server Info Bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Quote the workflow name to fix YAML syntax error.

Unquoted square brackets are parsed as a flow sequence in YAML. YAMLlint’s error aligns with this. Quote the name to keep it a plain string.

-name: [DEPRECATED] MCP Server Info Bot
+name: "[DEPRECATED] MCP Server Info Bot"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name: [DEPRECATED] MCP Server Info Bot
name: "[DEPRECATED] MCP Server Info Bot"
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 1-1: syntax error: expected , but found ''

(syntax)

🤖 Prompt for AI Agents
.github/workflows/mcp-server-info-bot.yml lines 1-1: the workflow name contains
unquoted square brackets which YAML parses as a flow sequence; fix by
surrounding the entire name value in quotes (single or double) so it is treated
as a plain string, e.g., replace the unquoted name with a quoted string
containing the same text.


permissions:
contents: write
Expand Down
105 changes: 67 additions & 38 deletions scripts/get_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,45 +154,72 @@ def validate_installations(manifest: dict, repo_url: str) -> Optional[dict]:
TASK: Find installation instructions in the README and convert them to the exact schema format used in the MCP registry.

INSTALLATION SCHEMA EXAMPLES:

1. NPX INSTALLATIONS (most common):
```json
"npm": {{
"type": "npm",
"command": "npx",
"args": ["-y", "@package/name"],
"description": "Install with npx"
}}
```

2. UVX INSTALLATIONS:
```json
"uvx": {{
"type": "uvx",
"command": "uvx",
"args": ["package-name"],
"description": "Run with Claude Desktop"
<README> Docker
{{
"mcpServers": {{
"brave-search": {{
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"BRAVE_API_KEY",
"mcp/brave-search"
],
"env": {{
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}}
}}
}}
}}
```
OR with git URL:
```json
"uvx": {{
"type": "uvx",
"command": "uvx",
"args": ["--from", "git+https://github.com/user/repo", "command-name"],
"description": "Install from git"
NPX
{{
"mcpServers": {{
"brave-search": {{
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {{
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}}
}}
}}
}}
```

3. DOCKER INSTALLATIONS:
```json
"docker": {{
"type": "docker",
"command": "docker",
"args": ["run", "-i", "--rm", "image-name"],
"description": "Run using Docker"
</README>
From the example README, you should get:
{{
"installations": [
{{
"type": "docker",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"BRAVE_API_KEY",
"mcp/brave-search"
],
"env": {{
"BRAVE_API_KEY": "${{YOUR_API_KEY_HERE}}"
}}
}},
{{
"type": "npm",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {{
"BRAVE_API_KEY": "${{YOUR_API_KEY_HERE}}"
}}
}}
]
}}
```

Comment on lines +157 to 223
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix f-string brace escaping; this block will not compile as written.

The multi-line f-string contains many literal JSON braces that aren’t escaped. Python requires doubling braces inside f-strings, otherwise you get a SyntaxError at import time. Also, the example/return-shape messaging mixes array vs. map forms for "installations". Replace the large JSON example with a prebuilt string and inject it via a single {examples_block} placeholder.

Apply this focused diff to eliminate the brace-escape problem and keep the string readable:

- INSTALLATION SCHEMA EXAMPLES:
-<README> Docker
-{
-  "mcpServers": {{
-    "brave-search": {{
-      "command": "docker",
-      "args": [
-        "run",
-        "-i",
-        "--rm",
-        "-e",
-        "BRAVE_API_KEY",
-        "mcp/brave-search"
-      ],
-      "env": {{
-        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
-      }}
-    }}
-  }}
-}
-NPX
-{
-  "mcpServers": {{
-    "brave-search": {{
-      "command": "npx",
-      "args": [
-        "-y",
-        "@modelcontextprotocol/server-brave-search"
-      ],
-      "env": {{
-        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
-      }}
-    }}
-  }}
-}
-</README>
-From the example README, you should get:
-{
-  "installations": [
-    {{
-      "type": "docker",
-      "command": "docker",
-      "args": [
-        "run",
-        "-i",
-        "--rm",
-        "-e",
-        "BRAVE_API_KEY",
-        "mcp/brave-search"
-      ],
-      "env": {{
-        "BRAVE_API_KEY": "${{YOUR_API_KEY_HERE}}"
-      }}
-    }},
-    {{
-      "type": "npm",
-      "command": "npx",
-      "args": [
-        "-y",
-        "@modelcontextprotocol/server-brave-search"
-      ],
-      "env": {{
-        "BRAVE_API_KEY": "${{YOUR_API_KEY_HERE}}"
-      }}
-    }}
-  ]
-}
+ INSTALLATION SCHEMA EXAMPLES:
+{examples_block}

Add this helper (outside the selected lines) before constructing payload inside validate_installations:

from textwrap import dedent  # at top-level imports

# inside validate_installations(), just before 'payload = {...}'
examples_block = dedent("""
<README> Docker
{
  "mcpServers": {
    "brave-search": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "mcp/brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}
NPX
{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}
</README>
From the example README, you should get:
{
  "installations": [
    {
      "type": "docker",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "mcp/brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "${YOUR_API_KEY_HERE}"
      }
    },
    {
      "type": "npm",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "${YOUR_API_KEY_HERE}"
      }
    }
  ]
}
""")
🤖 Prompt for AI Agents
In scripts/get_manifest.py around lines 157-223, the multi-line f-string
contains unescaped JSON braces causing SyntaxError; replace the large inline
f-string with a normal raw/regular string built via textwrap.dedent assigned to
examples_block just before constructing payload inside validate_installations,
add "from textwrap import dedent" to top-level imports, and then use the single
{examples_block} placeholder in the payload string instead of embedding the JSON
with braces directly so no f-string brace escaping is required.

PROCESS:
1. Read the README.md from {repo_url}
Expand All @@ -204,8 +231,8 @@ def validate_installations(manifest: dict, repo_url: str) -> Optional[dict]:
- Copy the EXACT package names and arguments from README

CRITICAL RULES:
- Use exact package names from README (don't guess or modify)
- Match the schema format exactly as shown in examples
- Use exact argument from README (don't guess or modify)
- Match the schema format as shown in examples
- Include ALL installation methods mentioned in README
- Remove installation methods NOT mentioned in README
- For npx: always use type "npm" with command "npx" and args ["-y", "package-name"]
Expand Down Expand Up @@ -288,7 +315,9 @@ def main():

# Step 2: Validate and correct installations
print("Step 2: Validating installations against README...")
print(f"Before: {json.dumps(manifest, indent=2)}")
manifest = validate_installations(manifest, args.repo_url)
print(f"After: {json.dumps(manifest, indent=2)}")

# Step 3: Save manifest
print("Step 3: Saving manifest...")
Expand Down
Loading