@evantahler/mcpx 0.15.0 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/package.json +1 -1
- package/.claude/settings.local.json +0 -18
- package/.claude/worktrees/elastic-jennings/.claude/settings.local.json +0 -18
- package/.claude/worktrees/elastic-jennings/.claude/skills/mcpcli.md +0 -93
- package/.claude/worktrees/elastic-jennings/.github/workflows/auto-release.yml +0 -117
- package/.claude/worktrees/elastic-jennings/.github/workflows/ci.yml +0 -18
- package/.claude/worktrees/elastic-jennings/.prettierignore +0 -4
- package/.claude/worktrees/elastic-jennings/.prettierrc +0 -7
- package/.claude/worktrees/elastic-jennings/CLAUDE.md +0 -19
- package/.claude/worktrees/elastic-jennings/LICENSE +0 -21
- package/.claude/worktrees/elastic-jennings/README.md +0 -487
- package/.claude/worktrees/elastic-jennings/bun.lock +0 -381
- package/.claude/worktrees/elastic-jennings/install.sh +0 -55
- package/.claude/worktrees/elastic-jennings/package.json +0 -56
- package/.claude/worktrees/elastic-jennings/src/cli.ts +0 -39
- package/.claude/worktrees/elastic-jennings/src/client/http.ts +0 -100
- package/.claude/worktrees/elastic-jennings/src/client/manager.ts +0 -266
- package/.claude/worktrees/elastic-jennings/src/client/oauth.ts +0 -299
- package/.claude/worktrees/elastic-jennings/src/client/stdio.ts +0 -12
- package/.claude/worktrees/elastic-jennings/src/commands/add.ts +0 -155
- package/.claude/worktrees/elastic-jennings/src/commands/auth.ts +0 -114
- package/.claude/worktrees/elastic-jennings/src/commands/exec.ts +0 -91
- package/.claude/worktrees/elastic-jennings/src/commands/index.ts +0 -62
- package/.claude/worktrees/elastic-jennings/src/commands/info.ts +0 -38
- package/.claude/worktrees/elastic-jennings/src/commands/list.ts +0 -30
- package/.claude/worktrees/elastic-jennings/src/commands/remove.ts +0 -67
- package/.claude/worktrees/elastic-jennings/src/commands/search.ts +0 -45
- package/.claude/worktrees/elastic-jennings/src/commands/skill.ts +0 -70
- package/.claude/worktrees/elastic-jennings/src/config/env.ts +0 -41
- package/.claude/worktrees/elastic-jennings/src/config/loader.ts +0 -156
- package/.claude/worktrees/elastic-jennings/src/config/schemas.ts +0 -137
- package/.claude/worktrees/elastic-jennings/src/context.ts +0 -53
- package/.claude/worktrees/elastic-jennings/src/output/formatter.ts +0 -316
- package/.claude/worktrees/elastic-jennings/src/output/logger.ts +0 -114
- package/.claude/worktrees/elastic-jennings/src/search/index.ts +0 -69
- package/.claude/worktrees/elastic-jennings/src/search/indexer.ts +0 -92
- package/.claude/worktrees/elastic-jennings/src/search/keyword.ts +0 -86
- package/.claude/worktrees/elastic-jennings/src/search/semantic.ts +0 -75
- package/.claude/worktrees/elastic-jennings/src/search/staleness.ts +0 -8
- package/.claude/worktrees/elastic-jennings/src/validation/schema.ts +0 -77
- package/.claude/worktrees/elastic-jennings/test/cli.test.ts +0 -51
- package/.claude/worktrees/elastic-jennings/test/client/manager.test.ts +0 -249
- package/.claude/worktrees/elastic-jennings/test/client/oauth.test.ts +0 -328
- package/.claude/worktrees/elastic-jennings/test/commands/add-remove.test.ts +0 -253
- package/.claude/worktrees/elastic-jennings/test/commands/exec.test.ts +0 -105
- package/.claude/worktrees/elastic-jennings/test/commands/info.test.ts +0 -48
- package/.claude/worktrees/elastic-jennings/test/commands/list.test.ts +0 -39
- package/.claude/worktrees/elastic-jennings/test/commands/skill.test.ts +0 -98
- package/.claude/worktrees/elastic-jennings/test/config/env.test.ts +0 -61
- package/.claude/worktrees/elastic-jennings/test/config/loader.test.ts +0 -139
- package/.claude/worktrees/elastic-jennings/test/fixtures/.keep +0 -0
- package/.claude/worktrees/elastic-jennings/test/fixtures/auth.json +0 -10
- package/.claude/worktrees/elastic-jennings/test/fixtures/mock-config/.keep +0 -0
- package/.claude/worktrees/elastic-jennings/test/fixtures/mock-config/servers.json +0 -8
- package/.claude/worktrees/elastic-jennings/test/fixtures/mock-server.ts +0 -113
- package/.claude/worktrees/elastic-jennings/test/fixtures/search.json +0 -15
- package/.claude/worktrees/elastic-jennings/test/fixtures/servers.json +0 -18
- package/.claude/worktrees/elastic-jennings/test/integration/stdio-server.test.ts +0 -149
- package/.claude/worktrees/elastic-jennings/test/output/formatter.test.ts +0 -54
- package/.claude/worktrees/elastic-jennings/test/output/logger.test.ts +0 -89
- package/.claude/worktrees/elastic-jennings/test/search/indexer.test.ts +0 -32
- package/.claude/worktrees/elastic-jennings/test/search/keyword.test.ts +0 -80
- package/.claude/worktrees/elastic-jennings/test/search/semantic.test.ts +0 -32
- package/.claude/worktrees/elastic-jennings/test/validation/schema.test.ts +0 -113
- package/.claude/worktrees/elastic-jennings/tsconfig.json +0 -29
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A command-line interface for MCP servers. **curl for MCP.**
|
|
4
4
|
|
|
5
|
+
The internet is debating CLI vs MCP like they're competitors. [They're not.](https://arcade.dev/blog/curl-for-mcp)
|
|
6
|
+
|
|
5
7
|
Two audiences:
|
|
6
8
|
|
|
7
9
|
1. **AI/LLM agents** that prefer shelling out over maintaining persistent MCP connections — better for token management, progressive tool discovery, and sharing a single pool of MCP servers across multiple agents on one machine
|
|
@@ -622,6 +624,10 @@ bun lint
|
|
|
622
624
|
|
|
623
625
|
Inspired by [mcp-cli](https://github.com/philschmid/mcp-cli) by Phil Schmid, which nails the core DX of a shell-friendly MCP client. mcpx extends that foundation with OAuth support for HTTP servers and semantic tool search.
|
|
624
626
|
|
|
627
|
+
## Why mcpx?
|
|
628
|
+
|
|
629
|
+
The full story: [curl for MCP: Why Coding Agents Are Happier Using the CLI](https://arcade.dev/blog/curl-for-mcp)
|
|
630
|
+
|
|
625
631
|
## License
|
|
626
632
|
|
|
627
633
|
MIT
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"WebFetch(domain:github.com)",
|
|
5
|
-
"Bash(bun lint:*)",
|
|
6
|
-
"Bash(bun:*)",
|
|
7
|
-
"WebFetch(domain:docs.arcade.dev)",
|
|
8
|
-
"Bash(grep:*)",
|
|
9
|
-
"WebSearch",
|
|
10
|
-
"Bash(wc:*)",
|
|
11
|
-
"Bash(gh release:*)",
|
|
12
|
-
"Bash(gh run:*)",
|
|
13
|
-
"Bash(mcpcli search:*)",
|
|
14
|
-
"Bash(mcpcli call:*)",
|
|
15
|
-
"Bash(mcpcli:*)"
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"WebFetch(domain:github.com)",
|
|
5
|
-
"Bash(bun lint:*)",
|
|
6
|
-
"Bash(bun:*)",
|
|
7
|
-
"WebFetch(domain:docs.arcade.dev)",
|
|
8
|
-
"Bash(grep:*)",
|
|
9
|
-
"WebSearch",
|
|
10
|
-
"Bash(wc:*)",
|
|
11
|
-
"Bash(gh release:*)",
|
|
12
|
-
"Bash(gh run:*)",
|
|
13
|
-
"Bash(mcpcli search:*)",
|
|
14
|
-
"Bash(mcpcli call:*)",
|
|
15
|
-
"Bash(mcpcli:*)"
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: mcpcli
|
|
3
|
-
description: Discover and use MCP tools via the mcpcli CLI
|
|
4
|
-
trigger: when the user wants to interact with external services, APIs, or MCP tools
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# mcpcli — MCP Tool Discovery and Execution
|
|
8
|
-
|
|
9
|
-
You have access to external tools via `mcpcli`. Use this workflow:
|
|
10
|
-
|
|
11
|
-
## 1. Search for tools
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
mcpcli search "<what you want to do>"
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## 2. Inspect the tool schema
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
mcpcli info <server> <tool>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
This shows parameters, types, required fields, and the full JSON Schema.
|
|
24
|
-
|
|
25
|
-
## 3. Execute the tool
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
mcpcli exec <server> <tool> '<json args>'
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Rules
|
|
32
|
-
|
|
33
|
-
- Always search before executing — don't assume tool names exist
|
|
34
|
-
- Always inspect the schema before executing — validate you have the right arguments
|
|
35
|
-
- Use `mcpcli search -k` for exact name matching
|
|
36
|
-
- Pipe results through `jq` when you need to extract specific fields
|
|
37
|
-
- Use `-v` for verbose HTTP debugging if an exec fails unexpectedly
|
|
38
|
-
|
|
39
|
-
## Examples
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
# Find tools related to sending messages
|
|
43
|
-
mcpcli search "send a message"
|
|
44
|
-
|
|
45
|
-
# See what parameters Slack_SendMessage needs
|
|
46
|
-
mcpcli info arcade Slack_SendMessage
|
|
47
|
-
|
|
48
|
-
# Send a message
|
|
49
|
-
mcpcli exec arcade Slack_SendMessage '{"channel":"#general","message":"hello"}'
|
|
50
|
-
|
|
51
|
-
# Chain commands — search repos and read the first result
|
|
52
|
-
mcpcli exec github search_repositories '{"query":"mcp"}' \
|
|
53
|
-
| jq -r '.content[0].text | fromjson | .items[0].full_name' \
|
|
54
|
-
| xargs -I {} mcpcli exec github get_file_contents '{"owner":"{}","path":"README.md"}'
|
|
55
|
-
|
|
56
|
-
# Read args from stdin
|
|
57
|
-
echo '{"path":"./README.md"}' | mcpcli exec filesystem read_file
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Authentication
|
|
61
|
-
|
|
62
|
-
Some HTTP servers require OAuth. If you see an "Not authenticated" error:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
mcpcli auth <server> # authenticate via browser
|
|
66
|
-
mcpcli auth <server> -s # check token status and TTL
|
|
67
|
-
mcpcli auth <server> -r # force token refresh
|
|
68
|
-
mcpcli deauth <server> # remove stored auth
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Available commands
|
|
72
|
-
|
|
73
|
-
| Command | Purpose |
|
|
74
|
-
| -------------------------------------- | --------------------------------- |
|
|
75
|
-
| `mcpcli` | List all servers and tools |
|
|
76
|
-
| `mcpcli -d` | List with descriptions |
|
|
77
|
-
| `mcpcli info <server>` | Show tools for a server |
|
|
78
|
-
| `mcpcli info <server> <tool>` | Show tool schema |
|
|
79
|
-
| `mcpcli exec <server>` | List tools for a server |
|
|
80
|
-
| `mcpcli exec <server> <tool> '<json>'` | Execute a tool |
|
|
81
|
-
| `mcpcli search "<query>"` | Search tools (keyword + semantic) |
|
|
82
|
-
| `mcpcli search -k "<pattern>"` | Keyword/glob search only |
|
|
83
|
-
| `mcpcli search -q "<query>"` | Semantic search only |
|
|
84
|
-
| `mcpcli index` | Build/rebuild search index |
|
|
85
|
-
| `mcpcli index -i` | Show index status |
|
|
86
|
-
| `mcpcli auth <server>` | Authenticate with OAuth |
|
|
87
|
-
| `mcpcli auth <server> -s` | Check token status and TTL |
|
|
88
|
-
| `mcpcli auth <server> -r` | Force token refresh |
|
|
89
|
-
| `mcpcli deauth <server>` | Remove stored authentication |
|
|
90
|
-
| `mcpcli add <name> --command <cmd>` | Add a stdio MCP server |
|
|
91
|
-
| `mcpcli add <name> --url <url>` | Add an HTTP MCP server |
|
|
92
|
-
| `mcpcli remove <name>` | Remove an MCP server |
|
|
93
|
-
| `mcpcli skill install --claude` | Install mcpcli skill for Claude |
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
name: Auto Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
permissions:
|
|
9
|
-
contents: write
|
|
10
|
-
id-token: write
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
check-version:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
outputs:
|
|
16
|
-
should_release: ${{ steps.check.outputs.should_release }}
|
|
17
|
-
tag: ${{ steps.version.outputs.tag }}
|
|
18
|
-
version: ${{ steps.version.outputs.version }}
|
|
19
|
-
steps:
|
|
20
|
-
- uses: actions/checkout@v4
|
|
21
|
-
|
|
22
|
-
- name: Get version from package.json
|
|
23
|
-
id: version
|
|
24
|
-
run: |
|
|
25
|
-
VERSION=$(jq -r .version package.json)
|
|
26
|
-
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
27
|
-
echo "tag=v$VERSION" >> "$GITHUB_OUTPUT"
|
|
28
|
-
|
|
29
|
-
- name: Check if release exists
|
|
30
|
-
id: check
|
|
31
|
-
run: |
|
|
32
|
-
if gh release view "${{ steps.version.outputs.tag }}" &>/dev/null; then
|
|
33
|
-
echo "should_release=false" >> "$GITHUB_OUTPUT"
|
|
34
|
-
else
|
|
35
|
-
echo "should_release=true" >> "$GITHUB_OUTPUT"
|
|
36
|
-
fi
|
|
37
|
-
env:
|
|
38
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
39
|
-
|
|
40
|
-
create-release:
|
|
41
|
-
needs: check-version
|
|
42
|
-
if: needs.check-version.outputs.should_release == 'true'
|
|
43
|
-
runs-on: ubuntu-latest
|
|
44
|
-
steps:
|
|
45
|
-
- uses: actions/checkout@v4
|
|
46
|
-
- name: Create release
|
|
47
|
-
run: |
|
|
48
|
-
gh release create "${{ needs.check-version.outputs.tag }}" \
|
|
49
|
-
--title "${{ needs.check-version.outputs.tag }}" \
|
|
50
|
-
--generate-notes
|
|
51
|
-
env:
|
|
52
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
53
|
-
|
|
54
|
-
ci:
|
|
55
|
-
needs: [check-version, create-release]
|
|
56
|
-
if: needs.check-version.outputs.should_release == 'true'
|
|
57
|
-
runs-on: ubuntu-latest
|
|
58
|
-
steps:
|
|
59
|
-
- uses: actions/checkout@v4
|
|
60
|
-
- uses: oven-sh/setup-bun@v2
|
|
61
|
-
with:
|
|
62
|
-
bun-version: latest
|
|
63
|
-
- run: bun install --frozen-lockfile
|
|
64
|
-
- run: bun lint
|
|
65
|
-
- run: bun test
|
|
66
|
-
|
|
67
|
-
publish-npm:
|
|
68
|
-
needs: [check-version, ci]
|
|
69
|
-
if: needs.check-version.outputs.should_release == 'true'
|
|
70
|
-
runs-on: ubuntu-latest
|
|
71
|
-
permissions:
|
|
72
|
-
contents: read
|
|
73
|
-
id-token: write
|
|
74
|
-
steps:
|
|
75
|
-
- uses: actions/checkout@v4
|
|
76
|
-
- uses: oven-sh/setup-bun@v2
|
|
77
|
-
with:
|
|
78
|
-
bun-version: latest
|
|
79
|
-
- uses: actions/setup-node@v4
|
|
80
|
-
with:
|
|
81
|
-
node-version: 22
|
|
82
|
-
registry-url: https://registry.npmjs.org
|
|
83
|
-
- run: npm install -g npm@latest
|
|
84
|
-
- run: bun install --frozen-lockfile
|
|
85
|
-
- run: npm publish --provenance --access public
|
|
86
|
-
|
|
87
|
-
build-binaries:
|
|
88
|
-
needs: [check-version, ci]
|
|
89
|
-
if: needs.check-version.outputs.should_release == 'true'
|
|
90
|
-
runs-on: ubuntu-latest
|
|
91
|
-
strategy:
|
|
92
|
-
matrix:
|
|
93
|
-
include:
|
|
94
|
-
- target: bun-darwin-arm64
|
|
95
|
-
artifact: mcpcli-darwin-arm64
|
|
96
|
-
- target: bun-darwin-x64
|
|
97
|
-
artifact: mcpcli-darwin-x64
|
|
98
|
-
- target: bun-linux-arm64
|
|
99
|
-
artifact: mcpcli-linux-arm64
|
|
100
|
-
- target: bun-linux-x64
|
|
101
|
-
artifact: mcpcli-linux-x64
|
|
102
|
-
steps:
|
|
103
|
-
- uses: actions/checkout@v4
|
|
104
|
-
- uses: oven-sh/setup-bun@v2
|
|
105
|
-
with:
|
|
106
|
-
bun-version: latest
|
|
107
|
-
- run: bun install --frozen-lockfile
|
|
108
|
-
- name: Build binary
|
|
109
|
-
run: |
|
|
110
|
-
bun build --compile --minify --sourcemap \
|
|
111
|
-
--target=${{ matrix.target }} \
|
|
112
|
-
--define BUILD_VERSION="'\"${{ needs.check-version.outputs.version }}\"'" \
|
|
113
|
-
./src/cli.ts --outfile dist/${{ matrix.artifact }}
|
|
114
|
-
- name: Upload to release
|
|
115
|
-
run: gh release upload "${{ needs.check-version.outputs.tag }}" dist/${{ matrix.artifact }} --clobber
|
|
116
|
-
env:
|
|
117
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
check:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
- uses: oven-sh/setup-bun@v2
|
|
14
|
-
with:
|
|
15
|
-
bun-version: latest
|
|
16
|
-
- run: bun install --frozen-lockfile
|
|
17
|
-
- run: bun lint
|
|
18
|
-
- run: bun test
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
## Project
|
|
4
|
-
|
|
5
|
-
mcpcli — A CLI for MCP servers. "curl for MCP."
|
|
6
|
-
|
|
7
|
-
## Commands
|
|
8
|
-
|
|
9
|
-
- `bun run dev` — Run in development mode
|
|
10
|
-
- `bun test` — Run tests
|
|
11
|
-
- `bun lint` — Check formatting (prettier)
|
|
12
|
-
- `bun format` — Auto-fix formatting
|
|
13
|
-
- `bun run build` — Build single binary
|
|
14
|
-
|
|
15
|
-
## Rules
|
|
16
|
-
|
|
17
|
-
- **Always bump the patch version in `package.json`** when making any code changes (source, tests, config). Use semver: patch for fixes/small changes, minor for new features, major for breaking changes.
|
|
18
|
-
- **Always keep `README.md` and `.claude/skills/mcpcli.md` in sync** with any CLI changes (commands, flags, syntax, examples). The skill file includes workflow steps, code examples, and a command table that must all reflect the current CLI surface.
|
|
19
|
-
- **Always run `bun run format`** before committing to fix prettier formatting issues.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Evan Tahler
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|