@cooperco/nuxt-layers-mcp
v1.0.0
Published
MCP server exposing CooperCo Nuxt layer documentation as resources for AI assistants
Downloads
51
Readme
@cooperco/nuxt-layers-mcp
MCP server that exposes CooperCo Nuxt layer documentation as structured resources for AI assistants.
—
Why
AI assistants in downstream projects can't see what the layers provide without digging through node_modules. This server exposes that documentation on demand via MCP resources.
Setup in consumer projects
Add to your project's .mcp.json:
{
"mcpServers": {
"cooperco-layers": {
"command": "npx",
"args": ["@cooperco/nuxt-layers-mcp"]
}
}
}Once configured, AI assistants that support MCP can read the resources listed below to understand what the CooperCo layers provide.
Resources
| URI | Name | Description |
|---|---|---|
| cooperco://layers/overview | CooperCo Nuxt Layers — Overview | Available layers, npm package names, installation, dependency chain, and common setup patterns |
| cooperco://layers/base | Base Layer | Foundational Nuxt 4 layer — ESLint, i18n, a11y, hints, optional Loggly logging, useLogger() composable |
| cooperco://layers/ui | UI Layer | Nuxt UI v4, Tailwind CSS 4, icon sets (Lucide, SimpleIcons), app config defaults |
| cooperco://layers/seo | SEO Layer | Sitemap generation and robots.txt for Nuxt projects — zero config needed for basic usage |
—
For maintainers: Working on this package
Repository layout
- Package root:
mcp-server - Source:
mcp-server/src/index.ts— server entry pointresources/— one file per resource (overview.ts,base.ts,ui.ts,seo.ts)
- Built output:
mcp-server/dist/
Development scripts
# From mcp-server
npm install
npm run build # compile TypeScriptTest with the MCP inspector:
npx @modelcontextprotocol/inspector node dist/index.jsPublishing to npm (tag-based)
This package is published via GitHub Actions when you push a tag that matches mcp-vX.Y.Z.
High-level flow:
- Bump the version in
mcp-server/package.json(SemVer) - Commit and push to
main - Create and push a tag
mcp-vX.Y.Zmatching the version - CI checks whether the version exists on npm and publishes if not
Important notes:
- Do NOT rely on
npm versionto create the tag (it createsvX.Y.Z). Createmcp-vX.Y.Zyourself. publishConfig.accessis set topublic; publishes are public to npmjs.- The workflow skips if the exact version already exists.
Step-by-step
- Bump version without creating a tag:
cd mcp-server
npm version patch --no-git-tag-version # or minor | major- Commit and push:
git add mcp-server/package.json
git commit -m "chore(mcp): bump version"
git push origin main- Tag and push:
cd mcp-server
VERSION=$(node -p "require('./package.json').version")
cd ..
git tag "mcp-v$VERSION"
git push origin "mcp-v$VERSION"- CI will publish
- Workflow:
.github/workflows/publish-mcp.yml - Auth:
NPM_TOKENGitHub secret
Troubleshooting
- Version exists: bump again and retag
- 401/403: ensure
NPM_TOKENis configured and has access
