Conversation
* Create new @slangroom/mcp package with MCP server implementation * Add basic MCP server with resource listing capabilities * Include package.json, tsconfig.json, and build configuration * Add README.md with package documentation * Update CRUSH.md with development guidelines This package provides an MCP server that helps developers and AI assistants write Slangroom contracts by providing context-aware assistance, documentation, and development tools. 💘 Generated with Crush Co-Authored-By: Crush <crush@charm.land>
* Document MCP server features and usage * Include installation and development instructions * Provide overview of Slangroom MCP capabilities 💘 Generated with Crush Co-Authored-By: Crush <crush@charm.land>
Build a real MCP server for drafting and validating Slangroom scripts from the repository's live syntax reference, examples, and tests. - index statement definitions from docs/statements and plugin coverage - expose MCP tools for listing statements, searching sources, drafting contracts, and validating syntax - add MCP resources for syntax reference and example/test contract bundles - add automated tests for tool behavior and contract validation flows - add a standalone CLI entrypoint for running the MCP server
d6121c8 to
487b274
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new @slangroom/mcp workspace package that exposes Slangroom contract knowledge through an MCP server, plus supporting test, dependency, and tooling updates.
Changes:
- Adds MCP server implementation, CLI entrypoint, catalog/search/draft/validation helpers, package metadata, README, and tests.
- Updates Playwright configuration/dependency and pins pnpm in
mise.toml. - Skips two existing DCQL e2e tests and updates the lockfile for new/changed dependencies.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
AGENTS.md.license |
Adds SPDX sidecar metadata. |
mise.toml |
Pins pnpm to 9.15.9. |
pnpm-lock.yaml |
Adds MCP SDK dependency tree and updates Playwright lock entries. |
pkg/browser/package.json |
Updates Playwright test dependency. |
pkg/browser/playwright.config.ts |
Adjusts http-server invocation and CI reporter. |
pkg/dcql/test/e2e.ts |
Skips two DCQL ldp_vc-related e2e tests. |
pkg/mcp/.npmignore |
Adds package publish ignore rules. |
pkg/mcp/README.md |
Documents the new MCP package. |
pkg/mcp/README.md.license |
Adds SPDX sidecar metadata. |
pkg/mcp/package.json |
Defines the new MCP package metadata, dependencies, exports, and bin. |
pkg/mcp/package.json.license |
Adds SPDX sidecar metadata. |
pkg/mcp/src/catalog.ts |
Implements knowledge-base loading, statement/source search, validation, and draft generation. |
pkg/mcp/src/cli.ts |
Adds stdio MCP server CLI entrypoint. |
pkg/mcp/src/index.ts |
Re-exports package APIs. |
pkg/mcp/src/server.ts |
Implements MCP tools and resources. |
pkg/mcp/test/index.ts |
Adds MCP package integration tests. |
pkg/mcp/tsconfig.json |
Adds TypeScript configuration for the package. |
pkg/mcp/tsconfig.json.license |
Adds SPDX sidecar metadata. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| node_modules | ||
| *.tsbuildinfo | ||
| build |
Comment on lines
+149
to
+162
| export const resolveRepoRoot = async (): Promise<string> => { | ||
| let currentDir = path.dirname(fileURLToPath(import.meta.url)); | ||
| for (let i = 0; i < 8; i += 1) { | ||
| try { | ||
| await fs.access(path.join(currentDir, 'docs', 'statements', 'index.md')); | ||
| await fs.access(path.join(currentDir, 'examples')); | ||
| return currentDir; | ||
| } catch { | ||
| const parent = path.dirname(currentDir); | ||
| if (parent === currentDir) break; | ||
| currentDir = parent; | ||
| } | ||
| } | ||
| throw new Error('Unable to resolve the slangroom repository root'); |
| }); | ||
|
|
||
| test('ldp_vc', async (t) => { | ||
| test.skip('ldp_vc', async (t) => { |
| }); | ||
|
|
||
| test('dc+sd-jwt & ldp_vc', async (t) => { | ||
| test.skip('dc+sd-jwt & ldp_vc', async (t) => { |
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.
This PR adds a new @slangroom/mcp package that provides an MCP (Model Context Protocol) server to help developers and AI assistants write Slangroom contracts.
Features:
The MCP server can be used with AI coding assistants that support the Model Context Protocol to provide context-aware assistance for Slangroom contract development.
悆 Generated with Crush
Co-Authored-By: Crush crush@charm.land