Repository navigation
Add @nodespaceai/mcp: MCP server exposing NodeSpace as AI tools - #1190
Conversation
Code Review SummaryThis PR delivers a clean, thin MCP stdio server wrapping the However, there are two issues that need to be resolved before merge: a correctness bug in FindingsCritical Issues[Critical/Blocker]
export async function listNodes(nodeType: string, limit?: number): Promise<string> {
const args = ['search', nodeType, '--limit', String(limit ?? 50)];
return runCLI(args);
}This invokes The practical result: The fix is one of:
Option 1 is the right fix — it's a one-liner addition to [Critical/Blocker] Publish workflow missing version-stamp step — will fail on second release
- name: Set version from release tag
run: |
TAG="${{ github.event.release.tag_name }}"
npm version "${TAG#v}" --no-git-tag-version
working-directory: packages/agent-toolsWithout this step, publishing a second release will fail with Suggested Improvements[Improvement]
[Improvement] Test coverage gap for
[Improvement]
"quality:fix": "bunx tsc --noEmit"This runs the TypeScript compiler for type checking only. The other packages ( Nitpicks
Acceptance Criteria StatusAgainst issue #1185:
Verdict: Request changes. Fix the |
- Fix listNodes semantic bug: add --type flag to CLI search command so listNodes filters by node type instead of running a semantic search with the type name as the query string - Add version-stamp step to publish-mcp.yml so each release stamps the correct version from the git tag before publishing to npm - Add macOS platform guard to install.ts with helpful manual config instructions for non-macOS users - Add tests for listNodes covering --type arg and default limit Skipped: separate bin entry for install (current argv dispatch works, splitting adds complexity for no practical benefit) Addresses PR #1190 review recommendations. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Review Addressed — commit 1c0ebb8✅ Changes made🔴 listNodes semantic bug (
🔴 Publish workflow missing version-stamp (
🟡 Platform guard in install.ts (
⏭️ Skipped🟢 Separate bin entry for install — the current argv dispatch in Tests: 10/10 ✅ |
Re-Review — commit 1c0ebb8Reviewing only the delta since the original review (commit Verdict: Approve with one minor noteAll three blockers/improvements from the original review are correctly resolved. The implementation is accurate and the tests pass (10/10). One minor observation on the workflow version-stamp approach worth noting for future awareness. Original Issues — Resolution Status[Critical/Blocker] listNodes semantic search bug — FIXED correctly
[Critical/Blocker] Publish workflow missing version-stamp — FIXED
Minor note: the existing [Improvement] install.ts platform guard — FIXED correctly
[Improvement] listNodes test coverage gap — FIXED
[Nit] Separate bin entry for install — Skipped (valid call) Accepted as-is per original review acknowledgment. New Issues in This DeltaNone. The diff is tightly scoped to the four reported items with no unrelated changes introduced. Test ResultsAll 10 tests pass. No regressions. |
#1185) Thin stdio MCP server that wraps the nodespace CLI and exposes six knowledge graph operations as MCP tools — no gRPC dependency, works wherever nodespace is on $PATH. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Fix listNodes semantic bug: add --type flag to CLI search command so listNodes filters by node type instead of running a semantic search with the type name as the query string - Add version-stamp step to publish-mcp.yml so each release stamps the correct version from the git tag before publishing to npm - Add macOS platform guard to install.ts with helpful manual config instructions for non-macOS users - Add tests for listNodes covering --type arg and default limit Skipped: separate bin entry for install (current argv dispatch works, splitting adds complexity for no practical benefit) Addresses PR #1190 review recommendations. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Add missing node_types field (introduced when --type flag was added to the search subcommand) to the struct literal in cli_integration.rs. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
29fc7c1 to
552bd4c
Compare
* Add @nodespaceai/mcp: MCP server exposing NodeSpace as AI tools (closes #1185) Thin stdio MCP server that wraps the nodespace CLI and exposes six knowledge graph operations as MCP tools — no gRPC dependency, works wherever nodespace is on $PATH. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * Address review: fix listNodes, version-stamp workflow, platform guard - Fix listNodes semantic bug: add --type flag to CLI search command so listNodes filters by node type instead of running a semantic search with the type name as the query string - Add version-stamp step to publish-mcp.yml so each release stamps the correct version from the git tag before publishing to npm - Add macOS platform guard to install.ts with helpful manual config instructions for non-macOS users - Add tests for listNodes covering --type arg and default limit Skipped: separate bin entry for install (current argv dispatch works, splitting adds complexity for no practical benefit) Addresses PR #1190 review recommendations. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * Fix SearchArgs initializer in CLI integration test Add missing node_types field (introduced when --type flag was added to the search subcommand) to the struct literal in cli_integration.rs. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Michael Libio <[email protected]> Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Summary
packages/mcp— a new npm package@nodespaceai/mcpthat speaks the MCP stdio protocol and wrapsnodespaceCLI commands as AI toolsnodespace_create_node,nodespace_get_node,nodespace_search,nodespace_list_nodes,nodespace_update_node,nodespace_delete_nodenpx @nodespaceai/mcp installwrites toclaude_desktop_config.json(safe merge);npx @nodespaceai/mcp uninstallremoves the entry.github/workflows/publish-mcp.ymlCI/CD workflow that publishes on release tag or via manual workflow dispatch with dry-run optiontest:mcpand updatesquality:fix/test:allin rootpackage.jsonCloses #1185
Test plan
bun run test:mcp— 8 tests pass covering CLI argument construction and error handlingbun run buildfrompackages/mcp— TypeScript compiles cleanlynpx @nodespaceai/mcp installwrites correct entry toclaude_desktop_config.jsonnpx @nodespaceai/mcp uninstallremoves the entrynodespaceon$PATHand daemon running:npx @nodespaceai/mcpstarts stdio server and accepts tool calls🤖 Generated with Claude Code