Commit Graph

109 Commits

Author SHA1 Message Date
cliffhall
2da9f33969 Remove or clause for sessionId where "none" is offered as an alternative.
In the first case (line 16) we already know that req.query.sessionId is set to something. I

 n the second (line 40), it doesn't matter because if it doesn't map to a transport no further action is taken.
2025-05-28 16:31:21 -04:00
cliffhall
9ffacb78ab Be more verbose about unexpected GET /sse calls from already connected clients. 2025-05-28 11:14:03 -04:00
olaservo
318c22b2ac Add instructions 2025-05-26 12:49:33 -07:00
cliffhall
145f893108 Allow multiple connections to the everything server.
For both sse and streamableHttp, a server instance needs to be created for each transport. Otherwise, when a new client connects and its new transport is connected to the single server, the previous transport is overwritten in the server instance and can no longer communicate.

* In sse.ts
  - remove global server, cleanup, and transport vars
  - add transports map
  - in sse GET handler,
    - check for sessionId, there shouldn't be one, so comment "Reconnecting?" and do nothing if present
    - if sessionId not present
      - create new server and transport instance
      - connect server to transport
      - add transport to transports map
      - in server.onclose, delete the transport from the transports map and call cleanup
  - in /message POST handler
    - get the sessionId from the request
    - get the transport from the map by sessionId
    - handle the message if the transport was found

* In streamableHttp.ts
  - remove the global server and cleanup vars
  - change transports var to Map
  - in /mcp POST handler
    - when creating a new session
      - create a server instance
      - in server.onclose, delete the transport from the transports map and call cleanup
  - remove the calls to cleanup and server.close in the SIGINT handler, because the transport is closed and its onclose handler closes the server.
2025-05-22 11:41:16 -04:00
cliffhall
26aa0f8091 * In src/everything/sse.ts
- add SIGINT handler that does cleanup, server.close, and process.exit
2025-05-15 14:32:42 -04:00
cliffhall
3894d236c0 * In src/everything/sse.ts and streamableHttp.ts
- Replace console.log with console.error throughout
* In src/everything/sse.ts
  - remove the process.exit() in the server.onclose handler so reconnections are possible
2025-05-15 14:13:15 -04:00
Cliff Hall
2645e03e5f Merge pull request #1673 from cliffhall/choose-server-at-startup-from-npx
Choose the server-everything transport on the command line
2025-05-06 11:10:58 -04:00
cliffhall
e30f30868f Update server-everything to use the latest version of the SDK
* In sse.ts & streamableHttp.ts
  - change console.log to console.error
2025-05-06 10:27:49 -04:00
cliffhall
69549cc844 Update server-everything to use the latest version of the SDK
* In stdio.ts
  - change console.log to console.error
2025-05-06 10:26:47 -04:00
cliffhall
c4371d95d5 Update server-everything to use the latest version of the SDK 2025-05-05 18:00:44 -04:00
cliffhall
f06dc654ff Update server-everything to allow choosing the transport on the command line.
* Update README.md
2025-05-05 13:33:25 -04:00
cliffhall
f93911607b Update server-everything to allow choosing the transport on the command line.
# Run the default (stdio) server
```npx @modelcontextprotocol/server-everything```

# Or specify stdio explicitly
```npx @modelcontextprotocol/server-everything stdio```

# Run the SSE server
```npx @modelcontextprotocol/server-everything sse```

# Run the streamable HTTP server
```npx @modelcontextprotocol/server-everything streamableHttp```

* In src/everything/index.ts
  - refactor/extracted contents to stdio.ts
  - replaced with code that
    - Gets the single argument from the commandline as scriptName
    - switches on scriptName
    - imports the appropriate server script or outputs usage options
  - scripts run on import

* In src/everything/stdio.ts
  - added console log "Starting default (STDIO) server..."

* In src/everything/sse.ts
  - added console log "Starting SSE server..."

* In src/everything/streamableHttp.ts
  - added console log "Starting Streamable HTTP server..."

* This fixes #1594
2025-05-05 13:09:38 -04:00
Shiv Deepak Muddada
e70bcd317b remove json middleware from everything streamable http server 2025-04-22 19:51:16 -07:00
Shiv Deepak Muddada
d1d79444f7 fix: passing body to handleRequest, and optionally adding a response id if it exists 2025-04-22 19:32:07 -07:00
Shiv Deepak Muddada
03e9a7be0d ref: cleanup 2025-04-22 19:32:03 -07:00
Shiv Deepak Muddada
ace5c2a8dd update docs 2025-04-22 19:29:06 -07:00
Shiv Deepak Muddada
07af15945d add streamableHttp server support for everything server 2025-04-22 19:27:00 -07:00
David Soria Parra
52db0d9899 Merge pull request #1243 from burkeholland/burkeholland-vscode-install-instructions
Update READMEs with instructions for VS Code installation
2025-04-22 10:56:19 +01:00
Ola Hungerford
f93737dbb0 Merge pull request #1282 from morinokami/patch-2
fix: Add completions capability to Everything server
2025-04-18 08:19:15 -07:00
cliffhall
fc9e6ba3c9 Upgrade typescript-sdk version in everything server 2025-04-16 11:32:07 -04:00
Burke Holland
adac92f93d Merge branch 'main' of https://github.com/modelcontextprotocol/servers into burkeholland-vscode-install-instructions 2025-04-15 16:40:03 -05:00
cliffhall
b8ecbe79de Adjust intervals for outgoing demo messages
- subscription updates: 10 seconds
- logging messages: 20 seconds
- stderr messages: 30 seconds
2025-04-15 10:52:34 -04:00
cliffhall
41fa29e21b Fix formatting 2025-04-14 17:32:33 -04:00
cliffhall
9655d471f7 Add periodic stderr messages.
In everything.ts
- add a 10 second interval for sending 'notifications/stderr' messages to the client

