Compare commits

...

42 Commits

Author SHA1 Message Date
github-actions[bot]
846514858e Version Packages (#86)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-24 10:42:04 +02:00
Yuichiro Yamashita
b69ea052bd feat: support: $state.eager (#90)
Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com>
2025-10-24 10:34:00 +02:00
Tee Ming
e56159dda6 chore: add FUNDING.yml (#89) 2025-10-24 16:37:32 +09:00
paoloricciuti
1e83c35faa fix: update transport and cancel request only after sending it 2025-10-23 19:10:34 +02:00
Paolo Ricciuti
31edfe1b5f Merge pull request #85 from sveltejs/renovate/major-vitest-monorepo 2025-10-23 10:07:20 +02:00
paoloricciuti
3fabcc0f9b fix: add preferred-frame-size to UI resource 2025-10-23 09:57:51 +02:00
renovate[bot]
deb5f2670c chore(deps): update dependency vitest to v4 2025-10-22 19:36:46 +00:00
paoloricciuti
02c951baa8 fix: add icons to server.json 2025-10-22 21:35:01 +02:00
Paolo Ricciuti
41ceb83838 Merge pull request #79 from sveltejs/changeset-release/main 2025-10-22 17:23:40 +02:00
github-actions[bot]
3c3a26f031 Version Packages 2025-10-22 15:22:27 +00:00
Paolo Ricciuti
6589c7e250 Merge pull request #83 from sveltejs/renovate/all-minor-patch 2025-10-22 17:21:52 +02:00
Paolo Ricciuti
e09b8cd0b9 Merge pull request #84 from sveltejs/mcp-ui-playground 2025-10-22 17:21:33 +02:00
paoloricciuti
7f52a2b1be fix: use embed for mcp-ui embed 2025-10-22 14:56:24 +02:00
paoloricciuti
4eecd75759 chore: changesets 2025-10-22 09:59:39 +02:00
paoloricciuti
9015753f77 feat: return mcp ui resource for playground 2025-10-22 09:47:57 +02:00
renovate[bot]
4d6a9cb333 chore(deps): update pnpm to v10.19.0 2025-10-21 23:14:53 +00:00
Paolo Ricciuti
60aa30397f Merge pull request #80 from UltimateStarCoder/patch-1 2025-10-19 11:11:12 +02:00
paoloricciuti
17ed3a3e23 fix: lint 2025-10-19 11:08:57 +02:00
Paolo Ricciuti
f49bd06fbd chore: revert spacing 2025-10-19 11:05:50 +02:00
UltimateStarCoder
b98c042ae3 Correct JSON structure in remote setup documentation
Fixed JSON syntax for mcpServers configuration.
2025-10-18 17:43:58 -06:00
paoloricciuti
917a93d3fd fix: update deps and add path 2025-10-18 16:20:25 +02:00
Paolo Ricciuti
371e96befc Merge pull request #72 from adamtegen/patch-2 2025-10-17 18:58:29 +02:00
Paolo Ricciuti
bdfd5a109f fix: lint 2025-10-17 17:31:09 +02:00
Paolo Ricciuti
1c6c0a9fa7 Merge pull request #78 from sveltejs/invalid-css-autofixer
feat: suggest against js variables in css
2025-10-17 16:33:44 +02:00
paoloricciuti
a321244543 feat: suggest against js variables in css 2025-10-17 15:31:35 +02:00
paoloricciuti
ed25933466 fix: use right url + add manual triggering 2025-10-17 08:24:31 +02:00
Paolo Ricciuti
72f91dfb7b Merge pull request #77 from sveltejs/changeset-release/main 2025-10-17 08:12:59 +02:00
github-actions[bot]
d36855c447 Version Packages 2025-10-17 06:12:43 +00:00
paoloricciuti
5fa2baa270 fix: upgrade registry publisher cli 2025-10-17 08:12:09 +02:00
Paolo Ricciuti
6543150a5b Merge pull request #76 from sveltejs/changeset-release/main 2025-10-17 08:00:47 +02:00
github-actions[bot]
4c7f7feeba Version Packages 2025-10-17 05:59:44 +00:00
paoloricciuti
579be877fa fix: use correct server schema version 2025-10-17 07:59:10 +02:00
Paolo Ricciuti
0d55c0f61a Merge pull request #68 from sveltejs/changeset-release/main 2025-10-17 07:56:24 +02:00
github-actions[bot]
7d7b08610d Version Packages 2025-10-17 05:56:00 +00:00
Paolo Ricciuti
c08d8d4df7 Merge pull request #74 from sveltejs/renovate/all-minor-patch 2025-10-17 07:55:28 +02:00
paoloricciuti
12dd3c16ac fix: update deps 2025-10-17 01:26:35 +02:00
paoloricciuti
ca17a18677 fix: remove sizes 2025-10-17 00:42:47 +02:00
paoloricciuti
cf62286912 fix: use data: uri for local icon & add icons to tools + resources + prompts 2025-10-17 00:31:23 +02:00
Paolo Ricciuti
a4dfaab1c6 Merge pull request #75 from sveltejs/icon
feat: add svelte icon for mcp server
2025-10-16 23:32:18 +02:00
renovate[bot]
2d50ffd38c chore(deps): update dependency @anthropic-ai/sdk to ^0.67.0 2025-10-16 21:14:38 +00:00
Paolo Ricciuti
e639e3ad5c chore: apply suggestions from code review
Co-authored-by: Willow (GHOST) <ghostdevbusiness@gmail.com>
2025-10-16 16:34:25 +02:00
Adam Tegen
d0bed3e8f0 Add GitHub Coding Agent setup instructions
Added instructions for configuring GitHub Coding Agent.
2025-10-14 18:30:27 -05:00
32 changed files with 482 additions and 384 deletions

View File

@@ -1,5 +0,0 @@
---
'@sveltejs/mcp': patch
---
fix: prevent `imported_runes` suggestion from being added for libs that are not svelte

View File

@@ -1,5 +0,0 @@
---
'@sveltejs/mcp': patch
---
feat: add svelte icon and website url for mcp server

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
open_collective: svelte

View File

@@ -18,7 +18,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.18.3
version: 10.19.0
- name: Setup Node.js
uses: actions/setup-node@v6

View File

@@ -18,7 +18,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.18.3
version: 10.19.0
- name: Setup Node.js
uses: actions/setup-node@v6

View File

@@ -5,6 +5,7 @@ on:
secrets:
MCP_KEY:
required: true
workflow_dispatch:
jobs:
publish-mcp:
@@ -19,12 +20,12 @@ jobs:
env:
MCP_KEY: ${{ secrets.MCP_KEY }}
run: |
NAME=mcp-publisher_1.2.3_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz
# Download MCP Publisher pinned to v1.2.3 using latest https for security and save it to a file named mcp-publisher.tar.gz
curl --proto '=https' --proto-redir '=https' --tlsv1.2 -fL "https://github.com/modelcontextprotocol/registry/releases/download/v1.2.3/$NAME" -O
NAME=mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz
# Download MCP Publisher pinned to v1.3.3 using latest https for security and save it to a file named mcp-publisher.tar.gz
curl --proto '=https' --proto-redir '=https' --tlsv1.2 -fL "https://github.com/modelcontextprotocol/registry/releases/download/v1.3.3/$NAME" -O
# Verify the SHA256 checksum of the downloaded file
sha256sum --ignore-missing -c ./checksums/registry_1.2.3_checksums.txt
sha256sum --ignore-missing -c ./checksums/registry_1.3.3_checksums.txt
# Extract the tarball
mkdir tmp

View File

@@ -18,7 +18,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.18.3
version: 10.19.0
- name: Setup Node.js
uses: actions/setup-node@v6

View File

@@ -11,4 +11,5 @@ bun.lockb
/**/.svelte-kit/*
# Claude Code
.claude/
.claude/
.changeset/

View File

@@ -12,6 +12,7 @@
"body": [
"import type { SvelteMcp } from '../../index.js';",
"import * as v from 'valibot';",
"import { icons } from '../../icons/index.js';",
"",
"export function ${1:function_name}(server: SvelteMcp) {",
"\t$0",
@@ -35,6 +36,7 @@
"prefix": "!prompt",
"body": [
"import type { SvelteMcp } from '../../index.js';",
"import { icons } from '../../icons/index.js';",
"",
"/**",
" * Function that actually generates the prompt string. You can use this in the MCP server handler to generate the prompt, it can accept arguments",
@@ -69,6 +71,7 @@
"\t\t\ttitle: '${2:title}',",
"\t\t\tdescription:",
"\t\t\t\t'${3:llm_description}',",
"\t\t\ticons,",
"\t\t},",
"\t\tasync () => {",
"\t\t\treturn {",

View File

@@ -59,12 +59,12 @@
"typescript": "^5.0.0",
"vite": "^7.0.4",
"vite-plugin-devtools-json": "^1.0.0",
"vitest": "^3.2.3"
"vitest": "^4.0.0"
},
"dependencies": {
"@sveltejs/mcp-schema": "workspace:^",
"@sveltejs/mcp-server": "workspace:^",
"@tmcp/transport-http": "^0.6.3",
"tmcp": "^1.14.0"
"@tmcp/transport-http": "^0.7.1",
"tmcp": "^1.15.3"
}
}

View File

@@ -3,6 +3,9 @@ import { db } from '$lib/server/db/index.js';
import { redirect } from '@sveltejs/kit';
export async function handle({ event, resolve }) {
if (event.request.method === 'POST') {
console.log(await event.request.clone().text());
}
if (event.request.method === 'GET') {
const accept = event.request.headers.get('accept');
if (accept) {
@@ -25,11 +28,14 @@ export async function handle({ event, resolve }) {
// 200 or the MCP client will complain)
if (mcp_response && event.request.method === 'GET') {
try {
await mcp_response.body?.cancel();
} catch {
// ignore
return mcp_response;
} finally {
try {
await mcp_response.body?.cancel();
} catch {
// ignore
}
}
return new Response('', { status: 200 });
}
return mcp_response ?? resolve(event);
}

View File

@@ -3,4 +3,5 @@ import { HttpTransport } from '@tmcp/transport-http';
export const http_transport = new HttpTransport(server, {
cors: true,
path: '/mcp',
});

View File

@@ -96,6 +96,27 @@ It will open a file with your MCP servers where you can add the following config
}
```
## GitHub Coding Agent
- Open your repository in GitHub
- Go to Settings
- Open Copilot > Coding agent
- Edit the MCP configuration
```json
{
"mcpServers": {
"svelte": {
"type": "http",
"url": "https://mcp.svelte.dev/mcp",
"tools": ["*"]
}
}
}
```
- Click _Save MCP configuration_
## Other clients
If we didn't include the MCP client you are using, refer to their documentation for `remote` servers and use `https://mcp.svelte.dev/mcp` as the URL.

View File

@@ -13,7 +13,7 @@ const gitignore_path = fileURLToPath(new URL('./.gitignore', import.meta.url));
export default /** @type {import("eslint").Linter.Config} */ ([
includeIgnoreFile(gitignore_path),
{
ignores: ['.claude/**/*'],
ignores: ['.claude/**/*', '.changeset/*'],
},
js.configs.recommended,
...ts.configs.recommended,

View File

@@ -3,7 +3,7 @@
"version": "0.0.1",
"description": "The official Svelte MCP server implementation",
"type": "module",
"packageManager": "pnpm@10.18.3",
"packageManager": "pnpm@10.19.0",
"scripts": {
"build": "pnpm -r run build",
"dev": "pnpm --filter @sveltejs/mcp-remote run dev",
@@ -46,7 +46,7 @@
"publint": "^0.3.13",
"typescript": "^5.0.0",
"typescript-eslint": "^8.44.1",
"vitest": "^3.2.3"
"vitest": "^4.0.0"
},
"pnpm": {
"onlyBuiltDependencies": [

View File

@@ -20,6 +20,7 @@
"drizzle-orm": "^0.44.0"
},
"dependencies": {
"@mcp-ui/server": "^5.12.0",
"@sveltejs/mcp-schema": "workspace:^",
"@tmcp/adapter-valibot": "^0.1.4",
"@typescript-eslint/parser": "^8.44.0",
@@ -27,15 +28,15 @@
"eslint-plugin-svelte": "^3.12.3",
"svelte": "^5.39.2",
"svelte-eslint-parser": "^1.3.2",
"tmcp": "^1.15.0",
"tmcp": "^1.15.3",
"ts-blank-space": "^0.6.2",
"typescript-eslint": "^8.44.0",
"valibot": "^1.1.0",
"vitest": "^3.2.4",
"vitest": "^4.0.0",
"zimmerframe": "^1.1.4"
},
"devDependencies": {
"@anthropic-ai/sdk": "^0.66.0",
"@anthropic-ai/sdk": "^0.67.0",
"@sveltejs/kit": "^2.42.2",
"@types/eslint-scope": "^8.3.2",
"@types/estree": "^1.0.8",

View File

@@ -11,6 +11,7 @@ export const base_runes = [
export const nested_runes = [
'$state.raw',
'$state.snapshot',
'$state.eager',
'$effect.pre',
'$effect.tracking',
'$effect.pending',

View File

@@ -1,6 +1,7 @@
import type { SvelteMcp } from '../../index.js';
import * as v from 'valibot';
import { format_sections_list } from '../../utils.js';
import { icons } from '../../icons/index.js';
/**
* Function that actually generates the prompt string. You can use this in the MCP server handler to generate the prompt, it can accept arguments
@@ -64,6 +65,7 @@ export function setup_svelte_task(server: SvelteMcp) {
};
},
},
icons,
},
async ({ task }) => {
const available_docs = await format_sections_list();

View File

@@ -1,5 +1,6 @@
import type { SvelteMcp } from '../../index.js';
import { get_sections, fetch_with_timeout } from '../../utils.js';
import { icons } from '../../icons/index.js';
export async function list_sections(server: SvelteMcp) {
const sections = await get_sections();
@@ -42,6 +43,7 @@ export async function list_sections(server: SvelteMcp) {
},
},
uri: 'svelte://{/slug*}.md',
icons,
},
async (uri, { slug }) => {
const section = sections.find((section) => {

View File

@@ -2,6 +2,7 @@ import type { SvelteMcp } from '../../index.js';
import * as v from 'valibot';
import { get_sections, fetch_with_timeout, format_sections_list } from '../../utils.js';
import { SECTIONS_LIST_INTRO, SECTIONS_LIST_OUTRO } from './prompts.js';
import { icons } from '../../icons/index.js';
export function get_documentation(server: SvelteMcp) {
server.tool(
@@ -17,6 +18,7 @@ export function get_documentation(server: SvelteMcp) {
),
),
}),
icons,
},
async ({ section }) => {
let sections: string[];

View File

@@ -1,6 +1,7 @@
import type { SvelteMcp } from '../../index.js';
import { format_sections_list } from '../../utils.js';
import { SECTIONS_LIST_INTRO, SECTIONS_LIST_OUTRO } from './prompts.js';
import { icons } from '../../icons/index.js';
export function list_sections(server: SvelteMcp) {
server.tool(
@@ -8,6 +9,7 @@ export function list_sections(server: SvelteMcp) {
name: 'list-sections',
description:
'Lists all available Svelte 5 and SvelteKit documentation sections in a structured format. Each section includes a "use_cases" field that describes WHEN this documentation would be useful. You should carefully analyze the use_cases field to determine which sections are relevant for the user\'s query. The use_cases contain comma-separated keywords describing project types (e.g., "e-commerce", "blog"), features (e.g., "authentication", "forms"), components (e.g., "slider", "modal"), development stages (e.g., "deployment", "testing"), or "always" for fundamental concepts. Match these use_cases against the user\'s intent - for example, if building an e-commerce site, fetch sections with use_cases containing "e-commerce", "product listings", "shopping cart", etc. If building a slider, look for "slider", "carousel", "animation", etc. Returns sections as "* title: [section_title], use_cases: [use_cases], path: [file_path]". Always run list-sections FIRST for any Svelte query, then analyze ALL use_cases to identify relevant sections, and finally use get_documentation to fetch ALL relevant sections at once.',
icons,
},
async () => {
const formatted_sections = await format_sections_list();

View File

@@ -1,5 +1,7 @@
import type { SvelteMcp } from '../../index.js';
import * as v from 'valibot';
import { icons } from '../../icons/index.js';
import { createUIResource } from '@mcp-ui/server';
async function compress_and_encode_text(input: string) {
const reader = new Blob([input]).stream().pipeThrough(new CompressionStream('gzip')).getReader();
@@ -54,6 +56,7 @@ export function playground_link(server: SvelteMcp) {
outputSchema: v.object({
url: v.string(),
}),
icons,
},
async ({ files, name, tailwind }) => {
const playground_base = new URL('https://svelte.dev/playground');
@@ -98,12 +101,26 @@ export function playground_link(server: SvelteMcp) {
url: playground_base.toString(),
};
// use the embed path to have a cleaner UI for mcp-ui
playground_base.pathname = '/playground/embed';
return {
content: [
{
type: 'text',
text: JSON.stringify(content),
},
createUIResource({
uri: 'ui://svelte/playground-link',
content: {
type: 'externalUrl',
iframeUrl: playground_base.toString(),
},
uiMetadata: {
'preferred-frame-size': ['100%', '1200px'],
},
encoding: 'text',
}),
],
structuredContent: content,
};

View File

@@ -0,0 +1,94 @@
import { beforeEach, describe, expect, it } from 'vitest';
import { server } from '../../index.js';
/**
* Small utility to create a JSON-RPC request without having to always specify as const
*/
function request<const T>(request: T) {
return request;
}
async function autofixer_tool_call(code: string, is_error = false, desired_svelte_version = 5) {
const result = await server.receive({
jsonrpc: '2.0',
id: 2,
method: 'tools/call',
params: {
name: 'svelte-autofixer',
arguments: {
code,
desired_svelte_version,
filename: 'App.svelte',
},
},
});
expect(result).toBeDefined();
expect(result.result).toBeDefined();
if (is_error) {
return result.result;
}
expect(result.result.structuredContent).toBeDefined();
return result.result.structuredContent;
}
describe('svelte-autofixer tool', () => {
beforeEach(async () => {
const initialize_request = request({
jsonrpc: '2.0',
id: 1,
method: 'initialize',
params: {
protocolVersion: '2025-06-18',
capabilities: {
roots: { listChanged: true },
},
clientInfo: {
name: 'test-client',
version: '1.0.0',
},
},
});
await server.receive(initialize_request, {
sessionId: 'svelte-autofixer-session',
});
});
it('should add suggestions for js parse errors', async () => {
const content = await autofixer_tool_call(`<script>
$state count = 0;
</script>`);
expect(content.issues.length).toBeGreaterThan(0);
expect(content.suggestions).toContain(
"The code can't be compiled because a Javascript parse error. In case you are using runes like this `$state variable_name = 3;` or `$derived variable_name = 3 * count` that's not how runes are used. You need to use them as function calls without importing them: `const variable_name = $state(3)` and `const variable_name = $derived(3 * count)`.",
);
});
it('should add suggestions for css invalid identifier', async () => {
const content = await autofixer_tool_call(`<script>
let my_color = $state('red');
</script>
<style>
.my-class {
color: {my_color};
}
</style>`);
expect(content.issues.length).toBeGreaterThan(0);
expect(content.suggestions).toContain(
"The code can't be compiled because a valid CSS identifier is expected. This sometimes means you are trying to use a variable in CSS like this: `color: {my_color}` but Svelte doesn't support that. You can use inline CSS variables for that `<div style:--color={my_color}></div>` and then use the variable as usual in CSS with `color: var(--color)`.",
);
});
it('should error in case the passed in version is different from 4 or 5', async () => {
const content = await autofixer_tool_call(`whatever`, true, 3);
expect(content.content).toBeDefined();
expect(content.content[0]).toBeDefined();
expect(content.content[0].text).toContain(
'The desired_svelte_version MUST be either 4 or 5 but received "3"',
);
});
});

View File

@@ -4,6 +4,7 @@ import * as v from 'valibot';
import { add_compile_issues } from '../../autofixers/add-compile-issues.js';
import { add_eslint_issues } from '../../autofixers/add-eslint-issues.js';
import { add_autofixers_issues } from '../../autofixers/add-autofixers-issues.js';
import { icons } from '../../icons/index.js';
export function svelte_autofixer(server: SvelteMcp) {
server.tool(
@@ -38,6 +39,7 @@ export function svelte_autofixer(server: SvelteMcp) {
readOnlyHint: true,
openWorldHint: false,
},
icons,
},
async ({
code,
@@ -88,6 +90,10 @@ export function svelte_autofixer(server: SvelteMcp) {
content.suggestions.push(
"The code can't be compiled because a Javascript parse error. In case you are using runes like this `$state variable_name = 3;` or `$derived variable_name = 3 * count` that's not how runes are used. You need to use them as function calls without importing them: `const variable_name = $state(3)` and `const variable_name = $derived(3 * count)`.",
);
} else if (error.message.includes('css_expected_identifier')) {
content.suggestions.push(
"The code can't be compiled because a valid CSS identifier is expected. This sometimes means you are trying to use a variable in CSS like this: `color: {my_color}` but Svelte doesn't support that. You can use inline CSS variables for that `<div style:--color={my_color}></div>` and then use the variable as usual in CSS with `color: var(--color)`.",
);
}
}

View File

@@ -0,0 +1,14 @@
export const icons = [
{
src: 'https://mcp.svelte.dev/logo.svg',
mimeType: 'image/svg+xml',
},
{
src: 'https://mcp.svelte.dev/logo.png',
mimeType: 'image/png',
},
{
src: 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IbVQ1hvx5G9KIBJ1TclemeheWxlN2RyzdrQLtJg2RE5JqnSQcO9jwxN/hmixqy3nMS8uFMUDGS6wJbVA3j+i8r1bJR4Vz+XFgb+9jXd/CtqxWgzYySHAzphDCiG4KHtvLwVh7i6ib8buHdyIUQ0xZi9KnCdVYNLmlvQk0XrPhn8MqIE/kvYWvfOjoBpj5oj1XDmVDjiScs/dAunrCfZ9WyvnQ8HXkXDe8Uy91BVguYI8sGI8jNRjxCnkfJM8/Do+V5ogrjdy6is4vhmi6PoucAy8QZj6h3E55H5D+V97/6VIA5nthNIKYguCLFzdQspHXZuF2X7wk7w1caOduAuQ/A3Qnhk6HlaOTjIGsLxKtvPpqF3Ll85zXhlSftrz4VYA7tfigHfvWcKH5xrp9KBsxe4h0exOcteOf5bn9OACZEfRrRXMb2rnAgcvE4eZ+AuZitI8yOwmwIz/CXdwZHf2xMvgHmhjzOPt2urDLk4vgjyKWFknyAREoMV9skuou/wVyuzJl0pouYuSWUt3Hw8mbems1jM/P/Pi/f4PXiMAW/TA2w5GVcokspS/y5NCF42y/UpZoFFFBAAQUUUEABJy3+B6BFBuObiHkkAAAAAElFTkSuQmCC',
mimeType: 'image/png',
},
];

View File

@@ -3,6 +3,7 @@ import { McpServer } from 'tmcp';
import { setup_prompts, setup_resources, setup_tools } from './handlers/index.js';
import type { LibSQLDatabase } from 'drizzle-orm/libsql';
import type { Schema } from '@sveltejs/mcp-schema';
import { icons } from './icons/index.js';
export const server = new McpServer(
{
@@ -10,16 +11,7 @@ export const server = new McpServer(
version: '0.0.1',
description: 'The official Svelte MCP server implementation',
websiteUrl: 'https://mcp.svelte.dev',
icons: [
{
src: 'https://mcp.svelte.dev/logo.svg',
mimeType: 'image/svg+xml',
},
{
src: 'https://mcp.svelte.dev/logo.png',
mimeType: 'image/png',
},
],
icons,
},
{
adapter: new ValibotJsonSchemaAdapter(),

View File

@@ -1,5 +1,45 @@
# @sveltejs/mcp
## 0.1.10
### Patch Changes
- fix: add icons to `server.json` ([`02c951b`](https://github.com/sveltejs/mcp/commit/02c951baa86ac8103ffc158a202c06cfe6b15c01))
- fix: add `preferred-frame-size` to UI resource ([`3fabcc0`](https://github.com/sveltejs/mcp/commit/3fabcc0f9bfee916c0deb9c2ffa931ed2168af2d))
- feat: support: `$state.eager` ([#90](https://github.com/sveltejs/mcp/pull/90))
## 0.1.9
### Patch Changes
- feat: return `mcp-ui` resource from `playground-link` ([#84](https://github.com/sveltejs/mcp/pull/84))
- feat: suggest against js variables in css ([#78](https://github.com/sveltejs/mcp/pull/78))
## 0.1.8
### Patch Changes
- fix: upgrade registry publisher cli ([`5fa2baa`](https://github.com/sveltejs/mcp/commit/5fa2baa27009f01e0e4e91cee7984b81a81c1c29))
## 0.1.7
### Patch Changes
- fix: use correct server schema version ([`579be87`](https://github.com/sveltejs/mcp/commit/579be877fa9f87f7f173450ca5bc918824d68282))
## 0.1.6
### Patch Changes
- fix: prevent `imported_runes` suggestion from being added for libs that are not svelte ([`87af64f`](https://github.com/sveltejs/mcp/commit/87af64f4bc6d07b75640eb987a33655654363997))
- feat: add svelte icon and website url for mcp server ([#75](https://github.com/sveltejs/mcp/pull/75))
- fix: use `data:` uri for local icon & add icons to tools + resources + prompts ([`cf62286`](https://github.com/sveltejs/mcp/commit/cf622869129382a97ad059bb1389f115907adc8e))
## 0.1.5
### Patch Changes

View File

@@ -1,25 +0,0 @@
4e7c92f289d903d4649c59f82df6e7b014caebb49d8b5c1d2466667fd6caf68c mcp-publisher_1.2.3_darwin_amd64.tar.gz
09637600871bec7cce25e098d6ce23b7c7577a8e537f618d24a5630d2d782afa mcp-publisher_1.2.3_darwin_amd64.tar.gz.sbom.json
9ac90d3182bae9af4b48fb3cd19c3cade3e52c8ea25d7aa14327326a209bcf71 mcp-publisher_1.2.3_darwin_arm64.tar.gz
0b2cedf3f42c5a7b33bdd3f72ce7f4c938ff4fe2aca5cabd60094dc4b855c1f6 mcp-publisher_1.2.3_darwin_arm64.tar.gz.sbom.json
868a54268f21580ec97ec9dfc4fc3442a7f69c241ee7c745c7032f2e43cdf47b mcp-publisher_1.2.3_linux_amd64.tar.gz
a7bce190ea1c1b5682d1b5069b20dd9c67f3688e02dbc93e7273e942097dac4d mcp-publisher_1.2.3_linux_amd64.tar.gz.sbom.json
319cdefb4c4f19fa35eeb0337e30be3169dbf3107a8c160651691a6342a6783b mcp-publisher_1.2.3_linux_arm64.tar.gz
bc9309ab843531e811990dcf637b9912c470fc38eddc13a5af0512fcef498944 mcp-publisher_1.2.3_linux_arm64.tar.gz.sbom.json
298026e0252547046f50dcb7817239d44107f5a3ae64f4e43b6a31d0c5b89f9b mcp-publisher_1.2.3_windows_amd64.tar.gz
971b835ce4df2b37ddcf8591d4400dc94d1e3f730b181b325c905261b75b9e6e mcp-publisher_1.2.3_windows_amd64.tar.gz.sbom.json
64da67b451d0fba12f15f7b0f6ab8d71c718bb2263f90f198ff1fe15a5ff2024 mcp-publisher_1.2.3_windows_arm64.tar.gz
f591b2153f1277cb67817763a23de9e77188fa94b893fac00e91d13160d696e3 mcp-publisher_1.2.3_windows_arm64.tar.gz.sbom.json
265377b343500898e3c3fea798926ff2695fe7500c1225c8a97f390a5892d849 registry-1.2.3.tar.gz
a9c03a84d2e30176d6ed7b493e7e3a8a05d446f1611a35bad6007fbe3ba80657 registry_1.2.3_darwin_amd64.tar.gz
4db4e8a0b1f3d0ca193e5356fef89b74c0666cdf56d6f3c8fc2d0aba1cac3b55 registry_1.2.3_darwin_amd64.tar.gz.sbom.json
2933a11990db16035e4896f394ada389166046911e6868f79b84636048dfe6fb registry_1.2.3_darwin_arm64.tar.gz
edd36e62f4b1c5b857da1862f20cbcf6dd3dfd9717888c08bd5c25740d8b11f6 registry_1.2.3_darwin_arm64.tar.gz.sbom.json
59bdd9977795891220e6fdb8f79dd7d14f48166362e94699bee59e745f7c7df6 registry_1.2.3_linux_amd64.tar.gz
7f7efb180aa312f674377e32a92ac3600e50c62e37d697d2d16acfe60227a2fd registry_1.2.3_linux_amd64.tar.gz.sbom.json
7fef1088a664850dd75e54a699fce6a5fb32e8ebbdc0d2869b6b34945727ba9c registry_1.2.3_linux_arm64.tar.gz
ca0488e5cbb04c8ee515e1b80e08b755a55d6af1784368a2f55e429137359a25 registry_1.2.3_linux_arm64.tar.gz.sbom.json
5bc29310aacc08437dcc973cfc1e1129f7065d2050396012f5ed98c4eb0ea75b registry_1.2.3_windows_amd64.tar.gz
e918c604f23e6d33f9952f18eddf0e50e50d7ce3e87ca5258bf78f4f1da243ab registry_1.2.3_windows_amd64.tar.gz.sbom.json
394cad1e6f5e37a583defdd522edbff854de5035d6e025a195664db31b58c0c0 registry_1.2.3_windows_arm64.tar.gz
c93df66f3257ba4b9c29f7bfded4cf04d712ec220b044ddfa019da3e4bd6475f registry_1.2.3_windows_arm64.tar.gz.sbom.json

View File

@@ -0,0 +1,25 @@
704f15b3ccba80990fbaaeb858e2e893120dea3ebb9340e04a36065987e089c5 mcp-publisher_darwin_amd64.tar.gz
9eadadeb80998cd5b29e009dd3959634730d3754b9e201c0a3bb39dd6ae85933 mcp-publisher_darwin_amd64.tar.gz.sbom.json
f80265eadc6b052d2885a7dfa47a1ecc7ca95926c143197ced747317793dcc11 mcp-publisher_darwin_arm64.tar.gz
f063c462512eed8f2ce9610a6a125534cb552060ddb5364d8d49b32196416fbe mcp-publisher_darwin_arm64.tar.gz.sbom.json
1113b9d6bf59b000966c4f17752cf87b51db03dcc5482721421fd843ce3bf048 mcp-publisher_linux_amd64.tar.gz
d3e46855b3b906aa84571b0d16384ad6074fd08709108a47d724908e91947b9d mcp-publisher_linux_amd64.tar.gz.sbom.json
34be13ec07490ab1250194d56820af222b49b85db6062ff848d33f9cf6eb41ce mcp-publisher_linux_arm64.tar.gz
a1ff3c26d53007c98301b747f97e5e241bfdb860b6a761db8627c9ba9ba71d88 mcp-publisher_linux_arm64.tar.gz.sbom.json
9ba8b538744652c4837d08b7b83ae85d2dbea98c897cfcf4d90835df4fe075b3 mcp-publisher_windows_amd64.tar.gz
924a0adcebd9360aed4ee5959e664e4e99b8259ed871ac91be5ace5657afba7d mcp-publisher_windows_amd64.tar.gz.sbom.json
a3eeab18ee6fd1d76d7ec153779ebe1bb404d7ea561f117781174e4396d90565 mcp-publisher_windows_arm64.tar.gz
9351f3acc39f89402ce5f72be1b45f3bf1b16f8441c97496195188f276e6c227 mcp-publisher_windows_arm64.tar.gz.sbom.json
9767b6f2afe1b60c597d4c66468d491be3466b25de8b4d4e7a21e61950856ef7 registry-1.3.3.tar.gz
a7867ff2c15905a765dc77636d86241ea04a17d0a90f086913a3cea4fe899213 registry_darwin_amd64.tar.gz
f0ed44b6ebdfcba40daefe7ca556f385de0cbae95dca3077c406f75cdb6abb9b registry_darwin_amd64.tar.gz.sbom.json
b4d93d6fc2d831d287cde79953822b434cb8406eea4f38f180628df227f6569e registry_darwin_arm64.tar.gz
dde0ed7f350eda98eb6f474d19aa0e4c717dd9f120609949acf05d7986cf6fcc registry_darwin_arm64.tar.gz.sbom.json
6772a573828f3482a192c88dac4223ee71ff4f521c8819480a194757e46a8272 registry_linux_amd64.tar.gz
ac177354d5f43f86bdf7f36738837a2792ba136198209eb61d4d4dd9ab408853 registry_linux_amd64.tar.gz.sbom.json
61c1fb9126977e0694d5aad8990a9d4c2d0e933e6aa469789559fad3865e8b7f registry_linux_arm64.tar.gz
9b81dfe2c81c49f7731072b8c217f05d609f7094ea94aaf9491f33880f2dec7f registry_linux_arm64.tar.gz.sbom.json
7fb5752de50a841614c6990f20807820bda33a72eaf7be51ae6cbd4e9acb2b87 registry_windows_amd64.tar.gz
fd44139231d4725c75b2a5a96fb670d3137f628db91c8281f6348e842792d514 registry_windows_amd64.tar.gz.sbom.json
a85ba7eb1a06a9e668b8a2097e00ab010e454a2afeb4e29ebeb7b702a31cccd3 registry_windows_arm64.tar.gz
93503683d32a2971b741e87f2879cb2a3f41acd184c618e04d17a98926915f2d registry_windows_arm64.tar.gz.sbom.json

View File

@@ -1,6 +1,6 @@
{
"name": "@sveltejs/mcp",
"version": "0.1.5",
"version": "0.1.10",
"type": "module",
"license": "MIT",
"mcpName": "dev.svelte/mcp",
@@ -37,9 +37,10 @@
"publint": "^0.3.13",
"tsdown": "^0.15.0",
"typescript": "^5.8.3",
"vitest": "^3.1.3"
"vitest": "^4.0.0"
},
"dependencies": {
"eslint": "^9.36.0"
"eslint": "^9.36.0",
"tmcp": "^1.15.3"
}
}

View File

@@ -1,5 +1,5 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
"name": "dev.svelte/mcp",
"description": "The official Svelte MCP server providing docs and autofixing tools for Svelte development",
"repository": {
@@ -8,13 +8,23 @@
"subfolder": "packages/mcp-stdio",
"source": "github"
},
"version": "0.1.5",
"version": "0.1.10",
"websiteUrl": "https://svelte.dev/docs/mcp/overview",
"icons": [
{
"src": "https://mcp.svelte.dev/logo.svg",
"mimeType": "image/svg+xml"
},
{
"src": "https://mcp.svelte.dev/logo.png",
"mimeType": "image/png"
}
],
"packages": [
{
"registryType": "npm",
"identifier": "@sveltejs/mcp",
"version": "0.1.5",
"version": "0.1.10",
"runtimeHint": "npx",
"transport": {
"type": "stdio"

514
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff