Skip to content

Commit c43c8d5

Browse files
cleanup branch (#81)
Clean up registry lookups * Clean up registry.yaml lookup * add sources to metadata * Add a new set of mcp containers * Skip nil or empty Environment variables
1 parent 9b65f02 commit c43c8d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+807
-199
lines changed

build.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
(def jar-content (str build-folder "/classes"))
66

77
(def basis (b/create-basis {:project "deps.edn"
8-
:aliases [:native]}))
8+
:aliases [:main]}))
99
(def app-name "chat-sdlc")
1010
(def uber-file-name (format "%s/%s-standalone.jar" build-folder app-name)) ; path for result uber file
1111

deps-lock.json

Lines changed: 333 additions & 58 deletions
Large diffs are not rendered by default.

deps.edn

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
clj-commons/clj-yaml {:mvn/version "1.0.28"}
55
pogonos/pogonos {:mvn/version "0.2.1"}
66
dev.weavejester/medley {:mvn/version "1.8.0"}
7-
io.replikativ/hasch {:mvn/version "0.3.94"}
7+
io.replikativ/hasch {:mvn/version "0.3.94"
8+
:exclusions [org.clojure/clojurescript]}
89
babashka/fs {:mvn/version "0.5.22"}
910
babashka/process {:mvn/version "0.5.22"}
1011
babashka/babashka.curl {:mvn/version "0.1.2"}
@@ -18,6 +19,6 @@
1819
borkdude/dynaload {:mvn/version "0.3.5"}}
1920
:aliases {:main {:main-opts ["-m" "docker.main"]}
2021
:build {:ns-default build
21-
:deps {io.github.clojure/tools.build {:git/tag "v0.9.5" :git/sha "24f2894"}}}
22+
:deps {io.github.clojure/tools.build {:git/tag "v0.10.8" :git/sha "2fdfd66bc3e8e78fde810515c9b8e7e21f638949"}}}
2223
:main-repl {:main-opts ["-m" "docker.main"]
2324
:extra-deps {cider/cider-nrepl {:mvn/version "0.47.1"}}}}}

dev/catalog.clj

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,23 @@
6363
(generate-updated-catalog)
6464
;; parse catalog
6565
(def catalog (yaml/parse-string (slurp "prompts/catalog.yaml")))
66+
(count (:registry catalog))
6667
(string/join "," (->> (:registry catalog) keys (map name)))
6768