This was created in order to test the display and clearing of stderr messages in the client.
- see https://github.com/modelcontextprotocol/inspector/pull/286
2025-04-14 17:13:11 -04:00
Shinya Fujino
7baf4c5c36 Merge branch 'main' into patch-2 2025-04-14 00:57:08 +09:00
Burke Holland
090b6b7c1a Move VS Code below Claude 2025-04-10 12:10:02 -05:00
Burke Holland
76b3d7b5de Merge remote-tracking branch 'upstream/main' into burkeholland-vscode-install-instructions 2025-04-10 09:29:23 -05:00
Shinya Fujino
b8d19f910e fix: Add completions capability to Everything server 2025-04-07 00:13:11 +09:00
Burke Holland
e6db372447 Update READMEs with instructions for VS Code installation 2025-04-03 16:37:27 -05:00
Ashwin Bhat
26ae300622 Add resource reference support to MCP server
- Add new tool 'getResourceReference' that returns embedded resources
- Add new prompt 'resource_prompt' demonstrating embedded resources in prompts
- Update documentation with new tool and prompt details
- Create CLAUDE.md with development guidelines

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-01 17:47:07 -07:00
cliffhall
487fe0237c Update README.md 2025-03-17 10:32:57 -04:00
cliffhall
0f0ed351cb Respect log level setting by client
* This fixes #868
* In everything.ts
  - import LoggingLevel from sdk
  - add log messages for all levels
  - add isMessageIgnored function that checks the incoming level against the logLevel and returns false if it is a lower index than the logLevel
  - in the setInterval for sending dummy logs, only send the message if it is not ignored by the logLevel.
2025-03-15 16:45:03 -04:00
cliffhall
f41b117716 Update everything/README.md with info about the logging output 2025-03-13 15:33:59 -04:00
cliffhall
2ba960ca13 In the Inspector, log messages from the server were not being displayed.
https://github.com/modelcontextprotocol/inspector/issues/184

The user who created the issue provided a python test server to send dummy messages, but I expected that the 'everything server' would be exercising this capability, but it wasn't. So I decided to add that functionality at the same time as fixing the inspector.

In src/everything/everything.ts
 - add logsUpdateInterval
 - use setInterval to send a random-leveled log message every 15 seconds
2025-03-13 15:23:52 -04:00
Ola Hungerford
19b701baa3 Add annotated message example 2025-02-14 20:39:55 -07:00
Alexandros Pappas
71da7b29f3 Merge branch 'main' into feat/add-start-scripts-everything-server 2025-01-19 16:04:05 +01:00
David Soria Parra
49489d4864 Merge pull request #464 from erdnax123/erdnax123-patch-2
fix warnings: - FromAsCasing: 'as' and 'FROM' keywords' casing do not…
2025-01-15 09:34:07 +00:00
Alexandros Pappas
b0237b1e28 Merge branch 'main' into feat/add-start-scripts-everything-server 2025-01-10 18:10:28 +01:00
TerminalMan
ae0197e374 fix sampling 2025-01-08 20:16:10 +00:00
André Holzmüller
0dd9ac9ea0 fix warnings: - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)
On branch erdnax123-patch-2
Changes to be committed:
	modified:   src/aws-kb-retrieval-server/Dockerfile
	modified:   src/brave-search/Dockerfile
	modified:   src/everart/Dockerfile
	modified:   src/everything/Dockerfile
	modified:   src/filesystem/Dockerfile
	modified:   src/gdrive/Dockerfile
	modified:   src/github/Dockerfile
	modified:   src/gitlab/Dockerfile
	modified:   src/google-maps/Dockerfile
	modified:   src/memory/Dockerfile
	modified:   src/postgres/Dockerfile
	modified:   src/sequentialthinking/Dockerfile
	modified:   src/slack/Dockerfile
2025-01-02 12:56:40 -03:00
Alexandros Pappas
f2a802822b feat: Add start and start:sse scripts to package.json on everything server 2024-12-22 15:55:07 +01:00
colinmcneil
4e8a8d270a Split production node_modules 2024-12-19 13:11:34 -08:00
Jim Clark
368e3b23ca Add Dockerfiles for the 17 sample MCP servers
* add Dockerfiles and update README.md definitions
2024-12-19 13:11:34 -08:00
David Soria Parra
ea35591902 Merge pull request #370 from modelcontextprotocol/ashwin/everythingcompletions
add completion examples to everything server
2024-12-19 19:38:39 +00:00
Jerome
8c1b9d6fda updated readme 2024-12-18 15:18:30 +00:00
Jerome
e198e36788 Added printenv to the everything server to help debug environment variable configuration 2024-12-18 15:14:45 +00:00
Ashwin Bhat
1eca8f8626 add completion examples to everything server 2024-12-17 14:43:55 -08:00
David Soria Parra
94a36286d2 typescript servers 0.6.2 2024-12-04 16:11:35 +00:00
David Soria Parra
a096c95e8e Typescript servers 0.6.1 2024-12-03 17:49:33 +00:00
David Soria Parra
129d80af31 TS Servers 0.6.0 2024-12-03 14:10:24 +00:00