Skip to content

Commit 80ab4dc

Browse files
authored
Merge branch 'main' into main
2 parents 1f197bf + 2441094 commit 80ab4dc

File tree

18 files changed

+1022
-118
lines changed

18 files changed

+1022
-118
lines changed

.github/workflows/claude.yml

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,14 @@ jobs:
1818
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
1919
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
2020
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
21-
) &&
22-
(
23-
github.actor == 'ihrpr' ||
24-
github.actor == 'olaservo'
2521
)
2622
runs-on: ubuntu-latest
2723
permissions:
2824
contents: read
2925
pull-requests: read
3026
issues: read
3127
id-token: write
28+
actions: read
3229
steps:
3330
- name: Checkout repository
3431
uses: actions/checkout@v4
@@ -41,24 +38,16 @@ jobs:
4138
with:
4239
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
4340

44-
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
45-
# model: "claude-opus-4-20250514"
46-
47-
# Optional: Customize the trigger phrase (default: @claude)
48-
# trigger_phrase: "/claude"
49-
50-
# Optional: Trigger when specific user is assigned to an issue
51-
# assignee_trigger: "claude-bot"
41+
# Allow Claude to read CI results on PRs
42+
additional_permissions: |
43+
actions: read
5244
53-
# Optional: Allow Claude to run specific commands
54-
# allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
45+
# Trigger when assigned to an issue
46+
assignee_trigger: "claude"
5547

56-
# Optional: Add custom instructions for Claude to customize its behavior for your project
57-
# custom_instructions: |
58-
# Follow our coding standards
59-
# Ensure all new code has tests
60-
# Use TypeScript for new files
48+
# Allow Claude to run bash
49+
# This should be safe given the repo is already public
50+
allowed_tools: "Bash"
6151

62-
# Optional: Custom environment variables for Claude
63-
# claude_env: |
64-
# NODE_ENV: test
52+
custom_instructions: |
53+
If posting a comment to GitHub, give a concise summary of the comment at the top and put all the details in a <details> block.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ client/tsconfig.app.tsbuildinfo
99
client/tsconfig.node.tsbuildinfo
1010
cli/build
1111
test-output
12+
tool-test-output
1213
# symlinked by `npm run link:sdk`:
1314
sdk
1415
client/playwright-report/
1516
client/results.json
1617
client/test-results/
18+
client/e2e/test-results/
1719
mcp.json

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ server/build
33
CODE_OF_CONDUCT.md
44
SECURITY.md
55
mcp.json
6+
.claude/settings.local.json

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,9 @@ npx @modelcontextprotocol/inspector --cli node build/index.js --method tools/lis
395395
# Call a specific tool
396396
npx @modelcontextprotocol/inspector --cli node build/index.js --method tools/call --tool-name mytool --tool-arg key=value --tool-arg another=value2
397397

398+
# Call a tool with JSON arguments
399+
npx @modelcontextprotocol/inspector --cli node build/index.js --method tools/call --tool-name mytool --tool-arg 'options={"format": "json", "max_tokens": 100}'
400+
398401
# List available resources
399402
npx @modelcontextprotocol/inspector --cli node build/index.js --method resources/list
400403

@@ -407,6 +410,9 @@ npx @modelcontextprotocol/inspector --cli https://my-mcp-server.example.com
407410
# Connect to a remote MCP server (with Streamable HTTP transport)
408411
npx @modelcontextprotocol/inspector --cli https://my-mcp-server.example.com --transport http --method tools/list
409412

413+
# Connect to a remote MCP server (with custom headers)
414+
npx @modelcontextprotocol/inspector --cli https://my-mcp-server.example.com --transport http --method tools/list --header "X-API-Key: your-api-key"
415+
410416
# Call a tool on a remote server
411417
npx @modelcontextprotocol/inspector --cli https://my-mcp-server.example.com --method tools/call --tool-name remotetool --tool-arg param=value
412418

cli/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"scripts": {
1818
"build": "tsc",
1919
"postbuild": "node scripts/make-executable.js",
20-
"test": "node scripts/cli-tests.js"
20+
"test": "node scripts/cli-tests.js && node scripts/cli-tool-tests.js",
21+
"test:cli": "node scripts/cli-tests.js",
22+
"test:cli-tools": "node scripts/cli-tool-tests.js"
2123
},
2224
"devDependencies": {},
2325
"dependencies": {

cli/scripts/cli-tests.js

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ console.log(`${colors.BLUE}- Environment variables (-e)${colors.NC}`);
3737
console.log(`${colors.BLUE}- Config file (--config)${colors.NC}`);
3838
console.log(`${colors.BLUE}- Server selection (--server)${colors.NC}`);
3939
console.log(`${colors.BLUE}- Method selection (--method)${colors.NC}`);
40-
console.log(
41-
`${colors.BLUE}- Tool-related options (--tool-name, --tool-arg)${colors.NC}`,
42-
);
4340
console.log(`${colors.BLUE}- Resource-related options (--uri)${colors.NC}`);
4441
console.log(
4542
`${colors.BLUE}- Prompt-related options (--prompt-name, --prompt-args)${colors.NC}`,
@@ -533,65 +530,6 @@ async function runTests() {
533530
"tools/list",
534531
);
535532

536-
console.log(
537-
`\n${colors.YELLOW}=== Running Tool-Related Tests ===${colors.NC}`,
538-
);
539-
540-
// Test 12: CLI mode with tool call
541-
await runBasicTest(
542-
"tool_call",
543-
TEST_CMD,
544-
...TEST_ARGS,
545-
"--cli",
546-
"--method",
547-
"tools/call",
548-
"--tool-name",
549-
"echo",
550-
"--tool-arg",
551-
"message=Hello",
552-
);
553-
554-
// Test 13: CLI mode with tool call but missing tool name (should fail)
555-
await runErrorTest(
556-
"missing_tool_name",
557-
TEST_CMD,
558-
...TEST_ARGS,
559-
"--cli",
560-
"--method",
561-
"tools/call",
562-
"--tool-arg",
563-
"message=Hello",
564-
);
565-
566-
// Test 14: CLI mode with tool call but invalid tool args format (should fail)
567-
await runErrorTest(
568-
"invalid_tool_args",
569-
TEST_CMD,
570-
...TEST_ARGS,
571-
"--cli",
572-
"--method",
573-
"tools/call",
574-
"--tool-name",
575-
"echo",
576-
"--tool-arg",
577-
"invalid_format",
578-
);
579-
580-
// Test 15: CLI mode with multiple tool args
581-
await runBasicTest(
582-
"multiple_tool_args",
583-
TEST_CMD,
584-
...TEST_ARGS,
585-
"--cli",
586-
"--method",
587-
"tools/call",
588-
"--tool-name",
589-
"add",
590-
"--tool-arg",
591-
"a=1",
592-
"b=2",
593-
);
594-
595533
console.log(
596534
`\n${colors.YELLOW}=== Running Resource-Related Tests ===${colors.NC}`,
597535
);

0 commit comments

Comments
 (0)