68-
;; raw github urls to
69+
;; raw github urls to for the slim/cleanup branch
6970
(def prompt-refs
7071
(->> catalog
7172
:registry
7273
vals
7374
(map :ref)
7475
(map #(git/parse-github-ref %))
75-
(map #(format "https://raw.githubusercontent.com/%s/%s/refs/heads/%s/%s" (:owner %) (:repo %) (or (:ref %) "main") (:path %)))))
76-
77-
(->> prompt-refs (interpose "\n") (apply str) (println))
76+
(map #(assoc % :ref "slim/cleanup"))
77+
#_(map #(format "https://raw.githubusercontent.com/%s/%s/refs/heads/%s/%s" (:owner %) (:repo %) (or (:ref %) "main") (:path %)))))
7878

7979
;; current git ref files
8080
(def local-prompt-files
81-
(->> catalog
82-
:registry
83-
vals
84-
(map :ref)
85-
(map #(conj [%] (git/prompt-file %)))
86-
(into {})))
81+
(->> prompt-refs
82+
(map git/ref-map->prompt-file)))
8783

8884
;; parse all of the current git prompts
8985
(with-redefs [client/get-mcp-tools-from-prompt (constantly [])]

dev/stdio_client.clj

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,24 @@
33
[babashka.process :as process]
44
[cheshire.core :as json]
55
[clojure.core.async :as async]
6-
[clojure.java.io :as io])
7-
(:import
8-
[java.io BufferedOutputStream]))
6+
[clojure.java.io :as io]
7+
[docker]
8+
repl))
99

1010
(defn write [writer m]
1111
(.write writer (json/generate-string m))
1212
(.write writer "\n")
1313
(.flush writer))
1414

15+
(repl/setup-stdout-logger)
16+
(comment
17+
(def created (docker/create {:image "mcp/discord:latest"
18+
:workdir "/app"}))
19+
(def socket (docker/attach-socket (:Id created)))
20+
(docker/start ))
21+
1522
(do
16-
(def server (process/process
23+
#_(def server (process/process
1724
{:out :stream :in :stream}
1825
"docker" "run" "-i" "--rm" "--workdir=/app"
1926
"-v" "mcp-gdrive:/gdrive-server"
@@ -22,6 +29,11 @@
2229
"--label" "x-secret:google.gcp-oauth.keys.json=/secret/google.gcp-oauth.keys.json"
2330
"vonwig/gdrive:latest"))
2431

32+
(def server (process/process
33+
{:out :stream :in :stream}
34+
"docker" "run" "-i" "--rm" "--workdir=/app"
35+
"mcp/discord:latest"))
36+
2537
(async/thread
2638
(loop []
2739
(let [line (.readLine (io/reader (:out server)))]
@@ -32,9 +44,11 @@
3244
(async/thread
3345
(loop []
3446
(let [line (.readLine (io/reader (:err server)))]
35-
(when line
36-
(println "stderr: " line)
37-
(recur)))))
47+
(if line
48+
(do
49+
(println "stderr: " line)
50+
(recur))
51+
(println "stopping stderr")))))
3852

3953
(def writer (io/writer (:in server)))
4054

@@ -50,7 +64,7 @@
5064

5165

5266
(write writer
53-
{:jsonrpc "2.0" :method "resources/list" :params {} :id 1})
67+
{:jsonrpc "2.0" :method "tools/list" :params {} :id 1})
5468

5569
(write writer
5670
{:jsonrpc "2.0"

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gordon-mcp.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

prompts/bootstrap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ tools:
2020
command:
2121
- -c
2222
- "echo \"{{content|safe}}\" > /prompts/{{name}}.md"
23-
- name: write_files
24-
- name: read-file
23+
source:
24+
url: https://github.com/docker/labs-ai-tools-for-devs/tree/main/functions/bash_alpine
2525
```
2626
2727
# Sample Test prompt to create a new tool definition

prompts/catalog.yaml

Lines changed: 67 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,8 @@ registry:
249249
paths:
250250
type: array
251251
items: {type: string}
252-
tools: []
253-
prompts: 0
254-
resources: {}
255-
webresearch:
256-
description: |
257-
UNDER CONSTRUCTION (declarative state caching in volumes) A Model Context Protocol (MCP) server for web research, enabling real-time information retrieval and webpage content extraction for Claude.
258-
ref: github:docker/labs-ai-tools-for-devs?path=prompts/mcp/webresearch.md
259-
icon: https://img.icons8.com/officel/80/under-construction.png
252+
required:
253+
- paths
260254
tools: []
261255
prompts: 0
262256
resources: {}
@@ -388,6 +382,11 @@ registry:
388382
type: string
389383
username:
390384
type: string
385+
anyOf:
386+
- required:
387+
- confluence
388+
- required:
389+
- jira
391390
jetbrains:
392391
description: |
393392
The server proxies requests from client to JetBrains IDE.
@@ -402,3 +401,63 @@ registry:
402401
properties:
403402
port:
404403
type: integer
404+
required:
405+
- server
406+
aws-kb-retrieval-server:
407+
description: |
408+
An MCP server implementation for retrieving information from the AWS Knowledge Base using the Bedrock Agent Runtime.
409+
ref: github:docker/labs-ai-tools-for-devs?path=prompts/mcp/aws-kb-retrieval-server.md
410+
icon: https://cdn.jsdelivr.net/npm/simple-icons@v7/icons/amazonaws.svg
411+
everart:
412+
description: |
413+
Image generation server using EverArt's API.
414+
ref: github:docker/labs-ai-tools-for-devs?path=prompts/mcp/everart.md
415+
icon: https://10web.io/wp-content/uploads/2024/07/EverArt.png
416+
sentry:
417+
description: |
418+
A Model Context Protocol server for retrieving and analyzing issues from Sentry.io. This server provides tools to inspect error reports, stacktraces, and other debugging information from your Sentry account.
419+
ref: github:docker/labs-ai-tools-for-devs?path=prompts/mcp/sentry.md
420+
icon: https://cdn.jsdelivr.net/npm/simple-icons@v7/icons/sentry.svg
421+
gitlab:
422+
description: |
423+
MCP Server for the GitLab API, enabling project management, file operations, and more.
424+
ref: github:docker/labs-ai-tools-for-devs?path=prompts/mcp/gitlab.md
425+
icon: https://cdn.jsdelivr.net/npm/simple-icons@v7/icons/gitlab.svg
426+
config:
427+
- name: gitlab
428+
decription: Configure the local or Cloud GitLab instance
429+
parameters:
430+
url:
431+
type: string
432+
description: api url - optional for self-hosted instances
433+
obsidian:
434+
description: |
435+
MCP server to interact with Obsidian via the Local REST API community plugin.
436+
ref: github:docker/labs-ai-tools-for-devs?path=prompts/mcp/obsidian.md
437+
icon: https://cdn.jsdelivr.net/npm/simple-icons@v7/icons/obsidian.svg
438+
mcp-discord:
439+
description: |
440+
A Discord MCP (Model Context Protocol) server that enables AI assistants to interact with the Discord platform.
441+
ref: github:docker/labs-ai-tools-for-devs?path=prompts/mcp/barryyip0625-mcp-discord.md
442+
icon: https://cdn.jsdelivr.net/npm/simple-icons@v7/icons/discord.svg
443+
discordmcp:
444+
description: |
445+
A Model Context Protocol (MCP) server that enables LLMs to interact with Discord channels, allowing them to send and read messages through Discord's API. Using this server, LLMs like Claude can directly interact with Discord channels while maintaining user control and security.
446+
ref: github:docker/labs-ai-tools-for-devs?path=prompts/mcp/v-3-discordmcp.md
447+
icon: https://cdn.jsdelivr.net/npm/simple-icons@v7/icons/discord.svg
448+
resend:
449+
description: |
450+
Sends emails using Resend's API. Why? Now you can let Cursor or Claude Desktop compose emails for you and send it right away without having to copy and paste the email content.
451+
ref: github:docker/labs-ai-tools-for-devs?path=prompts/mcp/resend.md
452+
icon: https://img.icons8.com/ios/50/new-post--v1.png
453+
config:
454+
- name: resend
455+
description: Configure sender and reply email addresses
456+
parameters:
457+
sender:
458+
type: string
459+
description: sender email address
460+
reply_to:
461+
type: string
462+
description: comma separated list of reply to email addresses
463+

prompts/chrome.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ tools:
4242
image: vonwig/curl:latest
4343
command:
4444
- "{{raw|safe}}"
45+
source:
46+
url: https://github.com/docker/labs-ai-tools-for-devs/tree/main/functions/hub/curl
4547
- name: start-chrome
4648
description: Starts the chrome browser in case it is not already running.
4749
parameters:

0 commit comments

Comments
 (0)