causly-server 0.0.0-stage → 1.5.0

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.
Files changed (91) hide show
  1. package/.env.example +120 -0
  2. package/CHANGELOG.md +121 -0
  3. package/LICENSE +21 -0
  4. package/README.md +205 -3
  5. package/bin/causly.js +192 -0
  6. package/index.js +229 -0
  7. package/package.json +59 -6
  8. package/packs/calendar.js +141 -0
  9. package/packs/command.js +22 -0
  10. package/packs/database.js +95 -0
  11. package/packs/directory.js +63 -0
  12. package/packs/discord.js +63 -0
  13. package/packs/docker.js +202 -0
  14. package/packs/files.js +106 -0
  15. package/packs/git.js +211 -0
  16. package/packs/github.js +321 -0
  17. package/packs/gmail.js +98 -0
  18. package/packs/leads.js +46 -0
  19. package/packs/linear.js +104 -0
  20. package/packs/loader.js +247 -0
  21. package/packs/manifest.json +1152 -0
  22. package/packs/meetings.js +141 -0
  23. package/packs/notion.js +185 -0
  24. package/packs/pipeline.js +151 -0
  25. package/packs/project.js +70 -0
  26. package/packs/registry.js +149 -0
  27. package/packs/reminders.js +57 -0
  28. package/packs/research.js +34 -0
  29. package/packs/secrets.js +77 -0
  30. package/packs/sentry.js +97 -0
  31. package/packs/seo.js +70 -0
  32. package/packs/slack.js +95 -0
  33. package/packs/stripe.js +127 -0
  34. package/packs/supabase.js +73 -0
  35. package/packs/telegram.js +70 -0
  36. package/packs/terraform.js +247 -0
  37. package/packs/vercel.js +114 -0
  38. package/packs/workflow.js +84 -0
  39. package/prompts/cofounder.js +66 -0
  40. package/prompts/playbooks.js +75 -0
  41. package/tools/backupOps.js +87 -0
  42. package/tools/boundaryAttest.js +184 -0
  43. package/tools/calendarOps.js +563 -0
  44. package/tools/cliOps.js +233 -0
  45. package/tools/commandOps.js +198 -0
  46. package/tools/dbOps.js +117 -0
  47. package/tools/directoryOps.js +96 -0
  48. package/tools/discordOps.js +133 -0
  49. package/tools/dockerOps.js +259 -0
  50. package/tools/envFile.js +89 -0
  51. package/tools/envLoader.js +85 -0
  52. package/tools/fileOps.js +125 -0
  53. package/tools/gitOps.js +170 -0
  54. package/tools/githubOps.js +357 -0
  55. package/tools/gmailOps.js +221 -0
  56. package/tools/googleAuth.js +51 -0
  57. package/tools/googleLogin.js +230 -0
  58. package/tools/leadOps.js +447 -0
  59. package/tools/linearOps.js +304 -0
  60. package/tools/logger.js +47 -0
  61. package/tools/meetingOps.js +697 -0
  62. package/tools/notionOps.js +215 -0
  63. package/tools/paths.js +36 -0
  64. package/tools/pipelineOps.js +511 -0
  65. package/tools/projectOps.js +192 -0
  66. package/tools/reminderAlerts.js +48 -0
  67. package/tools/reminderOps.js +129 -0
  68. package/tools/scheduler.js +46 -0
  69. package/tools/secretsOps.js +133 -0
  70. package/tools/security.js +488 -0
  71. package/tools/sentryOps.js +130 -0
  72. package/tools/seoOps.js +561 -0
  73. package/tools/services.js +295 -0
  74. package/tools/setupOps.js +245 -0
  75. package/tools/slackOps.js +151 -0
  76. package/tools/statusOps.js +104 -0
  77. package/tools/store.js +111 -0
  78. package/tools/stripeOps.js +299 -0
  79. package/tools/supabaseOps.js +94 -0
  80. package/tools/telegramOps.js +153 -0
  81. package/tools/terminal.js +124 -0
  82. package/tools/terraformOps.js +171 -0
  83. package/tools/toolWrapper.js +60 -0
  84. package/tools/toolsetOps.js +123 -0
  85. package/tools/transcribeOps.js +221 -0
  86. package/tools/updateCheck.js +58 -0
  87. package/tools/vercelOps.js +198 -0
  88. package/tools/verifyBoundaryAttest.js +25 -0
  89. package/tools/webOps.js +474 -0
  90. package/tools/workflowOps.js +371 -0
  91. package/tools/workspace.js +85 -0
