Skip to content
Open
Show file tree
Hide file tree
Changes from 9 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
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ node_modules
**/build
**/dist
.github/CODEOWNERS
pnpm-lock.yaml
pnpm-lock.yaml
# vendored code
src/_vendor/
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Let's create a simple MCP server that exposes a calculator tool and some data. S
import { McpServer, ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
import express from 'express';
import { z } from 'zod';
import * as z from 'zod/v4'; // or import * as z from 'zod/v3';

// Create an MCP server
const server = new McpServer({
Expand Down Expand Up @@ -477,7 +477,7 @@ MCP servers can request LLM completions from connected clients that support samp
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
import express from 'express';
import { z } from 'zod';
import * as z from 'zod/v4'; // or import * as z from 'zod/v3';

const mcpServer = new McpServer({
name: 'tools-with-sample-server',
Expand Down Expand Up @@ -561,7 +561,7 @@ For most use cases where session management isn't needed:
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
import express from 'express';
import { z } from 'zod';
import * as z from 'zod/v4'; // or import * as z from 'zod/v3';

const app = express();
app.use(express.json());
Expand Down Expand Up @@ -796,7 +796,7 @@ A simple server demonstrating resources, tools, and prompts:

```typescript
import { McpServer, ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';
import { z } from 'zod';
import * as z from 'zod/v4'; // or import * as z from 'zod/v3';

const server = new McpServer({
name: 'echo-server',
Expand Down Expand Up @@ -866,7 +866,7 @@ A more complex example showing database integration:
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import sqlite3 from 'sqlite3';
import { promisify } from 'util';
import { z } from 'zod';
import * as z from 'zod/v4'; // or import * as z from 'zod/v3';

const server = new McpServer({
name: 'sqlite-explorer',
Expand Down Expand Up @@ -961,7 +961,7 @@ If you want to offer an initial set of tools/prompts/resources, but later add ad
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
import express from 'express';
import { z } from 'zod';
import * as z from 'zod/v4'; // or import * as z from 'zod/v3';

const server = new McpServer({
name: 'Dynamic Example',
Expand Down
19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@ export default tseslint.config(
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }]
}
},
{
files: ['src/_vendor/**/*.ts'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
'no-fallthrough': 'off',
'no-case-declarations': 'off',
'no-useless-escape': 'off'
}
},
{
files: ['src/server/mcp.zodv3.test.ts'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off'
}
},
{
files: ['src/client/**/*.ts', 'src/server/**/*.ts'],
ignores: ['**/*.test.ts'],
Expand Down
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export default {
'^pkce-challenge$': '<rootDir>/src/__mocks__/pkce-challenge.ts'
},
transformIgnorePatterns: ['/node_modules/(?!eventsource)/'],
testPathIgnorePatterns: ['/node_modules/', '/dist/']
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
modulePathIgnorePatterns: ['<rootDir>/dist/']
};
Loading