feat(mcp-server): runtime resource lookup + path guards (#72)#87
Merged
Conversation
MCP server exposes loop-engineering patterns, skills, state, budget,
and safety docs as queryable resources via Model Context Protocol.
Agents can query what they need on-demand instead of prompt stuffing.
Resources: registry, config, budget, run-log, safety, patterns/{id},
skills/{name}, state/{file}
Tools: list_patterns, list_skills, list_state_files, get_pattern,
get_skill, get_state, recommend_pattern, estimate_cost
Includes 16 tests, CI gate integration, and MCP config example.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…ation tests zod was imported in src/index.ts but only resolved transitively via @modelcontextprotocol/sdk, so the build could break if the SDK changed its zod range. Declare it explicitly in dependencies. Add 4 integration tests that spawn the real server over stdio and exercise the index.ts tool/resource handlers (tools/list, loop_list_patterns, loop_estimate_cost, pattern resource read), complementing the existing resolver-level unit tests. Suite now 20/20 passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Allowlist pattern IDs via registry / patterns dir listing - Allowlist state files; reject .. / slashes in user-supplied segments - Add regression tests for traversal attempts - Cross-link from README, primitives matrix, examples README - Document repo-only v1 install in mcp-server README Builds on community PR #72 by @KhaiTrang1995
8 tasks
Contributor
Loop Readiness AuditScore: 100/100 (L3) Strong loop readiness — good candidate for L3 with explicit gates. Top suggestions
Posted by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on community PR #72 by @KhaiTrang1995, rebased onto
main(post-#86).From #72
@cobusgreyling/loop-mcp-server— patterns, skills, state, budget, safety as MCP resources/toolsexamples/mcp/loop-engineering.mcp.jsonMaintainer additions (review feedback)
../ slashestools/mcp-server/README.md)Verification
npm run test:tools✓ (includingtest:mcp-server)bash scripts/ci-validate-gates.sh✓Supersedes #72 — thanks @KhaiTrang1995!