4072 Commits

Author SHA1 Message Date
Cliff Hall
17a2be2320 Merge branch 'main' into new-everything-server 2025-12-17 16:02:56 -05:00
Jenn Newton
a37158bc15 Merge commit from fork
Validate that repo_path arguments in tool calls are within the
configured --repository path when the --repository flag is set.

The fix:
- Adds validate_repo_path() that resolves paths and checks
  containment using Path.relative_to()
- Resolves symlinks before comparison
- Maintains backward compatibility when --repository is not set

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Paul Carleton <paulc@anthropic.com>
2025-12-17 16:04:30 +00:00
Jenn Newton
9e5d5b8e4b Merge commit from fork
Add validation to reject arguments starting with '-' and verify
arguments resolve to valid git refs via rev_parse before passing
to git CLI commands. This prevents flag-like values from being
interpreted as command-line options (e.g., --output=/path/to/file).

CWE-88: Improper Neutralization of Argument Delimiters in a Command

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-17 16:01:19 +00:00
Koichi ITO
d9c45477cd Merge pull request #3124 from DeanMauro/patch-2
Update Trade Agent entry in README
2025-12-17 10:20:48 +09:00
Neel Patel
1432d05156 Update README.md existing Moorcheh server (#3105)
* Update README.md existing Moorcheh server

* update description
2025-12-16 21:54:47 +00:00
cliffhall
c6daef707a Get roots unconditionally when syncRoots is called
* In server/roots.ts
  - in syncRoots, if roots are supported fetch them

* In get-roots-list.ts,
  - Don't import and inspect current roots map, just call syncRoots to get the list.
2025-12-15 19:37:56 -05:00
cliffhall
1b8f376b90 Demonstrate registration of tools conditioned upon client capability support. Also, obviated need for clientConnected callback to pass sessionId because we defer initial fetching of roots happens when you run the get-roots-list tool.
* In how-it-works.md,
  - added a section on conditional tool registration

* In server/index.ts
  - import registerConditionalTools
  - in an oninitialized handler for the server, call registerConditionalTools
  - removed clientConnected from ServerFactoryResponse and all mentions in docs

* In tools/index.ts
  - export a registerConditionalTools function
  - refactor/move calls to registerGetRootsListTool, registerTriggerElicitationRequestTool, and registerTriggerSamplingRequestTool out of registerTools and into registerConditionalTools

* In server/roots.ts
  - only act if client supports roots
  - remove setInterval from call to requestRoots. It isn't happening during the initialze handshake anymore, so it doesn't interfere with that process if called immediaately

* In get-roots-list.ts, trigger-elicitation-request.ts, and trigger-sampling-request.ts,
  - only register tool if client supports capability

* Throughout the rest of the files, removing all references to `clientConnected`
2025-12-15 17:51:30 -05:00
cliffhall
ebac6314cf Updated server instructions.md. See https://github.com/modelcontextprotocol/servers/pull/3121#discussion_r2616651611 2025-12-15 17:04:59 -05:00
cliffhall
8758a11b37 Updated server instructions.md. See https://github.com/modelcontextprotocol/servers/pull/3121#discussion_r2616651611 2025-12-15 17:04:35 -05:00
cliffhall
734d5c3ebb Updated server instructions.md. See https://github.com/modelcontextprotocol/servers/pull/3121#discussion_r2616651611 2025-12-15 17:01:33 -05:00
cliffhall
70feb6f2b0 Remove includeContext: "thisServer" from CreateMessageRequest in trigger-sampling-request.ts 2025-12-15 14:40:11 -05:00
cliffhall
e0f1c42159 Add listChanged capability for tools, prompts, and resources in servers/index.ts 2025-12-15 14:39:20 -05:00
Dean Mauro
9a437181d9 Update Trade Agent to Trade It in README
Trade Agent has rebranded to Trade It. I've updated the entry to match.
2025-12-14 22:31:17 -05:00
cliffhall
cdbcdc551a Cache roots in get-roots-list.ts if list was not already present and had to be requested. 2025-12-13 16:25:28 -05:00
cliffhall
20527e4175 Updated doc in all tools 2025-12-13 15:55:07 -05:00
cliffhall
7b8592538f Updated doc in all tools 2025-12-13 15:52:32 -05:00
cliffhall
eed70bbbda Updated doc in trigger-sampling-request.ts 2025-12-13 15:48:41 -05:00
cliffhall
0ba86f8d4f Updated doc in echo.ts 2025-12-13 15:48:13 -05:00
cliffhall
29a20bfd0a Updated doc in get-annotated-message.ts 2025-12-13 15:46:57 -05:00
cliffhall
82cda366d6 Updated doc in get-env.ts 2025-12-13 15:45:24 -05:00
cliffhall
6ad8af7130 Updated doc in get-resource-reference.ts 2025-12-13 15:44:17 -05:00
cliffhall
8126179a0a Run pretter:fix 2025-12-13 15:43:00 -05:00
cliffhall
e1c1dcfac8 Use roots cache in get-roots-list tool
* In get-roots-list.ts, query the server's cache of the latest roots from the client and only request the list from the client if it doesn't exist.
* In roots.ts, export the roots map
2025-12-13 15:42:24 -05:00
cliffhall
6854902775 Use roots cache in get-roots-list tool
* In get-roots-list.ts, query the server's cache of the latest roots from the client and only request the list from the client if it doesn't exist.
* In roots.ts, export the roots map
2025-12-13 15:41:44 -05:00
cliffhall
77deef08ce Update doc in tools/gzip-file-as-resource.ts 2025-12-13 15:24:10 -05:00
cliffhall
cd5b728fb6 Update doc in tools/toggle-subscriber-updates.ts 2025-12-13 15:21:38 -05:00
cliffhall
ba098427d6 Update doc in tools/toggle-subscriber-updates.ts 2025-12-13 15:19:26 -05:00
cliffhall
45ea1e21f9 Update doc in tools/toggle-subscriber-updates.ts 2025-12-13 15:18:15 -05:00
cliffhall
b8074f9b9c Update doc in tools/trigger-elicitation-request.ts and trigger-long-running-operation.ts 2025-12-13 15:16:37 -05:00
cliffhall
8291c0b290 Update doc in tools/trigger-elicitation-request.ts 2025-12-13 15:12:51 -05:00
cliffhall
00b8c539f8 Update doc in tools/trigger-long-running-operation.ts 2025-12-13 15:11:12 -05:00
cliffhall
3f5e5cfb81 Update doc in tools/trigger-elicitation-request.ts 2025-12-13 15:09:26 -05:00
cliffhall
299aae2f4b Update doc in tools/toggle-subscriber-updates.ts 2025-12-13 15:07:13 -05:00
cliffhall
cb5f70cf20 Update doc in server/index.ts 2025-12-13 15:00:18 -05:00
cliffhall
90d1b664ee Update doc in server/index.ts 2025-12-13 14:58:49 -05:00
cliffhall
79c4e51038 Update README.md and doc in server/index.ts 2025-12-13 14:56:36 -05:00
cliffhall
a235ed8016 Updated package.json and ran prettier 2025-12-13 14:33:16 -05:00
cliffhall
919b2e0138 Updated AGENTS.md with guidance on tool naming 2025-12-13 14:24:38 -05:00
cliffhall
2b60822057 Refactor-renamed long-running-operation.ts to trigger-long-running-operation.ts 2025-12-13 14:20:24 -05:00
cliffhall
a008d9fee6 Updated structure.md 2025-12-13 11:42:23 -05:00
cliffhall
c5999b5a21 Merge branch 'main' into new-everything-server
# Conflicts:
#	Removed src/everything/everything.ts
2025-12-13 11:22:21 -05:00
cliffhall
f561f70002 [WIP] Refactor everything server to be more modular and use recommended APIs.
* Updated docs

* Refactor/renamed toggle-logging.ts to toggle-simulated-logging.ts
  - refactor/renamed registerToggleLoggingTool to registerToggleSimulatedLoggingTool
2025-12-13 10:59:35 -05:00
cliffhall
19e588bdcb [WIP] Refactor everything server to be more modular and use recommended APIs.
Updated structure.md
2025-12-13 10:20:16 -05:00
cliffhall
115789036a [WIP] Refactor everything server to be more modular and use recommended APIs.
Updated docs

* Refactor/renamed CLAUDE.md to AGENTS.md
* Updated instructions.md and startup.md
2025-12-13 10:03:21 -05:00
cliffhall
2093f2dfac [WIP] Refactor everything server to be more modular and use recommended APIs.
Updated README.md
2025-12-12 20:16:07 -05:00
cliffhall
9b25a3a41b [WIP] Refactor everything server to be more modular and use recommended APIs.
Finalized Roots list changed handling and initial request. Final fit and finish work.

* Updated architecture.md
  - Added links to other docs
  - Refactor/extracted sections into extension.md, features.md, how-it-works.md, startup.md, and structure.md

* Removed everything.ts
  - all features are ported

* In roots.ts
  - refactor/renaned setRootsListChangedHandler to syncRoots
  - refactor handler logic to requestRoots function
  - Calls for roots list directly to get initial list

* In server/index.ts
  - import setRootsListChangedHandler
  - in clientConnected callback
    - call setRootsListChangedHandler passing server and sessionId

* In sse.ts, stdio.ts, and streamableHttp.ts
  - update inline and function docs

* In index.ts,
  - updated usage output

* In server/index.ts
  - refactor/extracted readInstructions to resources/index.ts
  - defined ServerFactoryResponse response type
2025-12-12 20:12:18 -05:00
Ola Hungerford
792c47442d Merge pull request #3097 from cliffhall/sep-1330-enums
Update Everything server's elicitation request
2025-12-11 21:05:59 -07:00
cliffhall
cb073d877a [WIP] Refactor everything server to be more modular and use recommended APIs.
Adding Trigger Elicitation Request and Get Roots List tools

* Updated architecture.md

* Added roots.ts
  - tracks roots by sessionId
  - setRootsListChangedHandler
    - listens for roots changed notification from the client
      - updates the roots map by sessionId
      - sends log notification or error to the client

* In server/index.ts
  - import setRootsListChangedHandler
  - in clientConnected callback
    - call setRootsListChangedHandler passing server and sessionId

* In sse.ts, stdio.ts, and streamableHttp.ts
  - receive clientConnected from server factory
  - call clientConnected when server is connected to transport
* Added get-roots-list.ts
  - registerGetRootsListTool
    - Registers the 'get-roots-list' tool with the given MCP server.

* Added trigger-elicitation-request.ts
  - registerTriggerElicitationRequestTool
    - registered tool sends an elicitation request that exercises all supported field types

* In tools/index.ts
  - imports registerTriggerElicitationRequestTool and registerGetRootsListTool
  - in registerTools
    - call registerTriggerElicitationRequestTool and registerGetRootsListTool, passing server
2025-12-11 20:25:46 -05:00
cliffhall
18ef6aa69b [WIP] Refactor everything server to be more modular and use recommended APIs.
Adding Trigger Elicitation Request and Get Roots List tools

* Updated architecture.md

* Added roots.ts
  - tracks roots by sessionId
  - setRootsListChangedHandler
    - listens for roots changed notification from the client
      - updates the roots map by sessionId
      - sends log notification or error to the client

* In server/index.ts
  - import setRootsListChangedHandler
  - in clientConnected callback
    - call setRootsListChangedHandler passing server and sessionId

* In sse.ts, stdio.ts, and streamableHttp.ts
  - receive clientConnected from server factory
  - call clientConnected when server is connected to transport
* Added get-roots-list.ts
  - registerGetRootsListTool
    - Registers the 'get-roots-list' tool with the given MCP server.

* Added trigger-elicitation-request.ts
  - registerTriggerElicitationRequestTool
    - registered tool sends an elicitation request that exercises all supported field types

* In tools/index.ts
  - imports registerTriggerElicitationRequestTool and registerGetRootsListTool
  - in registerTools
    - call registerTriggerElicitationRequestTool and registerGetRootsListTool, passing server
2025-12-11 20:25:37 -05:00
cliffhall
ea6fe271cd [WIP] Refactor everything server to be more modular and use recommended APIs.
Adding Trigger Elicitation Request tool

* Updated architecture.md

* Added trigger-elicitation-request.ts
  - registerTriggerElicitationRequestTool
    - registered tool sends an elicitation request that exercises all supported field types

* In tools/index.ts
  - imports registerTriggerElicitationRequestTool
  - in registerTools
    - call registerTriggerElicitationRequestTool passing server
2025-12-11 18:10:37 -05:00