You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -243,7 +243,7 @@ Claude for Desktop is not yet available on Linux. Linux users can proceed to the
243
243
First, make sure you have Claude for Desktop installed. [You can install the latest version
244
244
here.](https://claude.ai/download) If you already have Claude for Desktop, **make sure it's updated to the latest version.**
245
245
246
-
We'll need to configure Claude for Desktop for whicheverMCP servers you want to use. To do this, open your Claude for Desktop App configuration at `~/Library/Application Support/Claude/claude_desktop_config.json` in a text editor. Make sure to create the file if it doesn't exist.
246
+
We'll need to configure Claude for Desktop for whicheverMCP servers you want to use. To do this, open your Claude for Desktop App configuration at `~/Library/Application Support/Claude/claude_desktop_config.json` in a text editor. Make sure to create the file if it doesn't exist.
247
247
248
248
For example, if you have [VS Code](https://code.visualstudio.com/) installed:
249
249
@@ -418,100 +418,24 @@ Now let's dive into building your server.
418
418
419
419
## Building your server
420
420
421
-
### Importing packages
421
+
### Importing packages and setting up the instance
422
422
423
423
Add these to the top of your `src/index.ts`:
424
-
425
424
```typescript
426
-
import { Server } from"@modelcontextprotocol/sdk/server/index.js";
text: `Failed to retrieve grid point data for coordinates: ${latitude}, ${longitude}. This location may not be supported by the NWS API (only US locations are supported).`,
text: `Failed to retrieve grid point data for coordinates: ${latitude}, ${longitude}. This location may not be supported by the NWS API (only US locations are supported).`,
const forecastText =`Forecast for ${latitude}, ${longitude}:\n\n${formattedForecast.join("\n")}`;
638
+
639
+
return {
640
+
content: [
641
+
{
642
+
type: "text",
643
+
text: forecastText,
644
+
},
645
+
],
646
+
};
647
+
},
648
+
);
739
649
```
740
650
741
651
### Running the server
742
652
743
653
Finally, implement the main function to run the server:
744
654
745
655
```typescript
746
-
// Start the server
747
656
asyncfunction main() {
748
657
const transport =newStdioServerTransport();
749
658
awaitserver.connect(transport);
@@ -769,7 +678,7 @@ Claude for Desktop is not yet available on Linux. Linux users can proceed to the
769
678
First, make sure you have Claude for Desktop installed. [You can install the latest version
770
679
here.](https://claude.ai/download) If you already have Claude for Desktop, **make sure it's updated to the latest version.**
771
680
772
-
We'll need to configure Claude for Desktop for whicheverMCP servers you want to use. To do this, open your Claude for Desktop App configuration at `~/Library/Application Support/Claude/claude_desktop_config.json` in a text editor. Make sure to create the file if it doesn't exist.
681
+
We'll need to configure Claude for Desktop for whicheverMCP servers you want to use. To do this, open your Claude for Desktop App configuration at `~/Library/Application Support/Claude/claude_desktop_config.json` in a text editor. Make sure to create the file if it doesn't exist.
773
682
774
683
For example, if you have [VS Code](https://code.visualstudio.com/) installed:
0 commit comments