Skip to content

Add MCP package for Slangroom contract development assistance#270

Open
puria wants to merge 8 commits into
mainfrom
mcp
Open

Add MCP package for Slangroom contract development assistance#270
puria wants to merge 8 commits into
mainfrom
mcp

Conversation

@puria

@puria puria commented Sep 11, 2025

Copy link
Copy Markdown
Member

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:

  • Basic MCP server implementation
  • Resource listing for Slangroom and Zencode documentation
  • Package structure following Slangroom conventions
  • Build configuration and README documentation

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

puria and others added 2 commits September 11, 2025 16:54
* 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>
@puria puria marked this pull request as draft September 11, 2025 21:21
puria added 3 commits April 15, 2026 11:46
  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
@puria puria marked this pull request as ready for review April 15, 2026 16:38
@gasbasd gasbasd force-pushed the mcp branch 2 times, most recently from d6121c8 to 487b274 Compare May 18, 2026 10:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pkg/mcp/.npmignore

node_modules
*.tsbuildinfo
build
Comment thread pkg/mcp/src/catalog.ts
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');
Comment thread pkg/dcql/test/e2e.ts
});

test('ldp_vc', async (t) => {
test.skip('ldp_vc', async (t) => {
Comment thread pkg/dcql/test/e2e.ts
});

test('dc+sd-jwt & ldp_vc', async (t) => {
test.skip('dc+sd-jwt & ldp_vc', async (t) => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants