@brainmcp/brainmcp 0.1.0 → 0.1.1
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 +106 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# `@brainmcp/brainmcp`
|
|
2
|
+
|
|
3
|
+
Safely configure [brain / brainmcp](https://www.brainmcp.ai) project guidance and MCP connections for agent clients.
|
|
4
|
+
|
|
5
|
+
The binary name is `brainmcp`. Prefer `npx @brainmcp/brainmcp` so you always get the published package.
|
|
6
|
+
|
|
7
|
+
Full client walkthroughs: [Quickstart](https://www.brainmcp.ai/docs/quickstart) · [Claude Code](https://www.brainmcp.ai/docs/connect-claude-code) · [Cursor](https://www.brainmcp.ai/docs/connect-cursor) · [Codex](https://www.brainmcp.ai/docs/connect-codex) · [VS Code](https://www.brainmcp.ai/docs/connect-vscode)
|
|
8
|
+
|
|
9
|
+
## Quickstart
|
|
10
|
+
|
|
11
|
+
From your project root:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @brainmcp/brainmcp init --client claude-code --yes
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Pin a workspace when this repo should default to one:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx @brainmcp/brainmcp init --client cursor --workspace <workspace-id> --yes
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then complete OAuth in the client browser flow. No API keys or OAuth secrets are written to config files.
|
|
24
|
+
|
|
25
|
+
Verify the install:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx @brainmcp/brainmcp doctor --client cursor
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Ask the agent: `use brain to give me an overview of the workspace`. In the [dashboard Connect view](https://dash.brainmcp.ai/connect), status should flip from *waiting for first call* to **Agent seen … ago**.
|
|
32
|
+
|
|
33
|
+
## Commands
|
|
34
|
+
|
|
35
|
+
| Command | What it does |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `init` | Preview and write MCP config + instruction file for a client |
|
|
38
|
+
| `doctor` | Check placement, endpoint, managed markers, and OAuth discovery |
|
|
39
|
+
| `print` | Print the canonical config and guidance without writing |
|
|
40
|
+
| `remove` | Preview and remove BrainMCP-managed blocks |
|
|
41
|
+
|
|
42
|
+
Every mutation shows a diff and asks for confirmation unless you pass `--yes`.
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
brainmcp init [--client <client>] [--workspace <id>] [--scope project|user] [--yes]
|
|
46
|
+
brainmcp doctor [--client <client>] [--workspace <id>] [--scope project|user]
|
|
47
|
+
brainmcp print [--client <client>] [--workspace <id>] [--scope project|user]
|
|
48
|
+
brainmcp remove [--client <client>] [--scope project|user] [--yes]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Clients
|
|
52
|
+
|
|
53
|
+
| `--client` | MCP config | Guidance file |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| `claude-code` | `.mcp.json` | `CLAUDE.md` |
|
|
56
|
+
| `cursor` | `.cursor/mcp.json` | `.cursor/rules/brainmcp-workspace.mdc` |
|
|
57
|
+
| `codex` | `.codex/config.toml` | `AGENTS.md` |
|
|
58
|
+
| `vscode` | `.vscode/mcp.json` | `AGENTS.md` |
|
|
59
|
+
| `generic` | `.mcp.json` | `AGENTS.md` |
|
|
60
|
+
|
|
61
|
+
If you omit `--client`, the CLI detects a single obvious client from the project. Multiple matches require an explicit `--client`.
|
|
62
|
+
|
|
63
|
+
### Scope
|
|
64
|
+
|
|
65
|
+
- `project` (default) — write under the current repository
|
|
66
|
+
- `user` — write under your home directory (explicit opt-in)
|
|
67
|
+
|
|
68
|
+
### Workspace
|
|
69
|
+
|
|
70
|
+
`--workspace <id>` embeds the workspace id in the managed guidance block so agents orient to that workspace. Without it, `brain_workspace_overview` may use the authorization’s default workspace; agents should call `brain_workspaces_list` when the target is unclear.
|
|
71
|
+
|
|
72
|
+
## Examples
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Claude Code — project-local
|
|
76
|
+
npx @brainmcp/brainmcp init --client claude-code --yes
|
|
77
|
+
|
|
78
|
+
# Cursor — with workspace pin
|
|
79
|
+
npx @brainmcp/brainmcp init --client cursor --workspace ws_abc --yes
|
|
80
|
+
|
|
81
|
+
# Codex
|
|
82
|
+
npx @brainmcp/brainmcp init --client codex --yes
|
|
83
|
+
|
|
84
|
+
# Preview only
|
|
85
|
+
npx @brainmcp/brainmcp print --client vscode
|
|
86
|
+
|
|
87
|
+
# Remove managed config
|
|
88
|
+
npx @brainmcp/brainmcp remove --client cursor --yes
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## What gets written
|
|
92
|
+
|
|
93
|
+
- Canonical MCP endpoint: `https://mcp.brainmcp.ai/mcp` (server name `brain`)
|
|
94
|
+
- Managed instruction markers (`brainmcp:managed:start` / `end`) so later `init` / `remove` can update safely
|
|
95
|
+
- No embedded OAuth secrets — tokens come from the browser consent flow
|
|
96
|
+
|
|
97
|
+
Prefer a maintained plugin when your client offers one (Claude Code / Cursor). Use this CLI for project-local, reviewable setup or clients without a plugin.
|
|
98
|
+
|
|
99
|
+
## Requirements
|
|
100
|
+
|
|
101
|
+
- Node.js 22+
|
|
102
|
+
- A [brain](https://dash.brainmcp.ai) account and workspace for OAuth
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainmcp/brainmcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Safely configure BrainMCP project guidance and MCP connections",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"brainmcp": "
|
|
7
|
+
"brainmcp": "dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|