Add selfgraph install for one-command MCP setup
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python, typescript
- Ambito
- cli, developer-experience
Direzione di ricerca
Start with docs/mcp.md and the existing install and error handling in both SDKs; the issue does not name implementation files or tests. Review the JSON agent configs and the proposed TOML table replacement, then agree on the three open credential, TOML, and skill-copy decisions. Done means both SDKs produce matching files, output, flags, and error codes, with tests using a temporary home directory.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Setting up the MCP server is the worst part of trying SelfGraph right now.
You read docs/mcp.md, copy a JSON block, then work out where your agent wants it. Every agent has its own idea:
.mcp.jsonvs.cursor/mcp.jsonvs.vscode/mcp.jsonmcpServersvsservers- Codex uses TOML
Then you have to get the command right: selfgraph mcp if the binary on your PATH is the one you installed, python -m selfgraph mcp if it isn't, npx for the TS package. People get this wrong. Agents setting themselves up get it wrong too.
This should be one command.
What I want
selfgraph install # every agent whose config folder exists here
selfgraph install claude cursor # only these
selfgraph --store kuzu --uri ./graph install codex --global
selfgraph install --dry-run # show what would change, write nothing
selfgraph install --remove # take it back out
| agent | project file | user file (--global) |
|---|---|---|
claude |
.mcp.json |
~/.claude.json |
cursor |
.cursor/mcp.json |
~/.cursor/mcp.json |
vscode |
.vscode/mcp.json |
none |
gemini |
.gemini/settings.json |
~/.gemini/settings.json |
windsurf |
none | ~/.codeium/windsurf/mcp_config.json |
codex |
.codex/config.toml |
~/.codex/config.toml |
Rules:
- Only our entry. Touch the
selfgraphentry and nothing else. Other servers, other keys and comments in the TOML all stay as they are. Running it twice is a no-op. - Broken config. If a config file doesn't parse, leave it alone and fail before writing anything. No half-written state across files.
- Server command. Write the command that actually starts this install. Python writes
selfgraph mcp, orpython -m selfgraph mcpwith the current interpreter when theselfgraphon PATH belongs to a different environment. TS writes itsnpxline. - Connection flags. Flags given on the command line (
--store,--uri,--namespace,--schema) go into the entry'senvasSELFGRAPH_*. Variables that are only set in your shell are not copied, because that surprises people. - Skill. For
claude, also copy the shippedSKILL.mdinto.claude/skills/selfgraph/. - Parity. Same files, same output lines, same flags and same error codes from both SDKs. Every failure gets a code and a hint, with a section in
docs/errors.md, same as everything else now.
Credentials
This is the part I care about most.
.mcp.json and friends get committed. So install must never write a password, a token, or a URI with userinfo into a project file. If you pass one, it fails and tells you to use --global or to set the variable in the agent's own environment. --dry-run output and error messages never print the secret either. This follows the masking rules we just landed.
For --global I lean towards refusing as well, for consistency, but I can see the case for allowing it with a warning. See question 1 below.
Not doing
- Installing SelfGraph itself, or starting a store.
- Agents beyond the six above. Adding one later is a table row and a test.
Plan
I have this working in both SDKs, with tests that run against a temp home dir, so nothing touches the real one. It's around 1,500 lines, so two stacked PRs:
- The JSON agents (
claude,cursor,vscode,gemini,windsurf) plus the skill copy. codex.
Codex is separate because it needs a TOML edit. Python 3.10 has no tomllib, and neither Python nor Node has a TOML writer in the stdlib. So the edit is a small one that replaces our table and keeps every other byte of the file. I'd rather review that on its own than bury it in PR 1.
Questions
- With
--global, refuse credentials like we do for project files, or write them with a warning? - Is a small table-replacing TOML edit OK, or do we want a dependency for it?
- Should the skill copy be opt-out with
--no-skill, or always on forclaude?
- Lingua principale
- TypeScript
- Stelle
- 173
- Fork
- 58
- Merge medio
- 6h
- PR unite (30g)
- 120
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hydra-db/selfgraph
-
approved-for-pr area: cli-mcp area: errors bug effort: S P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
hydra-db/selfgraph#401 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
approved-for-pr area: errors area: store bug effort: S P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
hydra-db/selfgraph#398 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
approved-for-pr area: errors area: write bug effort: S P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
hydra-db/selfgraph#392 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
approved-for-pr area: parity area: write bug effort: S P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
hydra-db/selfgraph#391 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di hydra-db/selfgraph
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
code-yeongyu/senpi#7139 ·
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
lingdojo/kana-dojo#34395 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mastra-ai/mastra#31093 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:web p2 product:business triage:active type:bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
cuadrao-ai/argus#2328 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
nikhilb2/simple_invoicing#907 ·