Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/meshjs-mcp-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: meshjs-mcp CI

on:
push:
branches:
- main
paths:
- "apps/meshjs-mcp/**"
pull_request:
paths:
- "apps/meshjs-mcp/**"

jobs:
build-and-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/meshjs-mcp
steps:
- name: checkout
uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: apps/meshjs-mcp/package-lock.json

- name: install dependencies
run: npm ci

- name: type check
run: npx tsc --noEmit -p tsconfig.json

- name: build and smoke test
run: npm test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AI compatible Web3 tools and documentation platform for the Cardano ecosystem.

## Applications

**Mesh Documentation Platform** (`apps/docs`)
**Mesh Documentation Platform** ([MeshJS/meshjs.dev](https://github.com/MeshJS/meshjs.dev))
- MeshJS documentation site built with Next.js and Fumadocs
- AI Chat functionality
- Includes llms.txt
Expand Down
3 changes: 1 addition & 2 deletions apps/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Apps

This folder contains all applications in the Mimir monorepo.
This folder contains all applications in the Mesh AI monorepo.

## Applications

- **docs** - Documentation platform for MeshJS built with Next.js and Fumadocs
- **mesh-startersite** - Application for onboarding non Web3 developers.
- **meshjs-mcp** - MCP server to power your code editor with latest meshjs documentation.
- **meshjs-rag** - Python backend contextual RAG system which powers chat functionality on the meshjs website
8 changes: 4 additions & 4 deletions apps/mesh-startersite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"dependencies": {
"@mdx-js/loader": "^3.1.0",
"@mdx-js/react": "^3.1.0",
"@meshsdk/core": "^1.9.0-beta.0",
"@meshsdk/react": "^1.9.0-beta.0",
"@meshsdk/core": "^1.9.1",
"@meshsdk/react": "^1.8.14",
"@next/mdx": "^15.3.5",
"@tailwindcss/typography": "^0.5.16",
"framer-motion": "^12.23.3",
"lucide-react": "^0.525.0",
"next": "15.0.3",
"next": "15.5.25",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand All @@ -32,7 +32,7 @@
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "15.0.3",
"eslint-config-next": "15.5.25",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-prettier": "^5.5.1",
"husky": "^9.1.7",
Expand Down
3 changes: 3 additions & 0 deletions apps/meshjs-mcp/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
API_KEY=
MODEL=
MESH_AI_API_URL=
3 changes: 2 additions & 1 deletion apps/meshjs-mcp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist/
node_modules/
.DS_Store
.DS_Store
.env
61 changes: 61 additions & 0 deletions apps/meshjs-mcp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# meshjs-mcp

MCP ([Model Context Protocol](https://modelcontextprotocol.io)) server that gives AI agents and code editors real-time, retrieval-augmented MeshJS SDK documentation and Cardano development context.

It exposes a single tool, `askDocs`, which forwards a question to the Mesh AI retrieval-augmented backend and returns an AI generated answer grounded in the official MeshJS documentation.

## Requirements

The server calls out to an LLM on your behalf, so you need your own API key for the model you choose:

| Env var | Required | Description |
| --- | --- | --- |
| `API_KEY` | Yes | API key for the provider behind `MODEL` (OpenAI, Anthropic, or Google). |
| `MODEL` | Yes | Model identifier to use for answering, e.g. `gpt-4o-mini`, `claude-sonnet-4-20250514`, `gemini-1.5-pro`. |
| `MESH_AI_API_URL` | No | Override the Mesh AI backend URL. Defaults to the hosted `https://mimir-api.meshjs.dev`. |

## Usage

### Claude Code / Claude Desktop

```bash
claude mcp add-json mesh-mcp '{
"command": "npx",
"args": ["-y", "meshjs-mcp"],
"env": {
"API_KEY": "your-api-key",
"MODEL": "your-preferred-model"
}
}'
```

### VS Code / other MCP clients

```json
{
"servers": {
"mesh-mcp": {
"command": "npx",
"args": ["-y", "meshjs-mcp"],
"env": {
"API_KEY": "your-api-key",
"MODEL": "your-preferred-model"
}
}
}
}
```

## Development

```bash
npm install
npm run build
API_KEY=your-key MODEL=gpt-4o-mini node dist/index.js
```

See [meshjs.dev/ai/mcp](https://meshjs.dev/ai/mcp) for more details.

## Notes

- `@modelcontextprotocol/sdk` is intentionally pinned to `1.22.0` rather than a caret range. Versions `1.23.0` through at least `1.30.0` hit a TypeScript `TS2589: Type instantiation is excessively deep` error on `registerTool` with this project's zod version (see [modelcontextprotocol/typescript-sdk#1180](https://github.com/modelcontextprotocol/typescript-sdk/issues/1180)). The security advisories fixed in later SDK versions ([GHSA-345p-7cg4-v4c7](https://github.com/advisories/GHSA-345p-7cg4-v4c7), [GHSA-w48q-cv73-mx4w](https://github.com/advisories/GHSA-w48q-cv73-mx4w), [GHSA-8r9q-7v3j-jr4g](https://github.com/advisories/GHSA-8r9q-7v3j-jr4g)) only affect HTTP/SSE transports with multiple concurrent clients or servers exposing resource templates — this server only uses `StdioServerTransport` with a single tool and no resources, so it isn't exposed to any of them. Re-evaluate the pin once the upstream type regression is fixed.
Loading
Loading