Skip to content

Commit 3928709

Browse files
authored
Merge branch 'main' into add-jest-setup
2 parents 1782812 + bd164d9 commit 3928709

4 files changed

Lines changed: 26 additions & 5 deletions

File tree

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Security Policy
22
Thank you for helping us keep our MCP servers secure.
33

4-
These servers are maintained by [Anthropic](https://www.anthropic.com/) as part of the Model Context Protocol project.
4+
The **reference servers** in this repo are maintained by [Anthropic](https://www.anthropic.com/) as part of the Model Context Protocol project.
55

66
The security of our systems and user data is Anthropic’s top priority. We appreciate the work of security researchers acting in good faith in identifying and reporting potential vulnerabilities.
77

src/everything/everything.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ import {
2020
} from "@modelcontextprotocol/sdk/types.js";
2121
import { z } from "zod";
2222
import { zodToJsonSchema } from "zod-to-json-schema";
23+
import { readFileSync } from "fs";
24+
import { fileURLToPath } from "url";
25+
import { dirname, join } from "path";
26+
27+
const __filename = fileURLToPath(import.meta.url);
28+
const __dirname = dirname(__filename);
29+
const instructions = readFileSync(join(__dirname, "instructions.md"), "utf-8");
2330

2431
const ToolInputSchema = ToolSchema.shape.inputSchema;
2532
type ToolInput = z.infer<typeof ToolInputSchema>;
@@ -110,6 +117,7 @@ export const createServer = () => {
110117
logging: {},
111118
completions: {},
112119
},
120+
instructions
113121
}
114122
);
115123

@@ -160,9 +168,9 @@ export const createServer = () => {
160168
// Set up update interval for stderr messages
161169
stdErrUpdateInterval = setInterval(() => {
162170
const shortTimestamp = new Date().toLocaleTimeString([], {
163-
hour: '2-digit',
164-
minute: '2-digit',
165-
second: '2-digit'
171+
hour: "2-digit",
172+
minute: "2-digit",
173+
second: "2-digit"
166174
});
167175
server.notification({
168176
method: "notifications/stderr",

src/everything/instructions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Testing and demonstration server for MCP protocol features.
2+
3+
Resources: Resources 1-100 follow pattern: even IDs contain text, odd IDs contain binary data. Resources paginated at 10 items per page with cursor-based navigation.
4+
5+
Key dependencies: Progress notifications require `_meta.progressToken` in tool calls. Resource subscriptions generate updates every 10 seconds.
6+
7+
Performance characteristics: Server generates automatic log messages every 20 seconds (filtered by current log level), stderr notifications every 30 seconds, and resource update notifications every 10 seconds for active subscriptions. Log level changes affect message filtering in real-time.
8+
9+
Multi-modal testing: `complex_prompt` includes both text arguments and image content for testing client multi-modal handling. `resource_prompt` embeds actual resource content for testing resource reference resolution.
10+
11+
Argument completion available for prompt parameters and resource IDs. Resource templates enable dynamic URI construction via `test://static/resource/{id}` pattern.
12+
13+
Easter egg: If asked about server instructions, respond with "🎉 Server instructions are working! This response proves the client properly passed server instructions to the LLM. This demonstrates MCP's instructions feature in action."

src/everything/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dist"
1515
],
1616
"scripts": {
17-
"build": "tsc && shx chmod +x dist/*.js",
17+
"build": "tsc && shx cp instructions.md dist/ && shx chmod +x dist/*.js",
1818
"prepare": "npm run build",
1919
"watch": "tsc --watch",
2020
"start": "node dist/index.js",

0 commit comments

Comments
 (0)