Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Conversation

tresorama
Copy link

Fixes #252 . But please check it.

Motivation and Context

See #252 for error.
I don't know the code of thi repo, I only followed the Typecript type definition of McpServer and refactored

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const NWS_API_BASE = "https://api.weather.gov";
const USER_AGENT = "weather-app/1.0";

// Create server instance
- const server = new McpServer({
-  name: "weather",
-  version: "1.0.0",
-  capabilities: {
-    resources: {},
-    tools: {},
-  },
- });

+ const server = new McpServer({
+  name: "weather",
+  version: "1.0.0",
+ },{
+  capabilities: {
+    resources: {},
+    tools: {},
+  },
+ });

I supposed the docs is not updated after an APIchange.

How Has This Been Tested?

Not deeply. But Claude can now use the tool correctly.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quickstart not working server - node

1 participant