ci: add Anthropic API key for mcplocal LLM provider
All checks were successful
All checks were successful
Configure mcplocal with anthropic (claude-haiku-3.5) in CI using the ANTHROPIC_API_KEY secret. Writes ~/.mcpctl/config.json and ~/.mcpctl/secrets before starting mcplocal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -102,6 +102,7 @@ jobs:
|
|||||||
MCPLOCAL_HTTP_PORT: "3200"
|
MCPLOCAL_HTTP_PORT: "3200"
|
||||||
MCPLOCAL_MCPD_URL: http://localhost:3100
|
MCPLOCAL_MCPD_URL: http://localhost:3100
|
||||||
DOCKER_API_VERSION: "1.43"
|
DOCKER_API_VERSION: "1.43"
|
||||||
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -186,6 +187,15 @@ jobs:
|
|||||||
printf '#!/bin/sh\nexec node "%s/src/cli/dist/index.js" "$@"\n' "$GITHUB_WORKSPACE" > /usr/local/bin/mcpctl
|
printf '#!/bin/sh\nexec node "%s/src/cli/dist/index.js" "$@"\n' "$GITHUB_WORKSPACE" > /usr/local/bin/mcpctl
|
||||||
chmod +x /usr/local/bin/mcpctl
|
chmod +x /usr/local/bin/mcpctl
|
||||||
|
|
||||||
|
- name: Configure mcplocal LLM provider
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.mcpctl
|
||||||
|
cat > ~/.mcpctl/config.json << 'CONF'
|
||||||
|
{"llm":{"providers":[{"name":"anthropic","type":"anthropic","model":"claude-haiku-3-5-20241022","tier":"fast"}]}}
|
||||||
|
CONF
|
||||||
|
printf '{"anthropic-api-key":"%s"}\n' "$ANTHROPIC_API_KEY" > ~/.mcpctl/secrets
|
||||||
|
chmod 600 ~/.mcpctl/secrets
|
||||||
|
|
||||||
- name: Start mcplocal
|
- name: Start mcplocal
|
||||||
run: nohup node src/mcplocal/dist/main.js > /tmp/mcplocal.log 2>&1 &
|
run: nohup node src/mcplocal/dist/main.js > /tmp/mcplocal.log 2>&1 &
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user