package/.env.example ADDED
@@ -0,0 +1,120 @@
1
+ # All tokens below are optional — filesystem, git, shell, Terraform, and Docker
2
+ # tools work with no configuration at all. Add only the ones for services you
3
+ # plan to use. See README.md and the docs site for setup details per service.
4
+
5
+ # GitHub — repo/issue/PR tools
6
+ # Create at: https://github.com/settings/tokens?type=beta
7
+ # Needs: Contents (read/write), Issues (read/write), Pull requests (read/write),
8
+ # Administration (read/write, only if you want github_create_repo / github_delete_repo)
9
+ GITHUB_TOKEN=
10
+
11
+ # Vercel — project/deployment tools
12
+ # Create at: https://vercel.com/account/tokens
13
+ VERCEL_TOKEN=
14
+
15
+ # Supabase — project/SQL tools
16
+ # Create at: https://supabase.com/dashboard/account/tokens
17
+ SUPABASE_ACCESS_TOKEN=
18
+
19
+ # Slack — channel/message tools
20
+ # Create a Slack app at: https://api.slack.com/apps -> OAuth & Permissions
21
+ # Bot token scopes needed: channels:read, channels:history, groups:read, groups:history,
22
+ # chat:write, channels:manage, groups:write (for private channel creation), users:read
23
+ # (search:read requires a user token, not bot)
24
+ SLACK_BOT_TOKEN=
25
+
26
+ # Gmail — email tools (OAuth2, not a simple API key)
27
+ # 1. console.cloud.google.com -> new/existing project -> enable "Gmail API"
28
+ # 2. Google Auth Platform -> Branding (app name, support email); Audience -> External, add yourself as a test user
29
+ # 3. Clients -> Create client -> Application type: Desktop app (not "Web application")
30
+ # 4. Put the client id and secret below (or run: causly-server setup), then run:
31
+ # causly-server login google
32
+ # It signs you in with the browser and saves the refresh token for you.
33
+ # 5. In Testing status the token expires after 7 days: Audience -> Publish app avoids that.
34
+ GMAIL_CLIENT_ID=
35
+ GMAIL_CLIENT_SECRET=
36
+ GMAIL_REFRESH_TOKEN=
37
+
38
+ # Google Calendar — event/free-busy tools (same OAuth client as Gmail works)
39
+ # Enable "Google Calendar API" in the same Google Cloud project, then run
40
+ # `causly-server login google`; it saves the refresh token. Client id/secret fall back to GMAIL_CLIENT_*.
41
+ # CALENDAR_CLIENT_ID=
42
+ # CALENDAR_CLIENT_SECRET=
43
+ CALENDAR_REFRESH_TOKEN=
44
+ # Optional IANA timezone for "today"/"tomorrow" and working hours (default: machine zone)
45
+ # CAUSLY_TIMEZONE=Asia/Kolkata
46
+
47
+ # Telegram — alerts and bot messages. No OAuth, just a bot token.
48
+ # 1. Message @BotFather -> /newbot -> copy the token
49
+ # 2. Send any message to your new bot, then call telegram_get_updates to see your chat id
50
+ TELEGRAM_BOT_TOKEN=
51
+ # Chat that telegram_notify writes to (your own chat id)
52
+ TELEGRAM_CHAT_ID=
53
+
54
+ # Linear — issue tools
55
+ # Create at: Linear > Settings > Account > Security & access > Personal API keys
56
+ LINEAR_API_KEY=
57
+
58
+ # Stripe — customers, invoices, payment links, refunds. START WITH TEST MODE.
59
+ # Create at: https://dashboard.stripe.com/test/apikeys (toggle "Test mode" on).
60
+ # A restricted key (rk_test_...) works too; give it only the permissions you need.
61
+ # Live keys (sk_live_/rk_live_) are refused unless STRIPE_ALLOW_LIVE=true.
62
+ STRIPE_API_KEY=
63
+ # STRIPE_ALLOW_LIVE=true
64
+ # Currency used when a tool call does not give one (default usd)
65
+ # STRIPE_DEFAULT_CURRENCY=inr
66
+
67
+ # Discord — read and post in your servers. Bot token only.
68
+ # 1. discord.com/developers/applications -> New Application -> Bot -> Reset Token
69
+ # 2. Bot page: turn on "Message Content Intent" (needed to read other people's text)
70
+ # 3. OAuth2 > URL Generator: scope "bot", permissions View Channels + Read Message History +
71
+ # Send Messages; open the URL to invite the bot to your server
72
+ DISCORD_BOT_TOKEN=
73
+
74
+ # Groq - meeting transcription (Whisper). Free tier at https://console.groq.com/keys
75
+ # Audio is uploaded to Groq only when you confirm a meeting_transcribe call.
76
+ GROQ_API_KEY=
77
+ # GROQ_WHISPER_MODEL=whisper-large-v3-turbo
78
+ # Files above this size need ffmpeg on PATH to be compressed first (default 25)
79
+ # GROQ_MAX_FILE_MB=25
80
+
81
+ # Notion — page/database/block tools
82
+ # Create at: https://www.notion.so/my-integrations
83
+ # Also required: open each page/database in Notion you want accessible, click
84
+ # "..." -> Connections -> add your integration. The API only sees pages/databases
85
+ # explicitly shared with it, even with a valid token.
86
+ NOTION_API_KEY=
87
+
88
+ # Terraform — no token needed here. Just install the Terraform CLI and make
89
+ # sure `terraform` is on your PATH. These tools shell out to the CLI directly.
90
+
91
+ # Docker — no token needed here. Tries `docker` directly first (macOS/Linux/
92
+ # Docker Desktop), falls back to `wsl docker` on Windows if Docker only exists
93
+ # inside WSL.
94
+
95
+ # Postgres / MySQL — no persistent env var. Pass a connection string directly
96
+ # on each call, e.g. postgres://user:pass@host:5432/dbname or
97
+ # mysql://user:pass@host:3306/dbname
98
+
99
+ # Secrets manager — local encrypted secret storage, no external service.
100
+ # Generate a key with:
101
+ # node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
102
+ SECRETS_MASTER_KEY=
103
+ # Only needed temporarily while rotating the master key (see docs) — remove
104
+ # once rotation is complete.
105
+ # SECRETS_MASTER_KEY_NEW=
106
+
107
+ # Sentry — error monitoring/issue tools
108
+ # Create at: https://sentry.io/settings/account/api/auth-tokens/
109
+ # Needs at least project:read + event:read; add event:write for
110
+ # sentry_resolve_issue / sentry_ignore_issue / sentry_add_comment
111
+ SENTRY_AUTH_TOKEN=
112
+
113
+ # BoundaryAttest server receipt POC — optional and disabled by default.
114
+ # The private key must be an operator-controlled Ed25519 PKCS #8 PEM file
115
+ # outside the MCP client. No key or receipt directory is needed when disabled.
116
+ BOUNDARYATTEST_ENABLED=false
117
+ # BOUNDARYATTEST_PRIVATE_KEY=/absolute/path/to/ed25519-private.pem
118
+ # BOUNDARYATTEST_RECEIPT_DIR=/absolute/path/to/receipts
119
+ # Optional subset of the three POC tools (cannot expand beyond this set):
120
+ # BOUNDARYATTEST_TOOLS=ship_change,verify_ci_fix,deploy_project
package/CHANGELOG.md ADDED
@@ -0,0 +1,121 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+
5
+ ## [Unreleased]
6
+
7
+ ### Added
8
+ - Opt-in BoundaryAttest Interop Profile v0.2 `server_attested` receipts for the `ship_change`, `verify_ci_fix`, and `deploy_project` workflow boundary, with RFC 8785/JCS redacted evidence hashes, independent expected-key verification, and focused tests. BoundaryAttest v0.1 remains legacy-only.
9
+
10
+ ### Changed
11
+ - The central wrapper now owns each operation ID and supplies it to the existing audit logger so an optional receipt and normal audit event share one correlation identity. Approval and security semantics are unchanged.
12
+
13
+ ## [1.5.0]
14
+
15
+ ### Added
16
+ - **Notion — new category, 15 tools**: search, page/database CRUD, block append/read/update/delete, comments, users. All live-tested against a real shared Notion page.
17
+ - **Terraform — new category, 20 tools**: full lifecycle (init/validate/fmt/plan/apply/destroy/show/output/workspace), state management (state_list/show/mv/rm/pull/import/taint/untaint), graph/providers, and a CI/CD hook (`terraform_plan_comment` — posts a plan summary as a GitHub PR comment). 17/20 live-tested.
18
+ - **Docker — new category, 18 tools**: ps/images/build/run/stop/start/restart/rm/rmi/logs/inspect/exec/stats/push/pull/compose up-down. Cross-platform — tries `docker` directly first, falls back to `wsl docker` on Windows-only-WSL setups, with automatic Windows-path-to-WSL-path translation for build context, volumes, and compose working directory. 17/18 live-tested.
19
+ - **Generic Postgres/MySQL — new category, 8 tools**: query/list_tables/describe_table/test_connection for each engine, connection-string based. All 8 live-tested against throwaway Docker containers.
20
+ - **Local encrypted secrets manager — new category, 6 tools**: set/get/list/delete/rotate_key/generate_key. AES-256-GCM, local file store, no external service required. All 6 live-tested including a full key-rotation cycle.
21
+ - **Sentry monitoring — new category, 8 tools**: list_projects/list_issues/search_issues/get_issue/resolve_issue/ignore_issue/get_project_stats/add_comment. 5/8 live-tested.
22
+
23
+ Total: 181 tools, up from 106.
24
+
25
+ ### Changed
26
+ - **License: PolyForm Noncommercial 1.0.0 → MIT.** Added `"license": "MIT"` to `package.json`.
27
+ - Removed the temporary `register/` staging folder now that all tool registrations live directly in `index.js`.
28
+ - Simplified `setup.js` — dropped interactive token prompting (tokens are documented/edited directly in `.env`), kept the cross-platform Claude Desktop config auto-update.
29
+ - Updated `CONTRIBUTING.md` and `ROADMAP.md` to reflect the new tool categories and the current Azure/GCP/AWS-deferred stance.
30
+
31
+ ### Fixed
32
+ - Docker: Windows-style paths (`D:\...`) passed to `docker_build`/`docker_run`/`docker_compose_*` broke when the WSL fallback path was used — added automatic path translation to WSL form (`/mnt/d/...`).
33
+ - Secrets manager: default secrets-store path was anchored to `process.cwd()` (the server's launch directory) instead of the repo root, causing an `EPERM` in some launch configurations — now anchored via `import.meta.url`.
34
+ - Sentry: bare `/issues/{id}/` lookups 404'd on the default API host for EU-region (data-residency) organizations even though org/project-scoped endpoints worked fine there — added automatic regional-host fallback on 404.
35
+
36
+ ## [1.4.0]
37
+
38
+ ### Added
39
+ - **Gmail — new category, 8 tools** (OAuth2 refresh-token based): `gmail_get_profile`, `gmail_search`, `gmail_list_messages`, `gmail_get_message`, `gmail_get_thread`, `gmail_send`, `gmail_reply`, `gmail_forward`. Send/reply/forward classified `HIGH` risk (require `confirm: true`); reads classified `READ`.
40
+ - Setup wizard and `.env.example` now document the Gmail OAuth2 flow (Google Cloud Console + OAuth Playground) and prompt for `GMAIL_CLIENT_ID` / `GMAIL_CLIENT_SECRET` / `GMAIL_REFRESH_TOKEN`
41
+
42
+ ### Fixed
43
+ - `slack_list_channels` silently returning only the first page in large workspaces — now paginates via `response_metadata.next_cursor` up to the requested `limit`
44
+ - `.env.example` Slack scope list was missing `groups:write`, required for `slack_create_channel` with `is_private: true`
45
+
46
+ ### Known limitation
47
+ - Gmail tools require OAuth2 credentials (not a simple API key) — one-time setup via Google Cloud Console. All 8 tools tested working live against a real Gmail account.
48
+
49
+ ## [1.3.0]
50
+
51
+ ### Added
52
+ - **Slack — new category, 8 tools** (Web API, bot-token based): `slack_get_user`, `slack_list_channels`, `slack_get_channel`, `slack_read_messages`, `slack_search_messages`, `slack_send_message`, `slack_reply_thread`, `slack_create_channel`. Send/reply/create-channel classified `HIGH` risk (require `confirm: true`); reads classified `READ`.
53
+ - Setup wizard and `.env.example` now prompt for `SLACK_BOT_TOKEN`
54
+
55
+ ### Fixed
56
+ - `slack_get_user` failing with `missing_scope` — Slack app was missing the `users:read` bot scope; documented required scopes in `.env.example`
57
+
58
+ ### Known limitation
59
+ - `slack_search_messages` requires a Slack **user token**, not a bot token — bot tokens return `not_allowed_token_type`. All other Slack tools tested working with a bot token against a live workspace.
60
+
61
+ ## [1.2.0]
62
+
63
+ ### Added
64
+ - **Git — 11 new tools**, completing the primitive layer (20/20): `git_create_branch`, `git_checkout`, `git_merge`, `git_reset`, `git_stash`, `git_show`, `git_remote`, `git_tag`, `git_changed_files`, `git_diff_stat`, `git_check_clean`
65
+ - **GitHub — 18 new tools**, completing PR lifecycle + Actions/CI (27/27): repo/issue get+update, PR get/update/merge, PR files/diff/comments/reviews, branch get/list, workflow list/runs/jobs/logs/rerun
66
+ - **Vercel — 4 new tools**, completing the deployment-verification set (11/11): `vercel_get_deployment_logs`, `vercel_get_deployment_events`, `vercel_cancel_deployment`, `http_check`
67
+ - **Project Intelligence — new category, 7 tools**: `project_detect`, `project_info`, `project_health`, `run_tests`, `run_lint`, `run_typecheck`, `run_build` — auto-detects language/framework/package manager and resolves the right commands instead of guessing
68
+ - **Workflow tools — new category, 4 tools**: `ship_change` (branch → checks → commit → push → PR, one call), `fix_ci` (diagnose a failing CI run with real logs), `verify_ci_fix` (commit/push/poll until green), `deploy_project` (health → tests+build → deploy → poll → HTTP-verify)
69
+ - **Security layer**: permission-level classification (`READ`/`LOW`/`MEDIUM`/`HIGH`/`DESTRUCTIVE`) with an approval gate (`confirm: true`) for risky tools; secret redaction on every log line; graded command-risk classification (force-push, `DROP TABLE`, curl-pipe-bash, etc.); path protection against writing/deleting inside system directories
70
+ - **Structured audit logging** — `logs/activity.log` is now JSONL (one JSON object per line) with operation ID, risk level, redacted input, and duration per call
71
+ - **MCP Resources**: `causly://project/{path}/health`, `/info`, `/git` for direct context reads
72
+ - **MCP Prompts**: `ship-feature`, `fix-ci`, `deploy-project`, `review-changes`
73
+ - `CODE_OF_CONDUCT.md`, `BUILD_LOG.md`, `ROADMAP.md`
74
+
75
+ ### Changed
76
+ - License: MIT → PolyForm Noncommercial 1.0.0
77
+ - README rewritten to reflect the full 78-tool / 8-category surface and the security model
78
+
79
+ ### Fixed
80
+ - `npm run <script>` (and any command relying on Windows' extension-less resolution — `node`, `where`, etc.) failing with `'node' is not recognized`, specifically inside nested `cmd.exe` processes. Root cause: the raw `PATHEXT` env var Claude Desktop passes in had a leading semicolon, producing an empty extension entry that silently broke resolution one process-layer down even though `PATHEXT` looked correct when echoed at the top level. `buildEnv()` now splits/filters/rejoins `PATH` and `PATHEXT` instead of string-concatenating, and resolves the real casing of each key (`Path` vs `PATH`) instead of risking a duplicate.
81
+ - `ship_change` failing outright when its target branch already existed instead of checking it out
82
+
83
+ ## [1.1.3]
84
+
85
+ ### Fixed
86
+ - `vercel_create_deployment` failing with `gitSource missing required property repoId` — Vercel's API requires the numeric GitHub repo ID, not an "owner/repo" string. Now resolves the ID automatically via the GitHub API before calling Vercel.
87
+
88
+ ## [1.1.2]
89
+
90
+ ### Fixed
91
+ - `run_command` occasionally failed with `spawn powershell.exe ENOENT` on Windows because it relied on PATH lookup to find PowerShell, and Claude Desktop's spawned environment doesn't always have a reliable PATH. Now resolves PowerShell via its standard absolute System32 path first, with automatic fallback to a PATH-based lookup and finally `cmd.exe` if PowerShell truly cannot be found.
92
+
93
+ ## [1.1.1]
94
+
95
+ ### Fixed
96
+ - `run_command` was failing to find `node`, `npm`, and other executables on Windows — Claude Desktop launches the server with a stripped-down environment where `PATHEXT` arrives missing standard extensions (`.EXE`, `.CMD`, `.BAT`, etc.), so PowerShell couldn't resolve commands even though they existed and their folder was in `PATH`. Now restores a sane default `PATHEXT` when spawning commands on Windows.
97
+
98
+ ## [1.1.0]
99
+
100
+ ### Added
101
+ - GitHub tools: authenticated user, create/delete/list repos, create/list issues, create/list pull requests, add comment
102
+ - Vercel tools: authenticated user, list/get projects, list/get deployments, create deployment, delete project
103
+ - Supabase tools: list organizations, list/get projects, create/delete project, run raw SQL
104
+ - Interactive setup wizard (`npm run setup`) — configures `.env` tokens and Claude Desktop config automatically
105
+ - `.env.example` template
106
+ - CONTRIBUTING.md, issue/PR templates, CI workflow
107
+
108
+ ### Fixed
109
+ - `move_file` / `copy_file` / `write_file` / `create_file` failing with `EPERM` when the destination directory was a drive root on Windows (e.g. `D:\`)
110
+ - Removed the `dotenv` dependency — its stdout banner was corrupting the MCP stdio JSON-RPC stream, causing "Unexpected token" errors. Replaced with a small dependency-free `.env` parser.
111
+ - `run_command` was running through `cmd.exe` on Windows by default, which can't handle multi-statement scripts or many PowerShell-style commands. Now runs through `powershell.exe` on Windows.
112
+
113
+ ## [1.0.0]
114
+
115
+ ### Added
116
+ - Initial release
117
+ - File tools: read, read multiple, create, write, edit, delete, move, copy, get info
118
+ - Directory tools: list, tree, create, delete, search
119
+ - Git tools: init, status, add, commit, push, pull, log, diff, branch
120
+ - Shell execution tool (`run_command`) with a blocklist of destructive command patterns
121
+ - Local activity logging (`logs/activity.log`)
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kumar Nihal (Causly)
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.
package/README.md CHANGED
@@ -1,3 +1,205 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # Causly Server — Turn Any AI Agent Into Your Technical Co-Founder
2
+
3
+ [![npm](https://img.shields.io/npm/v/causly-server.svg)](https://www.npmjs.com/package/causly-server)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
5
+ [![CI](https://github.com/KNIHAL/causly-server/actions/workflows/ci.yml/badge.svg)](https://github.com/KNIHAL/causly-server/actions/workflows/ci.yml)
6
+ [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)
7
+
8
+ **An open-source MCP server that gives your AI agent the tools of a co-founder: ship code, find leads, track deals, take meeting notes, handle email and your calendar, all from one conversation.**
9
+
10
+ Your agent stops being a chatbot that writes text and starts doing the work: it reads your repo, opens the pull request, finds companies that are hiring, logs them in your pipeline, books the follow-up, and reminds you on Telegram.
11
+
12
+ Everything runs on your machine. Your keys, your data, your approval for anything risky.
13
+
14
+ ## See It In Action
15
+
16
+ [Working Demo](https://github.com/user-attachments/assets/7f4f33e8-2cd4-4c99-ada0-35653bbaa4c4)
17
+
18
+ <img width="1920" height="1020" alt="Causly Server screenshot" src="https://github.com/user-attachments/assets/e9fb7c22-0a0b-4109-a44d-d2106912389f" />
19
+
20
+ ## What You Can Ask
21
+
22
+ Once it is installed, just talk to your agent:
23
+
24
+ - "Find companies hiring React developers and add the best three to my pipeline."
25
+ - "Save notes from my call with Acme: they want a demo next week, follow up on Friday."
26
+ - "What is due this week? Include meeting action items and reminders."
27
+ - "Prep me for my next meeting."
28
+ - "Ship this change: run the checks, open a pull request, and tell me when CI is green."
29
+ - "Audit this page for SEO and suggest keywords."
30
+ - "Find a free slot with this lead on Thursday and send the invite."
31
+
32
+ ## Install
33
+
34
+ Requires Node.js 20 or newer.
35
+
36
+ ```bash
37
+ npm install -g causly-server
38
+ causly-server init
39
+ ```
40
+
41
+ `init` finds Claude Desktop, Cursor and Windsurf on your machine and adds Causly Server to each. Restart your editor and you are done. Using Claude Code instead? `init` prints the one-line command for it.
42
+
43
+ Useful options:
44
+
45
+ ```bash
46
+ causly-server init --client cursor # pick editors instead of auto-detecting
47
+ causly-server init --workspace D:\my-project # limit file tools to one folder
48
+ causly-server init --toolsets research,pipeline,meetings # choose startup packs
49
+ ```
50
+
51
+ ### Add your API keys
52
+
53
+ You only need keys for the services you actually use.
54
+
55
+ ```bash
56
+ causly-server setup # step by step, each key is checked live
57
+ causly-server doctor --test # verify every configured service
58
+ causly-server status # one screen: editors, keys, pipeline, reminders, updates
59
+ ```
60
+
61
+ Keys are stored in `~/.causly/.env` (hidden prompt, never printed back) and picked up without a restart.
62
+
63
+ ## Google Setup (Gmail, Calendar, Search Console)
64
+
65
+ Google needs a one-time OAuth client that you own. It takes about five minutes.
66
+
67
+ 1. Open [Google Cloud Console](https://console.cloud.google.com), create or pick a project.
68
+ 2. Enable the APIs you want: **Gmail API**, **Google Calendar API**, and optionally **Google Search Console API**.
69
+ 3. Go to **Google Auth Platform**. Under **Branding**, fill in the app name and your support email. Under **Audience**, choose **External** and add your own Google account as a test user.
70
+ 4. Go to **Clients → Create client** and choose **Desktop app** as the application type. (A "Web application" client fails with `redirect_uri_mismatch`.) Copy the client ID and secret.
71
+ 5. Save them in Causly: `causly-server setup`, or `causly-server keys set GMAIL_CLIENT_ID` and `causly-server keys set GMAIL_CLIENT_SECRET`.
72
+ 6. Sign in once in your browser:
73
+
74
+ ```bash
75
+ causly-server login google # Gmail and Calendar
76
+ causly-server login google all # also Search Console
77
+ ```
78
+
79
+ ### Avoid the 7-day token expiry: Publish the app
80
+
81
+ While the Google app is in **Testing** status, Google expires the sign-in token every 7 days. You can renew it any time with `causly-server login google`.
82
+
83
+ To stop that for good, go to **Google Auth Platform → Audience** and click **Publish app** (set it to *In production*). This needs the Branding page from step 3 to be filled in first. For personal use you do not need Google verification; at sign-in you will see an "unverified app" warning, which is expected for your own client: choose **Advanced**, then continue.
84
+
85
+ ## Tool Packs
86
+
87
+ Tools are grouped in packs and loaded lazily, so your agent is never flooded with hundreds of tool definitions. The packs below load at startup:
88
+
89
+ | Pack | What it does |
90
+ | --- | --- |
91
+ | **files, directory, command, project** | Read, write, edit and search files; run commands with safety checks; detect your stack and run build, test, lint and typecheck |
92
+ | **research** | Search the web and read pages as clean text |
93
+ | **leads** | Find companies hiring (Hacker News, remote job boards) and public company contact details |
94
+ | **pipeline** | Local sales pipeline: leads, deals, contacts, activity log, report, CSV export |
95
+ | **meetings** | Transcribe recordings, save summaries, track action items, link them to deals and calendar events, prep for calls |
96
+ | **reminders** | Follow-ups saved locally; ask what is due |
97
+ | **seo** | Keyword ideas, page audit, draft check, Search Console |
98
+
99
+ More packs are one command away and load on demand:
100
+
101
+ | Pack | What it does |
102
+ | --- | --- |
103
+ | **calendar, gmail** | Events, free/busy, find meeting slots; search, read, send, reply, forward |
104
+ | **telegram** | Alert yourself, read messages sent to your bot |
105
+ | **git, github, workflow** | Full Git; repos, issues, pull requests, reviews, Actions; `ship_change`, `fix_ci`, `verify_ci_fix`, `deploy_project` |
106
+ | **vercel, docker, terraform** | Deployments and health checks; containers and Compose; plan, apply, state |
107
+ | **database, supabase** | Postgres and MySQL queries and schema; Supabase projects and SQL |
108
+ | **slack, notion, linear** | Channels and threads; pages and databases; issues |
109
+ | **sentry, secrets** | Issue triage; encrypted local secrets store |
110
+
111
+ That is 230+ tools in total. Choose which packs load at startup:
112
+
113
+ ```bash
114
+ causly-server toolsets # show what loads at startup
115
+ causly-server toolsets add github,gmail
116
+ causly-server toolsets remove seo
117
+ causly-server toolsets reset
118
+ ```
119
+
120
+ ### No restart needed: `use_tool`
121
+
122
+ Some editors do not refresh their tool list mid-chat. `use_tool` lets your agent call any tool by name, even one that is not loaded yet; the pack loads automatically and every safety check still applies.
123
+
124
+ ## Workflow Tools
125
+
126
+ Single tools are building blocks. These combine them into verified outcomes:
127
+
128
+ - **`ship_change`**: inspects changes, creates a branch, runs project checks, commits, pushes, opens a pull request.
129
+ - **`fix_ci`**: finds a failing GitHub Actions run and fetches the real failure output.
130
+ - **`verify_ci_fix`**: commits and pushes the fix, polls the workflow, confirms CI is green.
131
+ - **`deploy_project`**: checks health, runs tests and build, deploys, polls, and HTTP-verifies the live URL.
132
+
133
+ ```mermaid
134
+ flowchart TD
135
+ A["You describe a task"] --> B["Agent edits files"]
136
+ B --> C["ship_change runs checks"]
137
+ C --> D["Commit, push, open PR"]
138
+ D --> E{"CI passes?"}
139
+ E -- "No" --> F["fix_ci gets failure logs"]
140
+ F --> G["Agent fixes the code"]
141
+ G --> H["verify_ci_fix pushes and confirms CI"]
142
+ H --> E
143
+ E -- "Yes" --> I["deploy_project deploys"]
144
+ I --> J["HTTP verification"]
145
+ J --> K["Shipped"]
146
+ ```
147
+
148
+ ## Works With
149
+
150
+ Tested with Claude Desktop, Cursor, Windsurf, a plain JavaScript MCP client, and LangChain (JS) through `@langchain/mcp-adapters`. Any MCP-compatible client or agent framework can connect to the same stdio server.
151
+
152
+ ## Security
153
+
154
+ Causly can touch your files, repositories and infrastructure, so the controls live in the server itself.
155
+
156
+ - **Permission levels:** every tool is `READ`, `LOW`, `MEDIUM`, `HIGH` or `DESTRUCTIVE`. `HIGH` and `DESTRUCTIVE` actions (deploys, merges, shell commands, deletes, raw SQL, Terraform apply and destroy, Docker removal) need an explicit `confirm: true`.
157
+ - **Workspace limit:** `init --workspace <folder>` restricts file and command tools to one folder.
158
+ - **Approval for outside actions:** anything that emails real people, such as calendar invites with guests, needs confirmation first.
159
+ - **Secret redaction:** tokens, passwords and API keys are redacted before anything is written to logs.
160
+ - **Command risk checks:** drive wipes, formatting and shutdown commands are blocked; force-pushes, `DROP TABLE`, `curl | bash` and `sudo` are flagged.
161
+ - **Path protection:** writes and deletes inside protected system directories are blocked.
162
+ - **Local encrypted secrets:** AES-256-GCM with a key you control, no external vault.
163
+ - **Activity log:** every call is recorded in `logs/activity.log` as structured JSONL (timestamp, operation ID, risk, status, redacted input, duration).
164
+ - **Your data stays local:** the pipeline, meetings and reminders live in a local SQLite file. `causly-server backup` and `restore` keep it safe.
165
+
166
+ Optional BoundaryAttest receipts for `ship_change`, `verify_ci_fix` and `deploy_project` are described in [the docs](https://agenv.causly.in/docs/server/tools/boundaryattest).
167
+
168
+ ## Command Reference
169
+
170
+ ```text
171
+ causly-server init | status | doctor [--test] | setup [service]
172
+ causly-server keys list | set NAME | unset NAME | open
173
+ causly-server login google [gmail,calendar,gsc|all]
174
+ causly-server toolsets [add|remove|reset]
175
+ causly-server backup [file] | restore <file> [--yes]
176
+ causly-server remove [--client <name>]
177
+ ```
178
+
179
+ ## Known Limitations
180
+
181
+ - `vercel_create_deployment` and `deploy_project` need the Vercel project to be Git-linked already.
182
+ - `supabase_run_sql` uses the Supabase Management API; some personal access tokens get a `403` for SQL.
183
+ - `slack_search_messages` needs a Slack user token with the `search:read` scope.
184
+ - `docker_push` needs registry authentication already configured on the host.
185
+ - Sentry `resolve_issue`, `ignore_issue` and `add_comment` need a token with the `event:write` scope.
186
+ - On Windows, if `npm install` fails with `'node' is not recognized` in a postinstall script, retry with `npm install --ignore-scripts` ([issue #2](https://github.com/KNIHAL/causly-server/issues/2)).
187
+
188
+ ## Documentation, Roadmap, Contributing
189
+
190
+ - Detailed docs: [agenv.causly.in/docs/server](https://agenv.causly.in/docs/server/intro)
191
+ - [ROADMAP.md](./ROADMAP.md), [CONTRIBUTING.md](./CONTRIBUTING.md), [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md), [CHANGELOG.md](./CHANGELOG.md)
192
+
193
+ ## License
194
+
195
+ [MIT](./LICENSE): free to use, modify and distribute, including commercially.
196
+
197
+ ## Want Something Custom Built On This?
198
+
199
+ Need a custom MCP server, a specific integration, or a related service for your product or team? Reach out: **nihal@causly.in**
200
+
201
+ ## Causly Hosted
202
+
203
+ Do not want to run Causly Server yourself? Causly Hosted is a managed version, currently in development.
204
+
205
+ [Join the Causly Hosted waitlist](https://tally.so/r/NpZkpW)