Skip to content

Commit 682cfba

Browse files
authored
Docs MCP server (#182)
docs mcp server and related docs
1 parent ce3fa76 commit 682cfba

File tree

17 files changed

+845
-9
lines changed

17 files changed

+845
-9
lines changed

.vscode/settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// these are written out individually because if written as a group
2525
// users cannot override individual items in their settings.json
2626
"[typescript]": {
27-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
27+
"editor.defaultFormatter": "vscode.typescript-language-features"
2828
},
2929
"[javascript]": {
3030
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
@@ -42,10 +42,10 @@
4242
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
4343
},
4444
"[json]": {
45-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
45+
"editor.defaultFormatter": "vscode.json-language-features"
4646
},
4747
"[jsonc]": {
48-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
48+
"editor.defaultFormatter": "vscode.json-language-features"
4949
},
5050
"[env]": {
5151
"editor.formatOnSave": false

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ Varlock is built on top of @env-spec, a new DSL for attaching a schema and addit
9999
| [@env-spec VSCode extension](packages/vscode-plugin) | [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=varlock.env-spec-language), [Open VSX Registry](https://open-vsx.org/extension/varlock/env-spec-language) |
100100
| [varlock Docker image](Dockerfile) | [GitHub Container Registry](https://github.com/orgs/dmno-dev/packages/container/package/varlock) |
101101

102+
## MCP Servers
103+
| MCP Server | Link | URL |
104+
| --- | --- | --- |
105+
| Varlock Docs (HTTP) | [Installation](https://varlock.dev/guides/mcp/#docs-mcp) | https://docs.mcp.varlock.dev/mcp |
106+
| Varlock Docs (SSE) | [Installation](https://varlock.dev/guides/mcp/#docs-mcp) | https://docs.mcp.varlock.dev/sse |
102107
## Development & Contribution
103108

104109
See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default new Map();
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default new Map();
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.15.3","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true,\"allowedDomains\":[]},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"staticImportMetaEnv\":false,\"chromeDevtoolsWorkspace\":false,\"failOnPrerenderConflict\":false},\"legacy\":{\"collections\":false}}"]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"_variables": {
3+
"lastUpdateCheck": 1761867445295
4+
}
5+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="astro/client" />
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# wrangler project
2+
3+
.dev.vars
4+
.wrangler/
5+
6+
.dev.vars*
7+
!.dev.vars.example
8+
!.env.example
9+
10+
worker-configuration.d.ts
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Varlock Docs MCP
2+
3+
>**These are development instructions, for user facing MCP docs see [here](https://varlock.dev/guides/mcp#docs-mcp)**.
4+
5+
This is a MCP server that allows you to search the Varlock docs.
6+
7+
Initially based on https://developers.cloudflare.com/agents/guides/remote-mcp-server/.
8+
9+
10+
## Usage
11+
12+
```bash
13+
pnpm run dev
14+
```
15+
16+
Then you can use the MCP server in your MCP client.
17+
18+
For example, you can use the MCP server in Cursor by adding the following to your `.cursor/mcp.json` file:
19+
20+
```json
21+
{
22+
"mcpServers": {
23+
"varlock-docs-mcp-local": {
24+
"command": "npx",
25+
"args": ["mcp-remote", "http://localhost:8787/sse"]
26+
}
27+
}
28+
}
29+
```
30+
31+
or via the local MCP server inspector:
32+
33+
```bash
34+
pnpm run inspector
35+
```
36+
37+
## Cloudflare
38+
39+
The server is deployed automaticaly to cloudlfare workers when you open a PR or merge to `main`.
40+
41+
It relies on an AI Gateway and an AI Search (autoRAG) to search the Varlock docs.
42+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "varlock-docs-mcp",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"deploy": "wrangler deploy",
7+
"dev": "wrangler dev",
8+
"lint": "eslint .",
9+
"lint:fix": "pnpm run lint --fix",
10+
"start": "wrangler dev",
11+
"cf-typegen": "wrangler types",
12+
"type-check": "tsc --noEmit",
13+
"inspector": "pnpm dlx @modelcontextprotocol/inspector@latest"
14+
},
15+
"dependencies": {
16+
"@modelcontextprotocol/sdk": "1.20.2",
17+
"agents": "^0.2.8",
18+
"zod": "^3.25.76"
19+
},
20+
"devDependencies": {
21+
"@types/node": "catalog:",
22+
"typescript": "5.9.3",
23+
"wrangler": "^4.45.2"
24+
}
25+
}

0 commit comments

Comments
 (0)