Skip to content

Conversation

@dylburger
Copy link
Contributor

@dylburger dylburger commented Mar 28, 2025

Summary by CodeRabbit

  • New Features

    • Enabled containerized deployment with improved build and runtime configuration.
    • Provided a sample environment configuration to simplify OAuth and webhook setup.
    • Introduced new command-line options for seamless STDIO and SSE server modes.
    • Enhanced authentication flow for smoother user account integration.
    • Improved component tool registration for more flexible server operations.
  • Documentation

    • Added comprehensive guides covering setup, operation, and troubleshooting for the server.
    • Included detailed specifications for the Model Context Protocol in the documentation.
    • Introduced a new README file detailing features and operational guidelines for the MCP server.

@vercel
Copy link

vercel bot commented Mar 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Mar 28, 2025 3:43am
pipedream-docs ⬜️ Ignored (Inspect) Mar 28, 2025 3:43am
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Mar 28, 2025 3:43am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 28, 2025

Walkthrough

The pull request introduces configuration, documentation, and implementation files for the Model Context Protocol server. New Docker and environment files are added alongside Git ignore rules. Comprehensive protocol documentation and server guidelines are provided. Library files now include functions and interfaces for authentication, configuration, and component tool registration using the Pipedream API. Additionally, a command-line interface is implemented with commands for both STDIO and SSE server modes, and a TypeScript configuration and package metadata have been set up.

Changes

File(s) Change Summary
modelcontextprotocol/.dockerignore, modelcontextprotocol/.env.example, modelcontextprotocol/.gitignore, modelcontextprotocol/Dockerfile Added Docker configuration, environment sample, and Git ignore settings to exclude unnecessary files during builds and version control.
modelcontextprotocol/CLAUDE.md, modelcontextprotocol/README.md Introduced comprehensive documentation covering JSON-RPC protocol specifications, server features, setup instructions, and operational guidelines.
modelcontextprotocol/lib/authProvisions.ts, modelcontextprotocol/lib/config.ts, modelcontextprotocol/lib/const.ts, modelcontextprotocol/lib/pd-client.ts, modelcontextprotocol/lib/registerComponentTools.ts, modelcontextprotocol/lib/schemas.ts Added new functions, constants, configuration interfaces, and schema validations for Pipedream API integration and component tool registration.
modelcontextprotocol/src/cli.ts, modelcontextprotocol/src/mcp-server.ts, modelcontextprotocol/src/sse.ts, modelcontextprotocol/src/stdio.ts Implemented CLI commands and server logic for STDIO and SSE modes, including server creation, transport management, and error handling.
modelcontextprotocol/package.json, modelcontextprotocol/tsconfig.json Added package metadata and TypeScript configuration to build, run, and manage the MCP project.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant CLI
    participant STDIO as stdio.ts
    participant ServerFactory as serverFactory()
    participant Transport as StdioTransport
    participant MCP as McpServer

    User ->> CLI: Run "stdio" command with app and user ID
    CLI ->> STDIO: Import and invoke main(app, [userId])
    STDIO ->> ServerFactory: Call serverFactory({ app, externalUserId })
    ServerFactory ->> MCP: Initialize MCP server instance
    MCP -->> ServerFactory: Return server instance
    STDIO ->> Transport: Create StdioServerTransport
    STDIO ->> MCP: Connect server to transport
    MCP -->> STDIO: Connection established
    STDIO ->> User: Log running status
Loading
sequenceDiagram
    actor User
    participant CLI
    participant SSE as sse.ts
    participant Express as Express Server
    participant ServerFactory as serverFactory()
    participant RegisterTools as registerComponentTools
    participant SSETransport as SSE Transport

    User ->> CLI: Run "sse" command with app and port
    CLI ->> SSE: Import and invoke main(app, port)
    SSE ->> Express: Start Express server with SSE routes
    Express ->> SSE: Receive SSE connection request
    SSE ->> ServerFactory: Call serverFactory({ app, externalUserId })
    ServerFactory ->> RegisterTools: Register component tools
    RegisterTools -->> ServerFactory: Tools registered
    SSE ->> SSETransport: Establish SSE connection
    SSETransport -->> Express: Connection established
    Express ->> User: Maintain open SSE channel for messages
Loading

Suggested reviewers

  • michelle0927
  • lcaresia

Poem

I'm a little rabbit, hopped up on code today,
New features bloom like carrots in a fray.
Docker and CLI, tools all lined in a row,
With code so neat, I cheer and glow!
Leaping through configs with a joyful display.
In each file, a new hop—let's dart away!
🐇🌟

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

modelcontextprotocol/lib/config.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21ab744 and dd4fd64.

📒 Files selected for processing (2)
  • modelcontextprotocol/.dockerignore (1 hunks)
  • modelcontextprotocol/lib/config.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • modelcontextprotocol/.dockerignore
  • modelcontextprotocol/lib/config.ts

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (32)
modelcontextprotocol/.dockerignore (2)

5-5: Review the exclusion of Dockerfile.
Excluding the Dockerfile from the build context is uncommon since Docker typically requires it to build the image. Verify that this is indeed intentional and that your build process either provides the Dockerfile from another location or doesn’t rely on it being part of the context.


8-9: Optional: Remove trailing empty lines.
There appears to be an extra blank line at the end. While this is not a functional issue, consider removing it for consistency and to avoid unintended whitespace in your repository.

modelcontextprotocol/tsconfig.json (1)

1-13: Solid Compiler Options Setup

The configuration efficiently sets up a modern TypeScript environment by targeting ES2022 and using NodeNext for both module and module resolution. Enabling strict type checking and declaration generation aligns well with best practices for robust library development.
Consider explicitly specifying a "lib": ["ES2022"] option if you want to ensure that the standard library definitions match your target, although it is optional given the current target.

modelcontextprotocol/lib/schemas.ts (1)

3-6: Consider using z.object() for schema definition

The current schema is defined as a plain object with zod validators, but for proper validation with zod, it should be wrapped in a z.object() call. Also, consider adding a derived type for TypeScript users.

-export const ConfigureComponentRawSchema = {
+export const ConfigureComponentRawSchema = z.object({
  componentKey: z.string(),
  propName: z.string(),
-}
+});
+
+// Derive a type from the schema
+export type ConfigureComponentRaw = z.infer<typeof ConfigureComponentRawSchema>;
modelcontextprotocol/Dockerfile (1)

1-14: Optimize Docker build process and configuration

The Dockerfile could be improved in several ways:

  1. Add NODE_ENV=production environment variable
  2. Consider using multi-stage builds to reduce image size
  3. Add a healthcheck for better container orchestration
FROM node:22.14.0-alpine3.21

WORKDIR /app
COPY . .

# Install dependencies and build
-RUN npm ci && npm run build
+ENV NODE_ENV=production
+RUN npm ci --only=production && npm run build

ENV PORT=3010
EXPOSE 3010

+# Add healthcheck
+HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD wget -qO- http://localhost:3010/health || exit 1
+
# Command to run the SSE server
CMD ["npm", "run", "start:sse:prod"]

Also, ensure you have a proper .dockerignore file to exclude unnecessary files like node_modules, .git, etc.

modelcontextprotocol/.env.example (1)

1-12: LGTM! Well-structured environment variable example file

The environment variable example file is well-documented with clear descriptions for each variable. The organization with commented sections makes it easy to understand.

Minor suggestion: Consider adding a newline at the end of the file to follow standard Unix text file conventions.

modelcontextprotocol/lib/config.ts (1)

6-18: Consider strengthening type definitions for configuration

The current interface definitions allow undefined for critical Pipedream configuration values without providing a clear way to validate their presence when required.

Consider making required fields non-optional and adding validation logic:

interface PipedreamConfig {
-  clientId: string | undefined
-  clientSecret: string | undefined
-  projectId: string | undefined
-  environment: string | undefined
-  webhookUri: string | undefined
+  clientId: string
+  clientSecret: string
+  projectId: string
+  environment: string
+  webhookUri: string
+  isConfigured(): boolean
}
modelcontextprotocol/lib/pd-client.ts (1)

12-13: Fix array bracket newlines for lint compliance.

The linter is requiring a line break after [ and before ]. You can comply with the style rule as follows:

-    .enum(["development", "production"])
+    .enum([
+      "development",
+      "production",
+    ])
🧰 Tools
🪛 GitHub Check: Lint Code Base

[failure] 12-12:
A linebreak is required after '['


[failure] 12-12:
There should be a linebreak after this element


[failure] 12-12:
A linebreak is required before ']'

🪛 GitHub Actions: Pull Request Checks

[error] 12-13: A linebreak is required after '[' (array-bracket-newline)

modelcontextprotocol/lib/authProvisions.ts (1)

14-19: Consider adding error handling for potential API failures.

If pd.getAccounts throws due to an API or network error, the function execution may terminate abruptly. Wrapping the call in a try/catch would allow you to handle failures more gracefully.

-  const authProvisions = await pd.getAccounts({
-    external_user_id: externalUserId,
-    include_credentials: false,
-    app,
-  })
+  let authProvisions
+  try {
+    authProvisions = await pd.getAccounts({
+      external_user_id: externalUserId,
+      include_credentials: false,
+      app,
+    })
+  } catch (err) {
+    console.error("Error fetching user accounts:", err)
+    throw err
+  }
modelcontextprotocol/lib/registerComponentTools.ts (3)

2-2: Adhere to lint rule: line break around braces in imports.

Some lint rules require line breaks after the opening brace and before the closing brace to improve readability. For example:

-import { z, ZodRawShape } from "zod"
+import {
+  z,
+  ZodRawShape,
+} from "zod"
🧰 Tools
🪛 GitHub Check: Lint Code Base

[failure] 2-2:
Expected a line break after this opening brace


[failure] 2-2:
Expected a line break before this closing brace


31-31: Use a more specific type instead of any.

The handler's argument can be strongly typed to ensure better code reliability and readability. You could define an interface (e.g., ToolHandler) and reference it here for clarity:

-    handler: any
+    handler: (args: Record<string, unknown>) => Promise<SafeRegisterToolResult> | SafeRegisterToolResult

(Adjust as needed to reflect your actual handler signature.)

🧰 Tools
🪛 GitHub Check: Lint Code Base

[failure] 31-31:
Unexpected any. Specify a different type


[failure] 31-31:
Missing trailing comma


54-178: Consider parallelizing component processing for potential performance gains.

In scenarios with large numbers of components, iterating one-by-one could be slow. Using concurrent promises (e.g., Promise.all()) might reduce total processing time.

modelcontextprotocol/src/mcp-server.ts (1)

1-23: Well-structured server factory implementation

The implementation creates and configures the MCP server with appropriate initialization parameters and registers the necessary component tools. The async function pattern is well-suited for this use case.

However, consider adding documentation comments to explain the purpose of this function and its parameters. This would improve maintainability and help other developers understand how to use it correctly.

+/**
+ * Factory function that creates and initializes an MCP server for Pipedream Connect.
+ * 
+ * @param app - The app slug (unique identifier) for the Pipedream app to connect to
+ * @param externalUserId - The unique identifier for the user in the external system
+ * @returns Initialized McpServer instance with registered component tools
+ */
 export const serverFactory = async ({
   app,
   externalUserId,
 }: {
   app: string
   externalUserId: string
 }) => {
modelcontextprotocol/src/stdio.ts (1)

6-27: Good implementation of the stdio server main function

The function follows best practices by validating required parameters, handling optional parameters, and providing clear error messages. The UUID generation fallback for missing user IDs is a nice touch.

One small issue to note:

-  console.error(
+  console.log(
     `pd-connect MCP Server running on stdio for app: ${appName}, external_user_id: ${userId}`
   )

Typically, console.error is used for error messages, while console.log is more appropriate for informational messages like this server startup notification.

modelcontextprotocol/src/cli.ts (2)

23-39: Well-structured stdio command implementation

The command configuration is clean with appropriate required and optional parameters. The dynamic import pattern enables code splitting and on-demand loading, which is efficient.

Consider enhancing the error message to be more specific about what went wrong:

 .action(async (options) => {
   try {
     const { main } = await import("./stdio.js")
     await main(options.app, options.externalUserId)
   } catch (error) {
-    console.error("Error starting stdio server:", error)
+    console.error(
+      `Error starting stdio server for app '${options.app}': ${
+        error instanceof Error ? error.message : String(error)
+      }`
+    )
     process.exit(1)
   }
 })

41-54: Well-implemented SSE command with appropriate options

The SSE command implementation correctly handles optional parameters and follows the same pattern as the stdio command for consistency.

Similar to the stdio command, consider enhancing the error message:

 .action(async (options) => {
   try {
     const { main } = await import("./sse.js")
     await main(options.app, options.port)
   } catch (error) {
-    console.error("Error starting SSE server:", error)
+    console.error(
+      `Error starting SSE server${options.app ? ` for app '${options.app}'` : ''}${
+        options.port ? ` on port ${options.port}` : ''
+      }: ${error instanceof Error ? error.message : String(error)}`
+    )
     process.exit(1)
   }
 })
modelcontextprotocol/README.md (3)

1-30: Comprehensive introduction and setup documentation

The README provides clear instructions on the server's features and setup requirements. The environment variable configuration is well-documented.

Fix the apostrophe in line 14 and the hyphenation in line 15:

- Fully-managed OAuth and credential storage ([see security docs](https://pipedream.com/docs/privacy-and-security/#third-party-oauth-grants-api-keys-and-environment-variables))
+ Fully managed OAuth and credential storage ([see security docs](https://pipedream.com/docs/privacy-and-security/#third-party-oauth-grants-api-keys-and-environment-variables))
🧰 Tools
🪛 LanguageTool

[uncategorized] ~14-~14: It seems likely that a singular genitive (’s) apostrophe is missing.
Context: ... params, and make API requests, all via tools - Fully-managed OAuth and credential st...

(AI_HYDRA_LEO_APOSTROPHE_S_XS)


[uncategorized] ~15-~15: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ... and make API requests, all via tools - Fully-managed OAuth and credential storage ([see secu...

(HYPHENATED_LY_ADVERB_ADJECTIVE)


31-112: Clear documentation for running the server

The README provides comprehensive instructions for running the server in both stdio and SSE modes, with appropriate examples and expected outputs.

There are some link fragment issues in the document:

Line 51, 67, 136, and 181 reference link fragments like #getting-started, but static analysis indicates these may not be valid. Please double-check that these anchor links correctly point to their intended sections in the document.

🧰 Tools
🪛 LanguageTool

[style] ~46-~46: Consider using a more polite wording.
Context: ...s standard input / output. Ideal if you want to connect accounts and make MCP reques...

(IF_YOU_WANT)


[style] ~47-~47: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...unicate with clients. Use this when you want to host an internet-facing MCP server that...

(REP_WANT_TO_VB)


[grammar] ~59-~59: Make sure that ‘use to’ is correct. For habitual actions in the past or to mean ‘accustomed to’, use “used to”.
Context: ...ncepts-to-understand) — whatever ID you use to identify your user in your app (otherwi...

(USE_TO_VERB)

🪛 markdownlint-cli2 (0.17.2)

51-51: Link fragments should be valid
null

(MD051, link-fragments)


67-67: Link fragments should be valid
null

(MD051, link-fragments)


113-205: Well-documented hosting, customization, and licensing information

The documentation for self-hosting, authorization, debugging, and customization is comprehensive and provides clear guidance for users.

Two minor issues to fix:

  1. Improve the language in line 46-47:
- 1. **Stdio**: Uses standard input / output. Ideal if you want to connect accounts and make MCP requests from editors and other local MCP clients. Great for testing.
+ 1. **Stdio**: Uses standard input / output. Perfect for connecting accounts and making MCP requests from editors and other local MCP clients. Great for testing.
  1. Line 204 has a bare URL that should be formatted as a link:
- Pipedream Source Available License Version 1.0 - See https://github.com/PipedreamHQ/pipedream/blob/master/LICENSE
+ Pipedream Source Available License Version 1.0 - See [LICENSE](https://github.com/PipedreamHQ/pipedream/blob/master/LICENSE)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

136-136: Link fragments should be valid
null

(MD051, link-fragments)


181-181: Link fragments should be valid
null

(MD051, link-fragments)


204-204: Bare URL used
null

(MD034, no-bare-urls)

modelcontextprotocol/src/sse.ts (5)

8-10: Use a persistent store for SSE transports in production.
Relying on in-memory storage for the transports map prevents scaling across multiple server instances and may pose reliability concerns if the process restarts. Consider persisting session data in a shared store (e.g., Redis) to handle multi-instance or long-lived sessions.


24-30: Recheck URL redaction to avoid leaking PII.
The regex only replaces the first path segment. Consider a deeper or more selective approach (e.g., redacting all segments or removing query params) to reduce the risk of inadvertent logging of personal data.


85-99: Use 404 for missing SSE sessions instead of 500.
When the transport is not found, this is not a server error but rather a missing resource scenario.

-      res.status(500).json({ error: "No SSE connection established" })
+      res.status(404).json({ error: "SSE connection not found" })

118-132: Reduce duplication in app-specific vs. generic routes.
Currently, you define two sets of route handlers for app-specific and generic SSE connections. Consider merging them into a single set that checks the appName condition dynamically to reduce code duplication.


154-178: Consider adding a 404 fallback route.
Currently, routes are explicitly defined, but there is no default handler for unrecognized paths. A 404 handler can improve clarity when routes are mistyped or not found.

modelcontextprotocol/CLAUDE.md (8)

1-4: Introduction and Documentation Tone
The opening lines set an inviting tone with “MCP docs” and a brief preamble. Verify that the casual “constitution” metaphor aligns with your target audience. If a more formal introduction is desired, consider a slight revision.


5-8: Dev/Build Section Clarity
The “## Dev / build” section briefly points readers to the package.json scripts. You might consider including a direct link or a short note on which scripts to run for common operations to improve discoverability.


108-135: Standard Error Codes and Error Structure
The inclusion of standard error codes (e.g., PARSE_ERROR, INVALID_REQUEST) and the JSONRPCError interface adheres closely to the official spec. As a minor style suggestion, you might replace “a short description” with “a brief description” in the error documentation for consistency with best practices.

🧰 Tools
🪛 LanguageTool

[style] ~127-~127: Consider using the synonym “brief” (= concise, using a few words, not lasting long) to strengthen your wording.
Context: ... / code: number; /* * A short description of the error. The message S...

(QUICK_BRIEF)

🪛 markdownlint-cli2 (0.17.2)

116-116: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


123-123: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


127-127: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


131-131: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


137-168: Cancellation and Empty Result Definitions
The documentation for the cancellation notification (CancelledNotification) is detailed and clear. One small nitpick: review the phrasing around “previously-issued” (line 145) to ensure proper compound modifier usage.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~145-~145: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ide to indicate that it is cancelling a previously-issued request. * * The request SHOULD still...

(HYPHENATED_LY_ADVERB_ADJECTIVE)

🪛 markdownlint-cli2 (0.17.2)

137-137: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


139-139: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


143-143: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


145-145: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


146-146: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


147-147: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


148-148: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


149-149: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


150-150: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


151-151: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


157-157: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


158-158: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


159-159: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


164-164: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


170-211: Initialization Message Structures
The interfaces for InitializeRequest, InitializeResult, and InitializedNotification effectively describe the client–server handshake. It might be useful to add a note regarding how clients should handle protocol version mismatches.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

170-170: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


172-172: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


178-178: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


187-187: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


191-191: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


198-198: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


199-199: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


200-200: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


206-206: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


292-328: Ping and Progress Notifications
The simple PingRequest and the detailed ProgressNotification (including progress, total, and an optional message) are clearly defined. One minor suggestion: in the progress notification comment (line 316), remove the comma before “if known” to improve readability. For example:

- Total number of items to process (or total progress required), if known.
+ Total number of items to process (or total progress required) if known.
🧰 Tools
🪛 LanguageTool

[typographical] ~318-~318: Usually, there’s no comma before “if”.
Context: ... to process (or total progress required), if known. * * @TJS-type number ...

(IF_NO_COMMA)

🪛 markdownlint-cli2 (0.17.2)

292-292: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


294-294: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


300-300: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


302-302: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


308-308: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


312-312: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


313-313: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


314-314: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


318-318: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


319-319: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


320-320: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


324-324: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


674-813: Tool Interfaces and Annotations
The comprehensive tool-related interfaces (from ListToolsRequest to Tool) and detailed ToolAnnotations are very informative. One small suggestion: in the annotations documentation around line 765, the phrase

  “will have no additional effect on the its environment”

should be corrected to remove the extra determiner. For example:

- ...will have no additional effect on the its environment.
+ ...will have no additional effect on its environment.
🧰 Tools
🪛 LanguageTool

[grammar] ~765-~765: A determiner cannot be combined with a possessive pronoun. Did you mean simply “the” or “its”?
Context: ... * will have no additional effect on the its environment. * * (This property ...

(A_MY)

🪛 markdownlint-cli2 (0.17.2)

674-674: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


676-676: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


683-683: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


690-690: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


691-691: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


692-692: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


693-693: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


693-693: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


693-693: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


694-694: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


695-695: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


696-696: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


697-697: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


697-697: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


697-697: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


698-698: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


699-699: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


705-705: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


706-706: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


707-707: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


713-713: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


724-724: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


731-731: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


732-732: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


733-733: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


734-734: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


735-735: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


736-736: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


737-737: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


738-738: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


742-742: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


747-747: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


748-748: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


749-749: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


754-754: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


755-755: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


756-756: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


757-757: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


758-758: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


759-759: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


764-764: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


765-765: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


766-766: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


767-767: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


768-768: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


769-769: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


774-774: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


775-775: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


776-776: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


777-777: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


778-778: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


779-779: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


785-785: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


789-789: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


794-794: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


795-795: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


796-796: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


801-801: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


810-810: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


866-923: Sampling Message Interfaces
The interfaces related to sampling (CreateMessageRequest, CreateMessageResult, and SamplingMessage) are clearly defined and include detailed instructions for LLM sampling. A minor improvement: in the description for the systemPrompt parameter (line 880), consider adding a relative clause for clarity. For example:

- An optional system prompt the server wants to use for sampling.
+ An optional system prompt that the server wants to use for sampling.
🧰 Tools
🪛 LanguageTool

[grammar] ~879-~879: “System” is a singular noun. It appears that the verb form is incorrect.
Context: ...nces; /** * An optional system prompt the server wants to use for sampling. T...

(PCT_SINGULAR_NOUN_PLURAL_VERB_AGREEMENT)


[typographical] ~911-~911: Usually, there’s no comma before “if”.
Context: .../** * The reason why sampling stopped, if known. */ stopReason?: "endTurn" |...

(IF_NO_COMMA)

🪛 markdownlint-cli2 (0.17.2)

866-866: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


868-868: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


875-875: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


879-879: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


883-883: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


887-887: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


891-891: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


896-896: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


903-903: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


907-907: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


911-911: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


917-917: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91ce94f and b12683f.

⛔ Files ignored due to path filters (3)
  • modelcontextprotocol/mcp-inspector.png is excluded by !**/*.png
  • modelcontextprotocol/package-lock.json is excluded by !**/package-lock.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (18)
  • modelcontextprotocol/.dockerignore (1 hunks)
  • modelcontextprotocol/.env.example (1 hunks)
  • modelcontextprotocol/.gitignore (1 hunks)
  • modelcontextprotocol/CLAUDE.md (1 hunks)
  • modelcontextprotocol/Dockerfile (1 hunks)
  • modelcontextprotocol/README.md (1 hunks)
  • modelcontextprotocol/lib/authProvisions.ts (1 hunks)
  • modelcontextprotocol/lib/config.ts (1 hunks)
  • modelcontextprotocol/lib/const.ts (1 hunks)
  • modelcontextprotocol/lib/pd-client.ts (1 hunks)
  • modelcontextprotocol/lib/registerComponentTools.ts (1 hunks)
  • modelcontextprotocol/lib/schemas.ts (1 hunks)
  • modelcontextprotocol/package.json (1 hunks)
  • modelcontextprotocol/src/cli.ts (1 hunks)
  • modelcontextprotocol/src/mcp-server.ts (1 hunks)
  • modelcontextprotocol/src/sse.ts (1 hunks)
  • modelcontextprotocol/src/stdio.ts (1 hunks)
  • modelcontextprotocol/tsconfig.json (1 hunks)
🧰 Additional context used
🧬 Code Definitions (5)
modelcontextprotocol/src/mcp-server.ts (1)
modelcontextprotocol/lib/registerComponentTools.ts (1)
  • registerComponentTools (14-231)
modelcontextprotocol/src/stdio.ts (2)
modelcontextprotocol/src/sse.ts (1)
  • main (21-178)
modelcontextprotocol/src/mcp-server.ts (1)
  • serverFactory (4-23)
modelcontextprotocol/lib/pd-client.ts (1)
modelcontextprotocol/lib/config.ts (1)
  • config (20-42)
modelcontextprotocol/lib/authProvisions.ts (2)
modelcontextprotocol/lib/pd-client.ts (1)
  • createPdClient (6-42)
modelcontextprotocol/lib/config.ts (1)
  • config (20-42)
modelcontextprotocol/src/cli.ts (2)
modelcontextprotocol/src/stdio.ts (1)
  • main (6-27)
modelcontextprotocol/src/sse.ts (1)
  • main (21-178)
🪛 GitHub Check: Lint Code Base
modelcontextprotocol/lib/pd-client.ts

[failure] 12-12:
A linebreak is required after '['


[failure] 12-12:
There should be a linebreak after this element


[failure] 12-12:
A linebreak is required before ']'


[failure] 26-26:
Expected newline between test and consequent of ternary expression


[failure] 26-26:
Expected newline between consequent and alternate of ternary expression


[failure] 26-26:
Missing trailing comma

modelcontextprotocol/lib/registerComponentTools.ts

[failure] 2-2:
Expected a line break after this opening brace


[failure] 2-2:
Expected a line break before this closing brace


[failure] 31-31:
Unexpected any. Specify a different type


[failure] 31-31:
Missing trailing comma

🪛 GitHub Actions: Pull Request Checks
modelcontextprotocol/lib/pd-client.ts

[error] 12-13: A linebreak is required after '[' (array-bracket-newline)

🪛 LanguageTool
modelcontextprotocol/README.md

[uncategorized] ~14-~14: It seems likely that a singular genitive (’s) apostrophe is missing.
Context: ... params, and make API requests, all via tools - Fully-managed OAuth and credential st...

(AI_HYDRA_LEO_APOSTROPHE_S_XS)


[uncategorized] ~15-~15: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ... and make API requests, all via tools - Fully-managed OAuth and credential storage ([see secu...

(HYPHENATED_LY_ADVERB_ADJECTIVE)


[style] ~46-~46: Consider using a more polite wording.
Context: ...s standard input / output. Ideal if you want to connect accounts and make MCP reques...

(IF_YOU_WANT)


[style] ~47-~47: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...unicate with clients. Use this when you want to host an internet-facing MCP server that...

(REP_WANT_TO_VB)


[grammar] ~59-~59: Make sure that ‘use to’ is correct. For habitual actions in the past or to mean ‘accustomed to’, use “used to”.
Context: ...ncepts-to-understand) — whatever ID you use to identify your user in your app (otherwi...

(USE_TO_VERB)

modelcontextprotocol/CLAUDE.md

[style] ~127-~127: Consider using the synonym “brief” (= concise, using a few words, not lasting long) to strengthen your wording.
Context: ... / code: number; /* * A short description of the error. The message S...

(QUICK_BRIEF)


[uncategorized] ~145-~145: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ide to indicate that it is cancelling a previously-issued request. * * The request SHOULD still...

(HYPHENATED_LY_ADVERB_ADJECTIVE)


[typographical] ~318-~318: Usually, there’s no comma before “if”.
Context: ... to process (or total progress required), if known. * * @TJS-type number ...

(IF_NO_COMMA)


[style] ~654-~654: ‘for the benefit’ might be wordy. Consider a shorter alternative.
Context: ...t how best to render embedded resources for the benefit * of the LLM and/or the user. */ expo...

(EN_WORDINESS_PREMIUM_FOR_THE_BENEFIT)


[grammar] ~765-~765: A determiner cannot be combined with a possessive pronoun. Did you mean simply “the” or “its”?
Context: ... * will have no additional effect on the its environment. * * (This property ...

(A_MY)


[grammar] ~879-~879: “System” is a singular noun. It appears that the verb form is incorrect.
Context: ...nces; /** * An optional system prompt the server wants to use for sampling. T...

(PCT_SINGULAR_NOUN_PLURAL_VERB_AGREEMENT)


[typographical] ~911-~911: Usually, there’s no comma before “if”.
Context: .../** * The reason why sampling stopped, if known. */ stopReason?: "endTurn" |...

(IF_NO_COMMA)


[style] ~1041-~1041: Consider an alternative for the often overused word ‘important’.
Context: ...el. A value of 0 means cost * is not important, while a value of 1 means cost is the m...

(NOT_IMPORTANT)


[style] ~1052-~1052: Consider an alternative for the often overused word ‘important’.
Context: ...l. A * value of 0 means speed is not important, while a value of 1 means speed is *...

(NOT_IMPORTANT)


[style] ~1063-~1063: Consider an alternative for the often overused word ‘important’.
Context: ... A value of 0 means intelligence is not important, while a value of 1 * means intellig...

(NOT_IMPORTANT)


[grammar] ~1084-~1084: This phrase is duplicated. You should probably use “should match” only once.
Context: ...or example: * - claude-3-5-sonnet should match claude-3-5-sonnet-20241022 * - sonnet should match claude-3-5-sonnet-20241022, `claude-3...

(PHRASE_REPETITION)


[uncategorized] ~1170-~1170: When ‘access-specific’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...erstand the file system * structure or access specific locations that the client has permissio...

(SPECIFIC_HYPHEN)

🪛 markdownlint-cli2 (0.17.2)
modelcontextprotocol/README.md

51-51: Link fragments should be valid
null

(MD051, link-fragments)


67-67: Link fragments should be valid
null

(MD051, link-fragments)


136-136: Link fragments should be valid
null

(MD051, link-fragments)


181-181: Link fragments should be valid
null

(MD051, link-fragments)


204-204: Bare URL used
null

(MD034, no-bare-urls)

modelcontextprotocol/CLAUDE.md

11-11: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


11-11: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


14-14: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


25-25: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


25-25: Bare URL used
null

(MD034, no-bare-urls)


30-30: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


30-30: Bare URL used
null

(MD034, no-bare-urls)


38-38: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


43-43: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


52-52: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


64-64: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


73-73: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


80-80: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


85-85: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


93-93: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


100-100: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


116-116: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


123-123: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


127-127: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


131-131: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


137-137: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


139-139: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


143-143: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


145-145: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


146-146: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


147-147: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


148-148: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


149-149: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


150-150: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


151-151: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


157-157: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


158-158: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


159-159: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


164-164: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


170-170: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


172-172: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


178-178: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


187-187: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


191-191: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


198-198: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


199-199: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


200-200: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


206-206: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


213-213: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


217-217: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


221-221: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


225-225: Unordered list indentation
Expected: 4; Actual: 5

(MD007, ul-indent)


230-230: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


236-236: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


240-240: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


244-244: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


248-248: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


252-252: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


256-256: Unordered list indentation
Expected: 4; Actual: 5

(MD007, ul-indent)


261-261: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


265-265: Unordered list indentation
Expected: 4; Actual: 5

(MD007, ul-indent)


269-269: Unordered list indentation
Expected: 4; Actual: 5

(MD007, ul-indent)


274-274: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


278-278: Unordered list indentation
Expected: 4; Actual: 5

(MD007, ul-indent)


285-285: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


292-292: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


294-294: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


300-300: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


302-302: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


308-308: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


312-312: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


313-313: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


314-314: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


318-318: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


319-319: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


320-320: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


324-324: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


330-330: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


334-334: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


343-343: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


344-344: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


349-349: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


351-351: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


358-358: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


365-365: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


372-372: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


379-379: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


385-385: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


386-386: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


387-387: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


394-394: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


401-401: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


408-408: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


414-414: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


415-415: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


416-416: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


423-423: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


429-429: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


430-430: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


431-431: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


438-438: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


444-444: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


445-445: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


446-446: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


453-453: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


457-457: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


458-458: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


459-459: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


464-464: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


465-465: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


466-466: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


471-471: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


472-472: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


473-473: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


478-478: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


483-483: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


489-489: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


493-493: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


494-494: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


495-495: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


500-500: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


501-501: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


502-502: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


507-507: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


508-508: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


509-509: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


514-514: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


519-519: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


525-525: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


529-529: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


530-530: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


531-531: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


535-535: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


542-542: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


549-549: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


550-550: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


551-551: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


556-556: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


558-558: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


565-565: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


572-572: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


578-578: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


582-582: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


589-589: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


593-593: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


600-600: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


604-604: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


608-608: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


612-612: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


618-618: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


622-622: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


626-626: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


630-630: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


636-636: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


641-641: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


642-642: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


643-643: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


644-644: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


652-652: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


653-653: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


654-654: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


655-655: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


662-662: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


668-668: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


674-674: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


676-676: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


683-683: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


690-690: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


691-691: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


692-692: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


693-693: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


693-693: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


693-693: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


694-694: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


695-695: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


696-696: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


697-697: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


697-697: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


697-697: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


698-698: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


699-699: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


705-705: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


706-706: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


707-707: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


713-713: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


724-724: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


731-731: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


732-732: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


733-733: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


734-734: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


735-735: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


736-736: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


737-737: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


738-738: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


742-742: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


747-747: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


748-748: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


749-749: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


754-754: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


755-755: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


756-756: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


757-757: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


758-758: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


759-759: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


764-764: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


765-765: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


766-766: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


767-767: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


768-768: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


769-769: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


774-774: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


775-775: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


776-776: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


777-777: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


778-778: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


779-779: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


785-785: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


789-789: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


794-794: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


795-795: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


796-796: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


801-801: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


810-810: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


815-815: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


817-817: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


823-823: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


830-830: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


836-836: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


840-840: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


844-844: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


851-851: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


852-852: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


853-853: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


854-854: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


854-854: Bare URL used
null

(MD034, no-bare-urls)


866-866: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


868-868: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


875-875: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


879-879: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


883-883: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


887-887: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


891-891: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


896-896: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


903-903: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


907-907: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


911-911: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


917-917: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


925-925: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


929-929: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


930-930: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


931-931: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


936-936: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


937-937: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


938-938: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


939-939: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


940-940: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


941-941: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


942-942: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


943-943: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


944-944: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


950-950: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


956-956: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


961-961: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


967-967: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


973-973: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


974-974: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


975-975: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


980-980: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


985-985: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


991-991: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


997-997: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


998-998: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


999-999: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1004-1004: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1009-1009: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1015-1015: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1016-1016: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1017-1017: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1018-1018: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1019-1019: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1020-1020: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1021-1021: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1022-1022: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1023-1023: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1024-1024: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1025-1025: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1029-1029: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1030-1030: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1031-1031: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1032-1032: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1033-1033: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1034-1034: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1035-1035: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1040-1040: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1041-1041: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1042-1042: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1043-1043: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1044-1044: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1045-1045: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1046-1046: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1051-1051: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1052-1052: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1053-1053: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1054-1054: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1055-1055: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1056-1056: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1057-1057: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1062-1062: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1063-1063: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1064-1064: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1065-1065: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1066-1066: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1067-1067: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1068-1068: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1074-1074: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1075-1075: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1076-1076: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1077-1077: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1081-1081: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1082-1082: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1083-1083: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1084-1084: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


1084-1084: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1084-1084: Unordered list indentation
Expected: 4; Actual: 6

(MD007, ul-indent)


1085-1085: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


1085-1085: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1085-1085: Unordered list indentation
Expected: 4; Actual: 6

(MD007, ul-indent)


1086-1086: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


1086-1086: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1086-1086: Unordered list indentation
Expected: 4; Actual: 6

(MD007, ul-indent)


1087-1087: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1088-1088: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1089-1089: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


1089-1089: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1089-1089: Unordered list indentation
Expected: 4; Actual: 6

(MD007, ul-indent)


1094-1094: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


1096-1096: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1103-1103: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


1107-1107: Unordered list indentation
Expected: 4; Actual: 7

(MD007, ul-indent)


1111-1111: Unordered list indentation
Expected: 4; Actual: 7

(MD007, ul-indent)


1119-1119: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1124-1124: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


1128-1128: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


1132-1132: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


1139-1139: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1144-1144: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1145-1145: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1146-1146: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1152-1152: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1157-1157: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1162-1162: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


1164-1164: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1165-1165: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1166-1166: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1167-1167: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1168-1168: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1169-1169: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1170-1170: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1177-1177: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1178-1178: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1179-1179: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1186-1186: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1190-1190: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1191-1191: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1192-1192: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1193-1193: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1194-1194: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1198-1198: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1199-1199: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1200-1200: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1206-1206: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1207-1207: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1208-1208: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1214-1214: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


1214-1214: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


1237-1237: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


1237-1237: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: pnpm publish
🔇 Additional comments (30)
modelcontextprotocol/lib/const.ts (1)

1-2: LGTM: New constant added correctly.
The new constant CONFIGURE_COMPONENT_TOOL_NAME is clearly defined with an appropriate name and value. This aligns with the intended tool registration enhancements discussed. For future maintainability, consider adding a brief inline comment or TypeScript docblock indicating its usage context if similar constants require additional clarification.

modelcontextprotocol/.gitignore (3)

1-1: Node Modules Exclusion Correctly Specified
The entry correctly ignores the node_modules directory, which is a standard best practice for Node.js projects.


2-3: Environment Files Exclusion with Exception
Using .env* ensures all environment-related files are ignored, while the exception (!.env.example) allows tracking a sample file. This helps new developers understand the environment configuration without exposing sensitive credentials.


4-4: Distribution Directory Exclusion
Ignoring the dist directory prevents build artifacts from being committed, keeping the repository clean.

modelcontextprotocol/.dockerignore (2)

1-4: Good initial exclusions for build artifacts.
The entries for node_modules, dist, *.md, and *.png look appropriate for excluding typical artifacts from your Docker build context.


6-7: Appropriate exclusion for logs and environment files.
Ignoring *.log files and environment variable files (*.env) is standard practice, ensuring that sensitive data and unnecessary log artifacts are not included in the Docker build context.

modelcontextprotocol/tsconfig.json (1)

14-16: Appropriate Include and Exclude Paths

The inclusion of all files under the src and lib directories and the explicit exclusion of node_modules and dist are correctly defined, ensuring that only the relevant source files are compiled.

modelcontextprotocol/lib/pd-client.ts (1)

23-41: Robust error handling and validations look good.

The approach of catching and rethrowing with a descriptive error message is solid. Cautious logging of environment variable names (without exposing secure values) is also good practice.

🧰 Tools
🪛 GitHub Check: Lint Code Base

[failure] 26-26:
Expected newline between test and consequent of ternary expression


[failure] 26-26:
Expected newline between consequent and alternate of ternary expression


[failure] 26-26:
Missing trailing comma

modelcontextprotocol/package.json (1)

1-36: Package metadata looks good.

Configuration, scripts, and dependencies are appropriately defined for this new package.

modelcontextprotocol/src/stdio.ts (1)

29-44: Clean module execution pattern with proper error handling

The code correctly determines if it's being run as the main module, validates required environment variables, and has proper error handling for the main function execution.

modelcontextprotocol/src/cli.ts (2)

1-22: Good CLI setup with proper versioning

The setup leverages the Commander library effectively and follows best practices for CLI development. Reading the version from package.json ensures version consistency across the application.


56-56: Proper CLI command parsing

The code correctly uses program.parse() to process command line arguments.

modelcontextprotocol/src/sse.ts (5)

1-7: Imports look consistent and clear.
All required modules (Express, CORS, SSEServerTransport, serverFactory, fileURLToPath, and config) are properly imported, with no apparent issues in usage.


12-19: SSE connection setup is straightforward.
Storing the new transport in the transports map keyed by the session ID is understandable. The removal on request close (line 67) helps avoid memory leaks.


43-83: handleSSEConnection is robustly implemented.
Good use of async/await with try/catch. Properly deletes the transport from the map on connection close, preventing stale entries. Logging is clear and consistent.


145-153: Global error handling is well-structured.
Listening to the error event and catching unhandled rejections is a best practice, ensuring that unexpected runtime errors are logged.


180-191: Auto-start logic is standard for ES modules.
The check using fileURLToPath(import.meta.url) ensures this file runs standalone only. This approach maintains flexibility for import usage in other modules.

modelcontextprotocol/CLAUDE.md (13)

9-107: JSON-RPC Type Definitions
The definitions for types such as JSONRPCMessage, along with their union constituents, are comprehensive and well annotated. For additional context, consider adding a reference link to the official JSON-RPC specification.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

11-11: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


11-11: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


14-14: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


25-25: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


25-25: Bare URL used
null

(MD034, no-bare-urls)


30-30: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


30-30: Bare URL used
null

(MD034, no-bare-urls)


38-38: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


43-43: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


52-52: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


64-64: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


73-73: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


80-80: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


85-85: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


93-93: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


100-100: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


212-290: Capabilities and Implementation Interfaces
The ClientCapabilities, ServerCapabilities, and Implementation interfaces are very well detailed. Consider providing examples or guidance for the structure of experimental capabilities to further assist implementers.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

213-213: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


217-217: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


221-221: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


225-225: Unordered list indentation
Expected: 4; Actual: 5

(MD007, ul-indent)


230-230: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


236-236: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


240-240: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


244-244: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


248-248: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


252-252: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


256-256: Unordered list indentation
Expected: 4; Actual: 5

(MD007, ul-indent)


261-261: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


265-265: Unordered list indentation
Expected: 4; Actual: 5

(MD007, ul-indent)


269-269: Unordered list indentation
Expected: 4; Actual: 5

(MD007, ul-indent)


274-274: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


278-278: Unordered list indentation
Expected: 4; Actual: 5

(MD007, ul-indent)


285-285: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


330-377: Pagination and Resource Template Requests
The pagination interfaces and related resource/template request/response interfaces are well-defined. They clearly state the role of cursors in paginated operations. Overall, this section is straightforward and consistent.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

330-330: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


334-334: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


343-343: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


344-344: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


349-349: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


351-351: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


358-358: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


365-365: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


372-372: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


378-450: Resource Access and Subscription Notifications
The interfaces defining resource reading (ReadResourceRequest/Result) and subscription notifications (ResourceListChangedNotification, SubscribeRequest, UnsubscribeRequest, and ResourceUpdatedNotification) are comprehensive. The detailed inline documentation ensures clarity about each parameter and expected behavior.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

379-379: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


385-385: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


386-386: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


387-387: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


394-394: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


401-401: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


408-408: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


414-414: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


415-415: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


416-416: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


423-423: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


429-429: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


430-430: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


431-431: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


438-438: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


444-444: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


445-445: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


446-446: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


452-554: Resource Descriptions and Templates
The Resource and ResourceTemplate interfaces, along with the associated content types (ResourceContents, TextResourceContents, BlobResourceContents), are clearly structured. Including examples for typical resource URIs or MIME types might further clarify usage, although the current documentation is robust.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

453-453: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


457-457: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


458-458: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


459-459: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


464-464: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


465-465: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


466-466: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


471-471: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


472-472: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


473-473: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


478-478: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


483-483: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


489-489: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


493-493: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


494-494: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


495-495: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


500-500: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


501-501: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


502-502: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


507-507: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


508-508: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


509-509: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


514-514: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


519-519: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


525-525: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


529-529: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


530-530: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


531-531: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


535-535: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


542-542: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


549-549: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


550-550: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


551-551: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


556-649: Prompt and Prompt Template Definitions
The prompt-related interfaces (e.g., ListPromptsRequest, GetPromptRequest, Prompt, and PromptArgument) are thoroughly documented. The descriptions and parameter explanations effectively guide the implementation of prompt templating.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

556-556: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


558-558: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


565-565: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


572-572: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


578-578: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


582-582: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


589-589: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


593-593: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


600-600: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


604-604: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


608-608: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


612-612: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


618-618: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


622-622: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


626-626: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


630-630: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


636-636: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


641-641: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


642-642: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


643-643: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


644-644: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


651-665: Embedded Resources and Prompt List Change Notification
The EmbeddedResource interface and the corresponding PromptListChangedNotification are clear and concise. The documentation succinctly explains how embedded content should be handled by clients.

🧰 Tools
🪛 LanguageTool

[style] ~654-~654: ‘for the benefit’ might be wordy. Consider a shorter alternative.
Context: ...t how best to render embedded resources for the benefit * of the LLM and/or the user. */ expo...

(EN_WORDINESS_PREMIUM_FOR_THE_BENEFIT)

🪛 markdownlint-cli2 (0.17.2)

652-652: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


653-653: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


654-654: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


655-655: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


662-662: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


815-864: Logging Interfaces
The logging interfaces (SetLevelRequest, LoggingMessageNotification, and the LoggingLevel type) are well designed and align with syslog severity standards. The inclusion of optional fields such as logger and flexible data types enhances usability.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

815-815: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


817-817: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


823-823: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


830-830: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


836-836: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


840-840: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


844-844: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


851-851: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


852-852: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


853-853: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


854-854: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


854-854: Bare URL used
null

(MD034, no-bare-urls)


924-1012: Content Annotations and Media Interfaces
The interfaces for annotations (Annotations) as well as media content (TextContent, ImageContent, AudioContent) are comprehensive. Including typical examples of annotation objects or a note on acceptable MIME types could further enhance clarity for implementers.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

925-925: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


929-929: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


930-930: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


931-931: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


936-936: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


937-937: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


938-938: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


939-939: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


940-940: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


941-941: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


942-942: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


943-943: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


944-944: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


950-950: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


956-956: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


961-961: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


967-967: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


973-973: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


974-974: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


975-975: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


980-980: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


985-985: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


991-991: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


997-997: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


998-998: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


999-999: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1004-1004: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1009-1009: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1014-1093: Model Preferences and Hints
The model selection preferences (ModelPreferences) and hint definitions (ModelHint) are detailed and provide clear guidance on prioritizing cost, speed, and intelligence. The numerical boundaries and descriptive comments offer good insight into model selection criteria.

🧰 Tools
🪛 LanguageTool

[style] ~1041-~1041: Consider an alternative for the often overused word ‘important’.
Context: ...el. A value of 0 means cost * is not important, while a value of 1 means cost is the m...

(NOT_IMPORTANT)


[style] ~1052-~1052: Consider an alternative for the often overused word ‘important’.
Context: ...l. A * value of 0 means speed is not important, while a value of 1 means speed is *...

(NOT_IMPORTANT)


[style] ~1063-~1063: Consider an alternative for the often overused word ‘important’.
Context: ... A value of 0 means intelligence is not important, while a value of 1 * means intellig...

(NOT_IMPORTANT)


[grammar] ~1084-~1084: This phrase is duplicated. You should probably use “should match” only once.
Context: ...or example: * - claude-3-5-sonnet should match claude-3-5-sonnet-20241022 * - sonnet should match claude-3-5-sonnet-20241022, `claude-3...

(PHRASE_REPETITION)

🪛 markdownlint-cli2 (0.17.2)

1015-1015: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1016-1016: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1017-1017: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1018-1018: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1019-1019: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1020-1020: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1021-1021: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1022-1022: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1023-1023: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1024-1024: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1025-1025: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1029-1029: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1030-1030: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1031-1031: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1032-1032: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1033-1033: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1034-1034: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1035-1035: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1040-1040: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1041-1041: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1042-1042: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1043-1043: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1044-1044: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1045-1045: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1046-1046: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1051-1051: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1052-1052: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1053-1053: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1054-1054: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1055-1055: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1056-1056: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1057-1057: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1062-1062: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1063-1063: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1064-1064: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1065-1065: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1066-1066: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1067-1067: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1068-1068: Unordered list indentation
Expected: 0; Actual: 3

(MD007, ul-indent)


1074-1074: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1075-1075: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1076-1076: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1077-1077: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1081-1081: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1082-1082: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1083-1083: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1084-1084: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


1084-1084: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1084-1084: Unordered list indentation
Expected: 4; Actual: 6

(MD007, ul-indent)


1085-1085: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


1085-1085: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1085-1085: Unordered list indentation
Expected: 4; Actual: 6

(MD007, ul-indent)


1086-1086: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


1086-1086: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1086-1086: Unordered list indentation
Expected: 4; Actual: 6

(MD007, ul-indent)


1087-1087: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1088-1088: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1089-1089: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


1089-1089: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1089-1089: Unordered list indentation
Expected: 4; Actual: 6

(MD007, ul-indent)


1094-1136: Completion Request and Result Structures
The definitions for CompleteRequest and CompleteResult effectively capture the required fields for handling completions. The documentation detailing the maximum allowed items and optional fields such as stopReason is clear and precise.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

1094-1094: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


1096-1096: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1103-1103: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


1107-1107: Unordered list indentation
Expected: 4; Actual: 7

(MD007, ul-indent)


1111-1111: Unordered list indentation
Expected: 4; Actual: 7

(MD007, ul-indent)


1119-1119: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1124-1124: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


1128-1128: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


1132-1132: Unordered list indentation
Expected: 2; Actual: 5

(MD007, ul-indent)


1137-1213: References and Roots Management
Interfaces like ResourceReference, PromptReference, and the roots-related types (ListRootsRequest, ListRootsResult, Root, and RootsListChangedNotification) are well structured. The clear requirement that root URIs must start with “file://” is particularly helpful for ensuring consistency.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~1170-~1170: When ‘access-specific’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...erstand the file system * structure or access specific locations that the client has permissio...

(SPECIFIC_HYPHEN)

🪛 markdownlint-cli2 (0.17.2)

1139-1139: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1144-1144: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1145-1145: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1146-1146: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1152-1152: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1157-1157: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1162-1162: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


1164-1164: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1165-1165: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1166-1166: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1167-1167: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1168-1168: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1169-1169: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1170-1170: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1177-1177: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1178-1178: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1179-1179: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1186-1186: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1190-1190: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1191-1191: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1192-1192: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1193-1193: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1194-1194: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1198-1198: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1199-1199: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1200-1200: Unordered list indentation
Expected: 2; Actual: 3

(MD007, ul-indent)


1206-1206: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1207-1207: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1208-1208: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1214-1262: Client and Server Message Unions
The union types for client messages (ClientRequest, ClientNotification, ClientResult) and for server messages (ServerRequest, ServerNotification, ServerResult) consolidate the protocol’s messaging in a coherent and scalable manner. Excellent work on covering a broad range of interactions.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

1214-1214: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


1214-1214: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


1237-1237: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)


1237-1237: Spaces inside emphasis markers
null

(MD037, no-space-in-emphasis)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (7)
modelcontextprotocol/src/cli.ts (2)

41-54: Inconsistent option requirements between commands

Unlike the stdio command, the --app option is optional here. This is consistent with the implementation in sse.ts which handles undefined app names, but it creates an inconsistency in the CLI interface that might confuse users.

Consider adding port validation and providing more context in the help text about when an app name is required vs. optional.

 program
   .command("sse")
   .description("Start the SSE server (default port: 3010)")
   .option("--app <app>", "Specify the MCP app name")
-  .option("--port <port>", "Specify the port to run the server on")
+  .option("--port <port>", "Specify the port to run the server on (defaults to 3010)")
   .action(async (options) => {
     try {
+      // Validate port if provided
+      if (options.port && !/^\d+$/.test(options.port)) {
+        console.error("Error: Port must be a number");
+        process.exit(1);
+      }
       const { main } = await import("./sse.js")
       await main(options.app, options.port)
     } catch (error) {

56-57: CLI implementation follows best practices

The command parser is properly set up. Consider adding a default action for when no command is specified, such as showing help information.

+program.addHelpText('afterAll', `
+Examples:
+  $ mcp stdio --app my-app
+  $ mcp sse --app my-app --port 3000
+`);
+
 program.parse()
modelcontextprotocol/lib/registerComponentTools.ts (5)

29-53: Consider using a more specific type than any for the handler parameter

The handler parameter is currently typed as any with an eslint-disable comment. For better type safety, consider creating a proper type for the handler function that matches the server's tool handler signature.

- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- handler: any,
+ handler: (args: Record<string, unknown>) => Promise<{
+   content: Array<{ type: string; text: string }>
+ }>,

Otherwise, the error handling in this helper function is well-implemented, particularly catching the "already registered" case.


75-130: Extract property type handling into a dedicated function

The current implementation mixes several concerns: determining property types, building schemas, and constructing descriptions. This makes the code harder to maintain and test. Consider extracting the property processing logic into a separate function.

+ // Process a single configurable property and return its schema and description
+ function processConfigurableProp(
+   cp: {
+     type: string;
+     name: string;
+     optional?: boolean;
+     description?: string;
+     remoteOptions?: boolean;
+   },
+   componentKey: string
+ ): {
+   schema: z.ZodTypeAny | null;
+   description: string;
+   isAppType: boolean;
+ } {
+   let propDescription = "";
+   let schema: z.ZodTypeAny | null = null;
+   let isAppType = false;
+
+   if (cp.type === "app") {
+     isAppType = true;
+     return { schema: null, description: "", isAppType };
+   } else if (cp.type === "string") {
+     schema = z.string();
+   } else if (cp.type === "string[]") {
+     schema = z
+       .union([
+         z.string().transform((val) => {
+           try {
+             return JSON.parse(val)
+           } catch {
+             return [val] // If not valid JSON, treat as single item array
+           }
+         }),
+         z.array(z.string()),
+       ])
+       .refine((val) => Array.isArray(val), {
+         message: "Must be an array of strings",
+       });
+     propDescription += `- ${cp.name}: Return JSON in this format: string[]\n`;
+   } else if (cp.type === "number") {
+     schema = z.number();
+   } else if (cp.type === "integer") {
+     schema = z.number().int();
+   } else if (cp.type === "boolean") {
+     schema = z.boolean();
+   } else {
+     console.error("unhandled type. Skipping", cp.name, cp.type);
+   }
+
+   // Add optional flag and description
+   if (schema && cp.optional) {
+     schema = schema.optional();
+   }
+
+   let description: string = cp.description || "";
+
+   if (cp.remoteOptions) {
+     description += `\n\nYou can use the "${CONFIGURE_COMPONENT_TOOL_NAME}" tool using these parameters to get the values. key: ${componentKey}, propName: ${cp.name}`;
+     if (cp.name.includes("id")) {
+       description += `\n\nIMPORTANT: An ID is required for this property. If you don't have the id and only have the name, use the "${CONFIGURE_COMPONENT_TOOL_NAME}" tool to get the values.`;
+     }
+   }
+
+   if (schema && description.trim()) {
+     schema = schema.describe(description.trim());
+   }
+
+   return { schema, description: propDescription, isAppType };
+ }

Also note that only string arrays are handled specifically - consider adding support for other array types like number[], boolean[], etc., or document why only string arrays have special handling.


16-245: Consider breaking down this large function into smaller, focused functions

The registerComponentTools function is quite large (over 230 lines) and handles multiple responsibilities. To improve maintainability, consider breaking it into smaller functions:

  1. A function to process component properties and build schemas
  2. A function to register a single component as a tool
  3. A function to register the configure component tool

This would make the main function much more readable:

export async function registerComponentTools({
  server,
  app,
  externalUserId,
}: {
  server: McpServer
  app: string
  externalUserId: string
}): Promise<void> {
  // Create a single client instance to use throughout this function
  const pd = createPdClient()
  
  // Helper function to safely register a tool
  const safeRegisterTool = createSafeRegisterToolFunction(server)
  
  // Get all available components
  const components = await fetchAvailableComponents(pd, app)
  
  // Register each component as a tool
  for (const _component of components.data) {
    const component = await fetchComponentDetails(pd, _component.key)
    await registerComponentAsTool(component, pd, safeRegisterTool, app, externalUserId)
  }
  
  // Register the configure component tool
  registerConfigureComponentTool(safeRegisterTool, app, externalUserId, pd)
}

This approach improves readability, testability, and maintainability of the code.


186-186: Consider providing a more user-friendly response format

Currently, the raw JSON response is returned to the user. Consider parsing and formatting the response to make it more user-friendly:

- text: JSON.stringify(response, null, 2),
+ text: formatPipedreamResponse(response),

You would need to implement a formatPipedreamResponse function that extracts the relevant information and presents it in a readable format, perhaps highlighting errors, important values, or key results.


175-179: Avoid logging redundant information and implement structured logging

The current logging is minimal and doesn't provide enough context for debugging issues in production. Consider implementing structured logging with additional context:

- console.log(
-   "Running action:",
-   component.key,
-   "for external user: [REDACTED]",
- )
+ console.log({
+   message: "Running Pipedream action",
+   level: "info",
+   componentKey: component.key,
+   actionType: "run",
+   timestamp: new Date().toISOString(),
+   // Don't log the actual externalUserId for privacy
+ })

This provides more context and makes logs easier to parse and filter in production environments.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b12683f and 21ab744.

⛔ Files ignored due to path filters (1)
  • modelcontextprotocol/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • modelcontextprotocol/lib/pd-client.ts (1 hunks)
  • modelcontextprotocol/lib/registerComponentTools.ts (1 hunks)
  • modelcontextprotocol/src/cli.ts (1 hunks)
  • modelcontextprotocol/src/sse.ts (1 hunks)
  • modelcontextprotocol/src/stdio.ts (1 hunks)
  • modelcontextprotocol/tsconfig.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • modelcontextprotocol/lib/pd-client.ts
  • modelcontextprotocol/src/stdio.ts
  • modelcontextprotocol/src/sse.ts
  • modelcontextprotocol/tsconfig.json
🧰 Additional context used
🧬 Code Definitions (2)
modelcontextprotocol/src/cli.ts (2)
modelcontextprotocol/src/stdio.ts (1)
  • main (6-27)
modelcontextprotocol/src/sse.ts (1)
  • main (21-186)
modelcontextprotocol/lib/registerComponentTools.ts (4)
modelcontextprotocol/lib/pd-client.ts (1)
  • createPdClient (6-47)
modelcontextprotocol/lib/const.ts (1)
  • CONFIGURE_COMPONENT_TOOL_NAME (2-2)
modelcontextprotocol/lib/authProvisions.ts (1)
  • getAuthProvision (5-46)
modelcontextprotocol/lib/schemas.ts (1)
  • ConfigureComponentRawSchema (3-6)
🔇 Additional comments (2)
modelcontextprotocol/src/cli.ts (2)

1-15: Clean ESM setup for version retrieval

The shebang line combined with proper ESM imports and version extraction from package.json provides a solid foundation for the CLI. This approach correctly handles file paths in ESM context.


16-22: Appropriate CLI configuration

The CLI setup is concise and provides clear identification of the tool. The name, description, and version are all properly configured using Commander.js best practices.

Comment on lines +23 to +39
program
.command("stdio")
.description("Start the stdio server")
.requiredOption("--app <app>", "Specify the MCP app name")
.option(
"--external-user-id <id>",
"Specify the external user ID (defaults to a random UUID)",
)
.action(async (options) => {
try {
const { main } = await import("./stdio.js")
await main(options.app, options.externalUserId)
} catch (error) {
console.error("Error starting stdio server:", error)
process.exit(1)
}
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Parameter mapping issue in stdio command

The command structure is good, but there's a mismatch between the option definition and usage. The option is defined as --external-user-id but accessed as options.externalUserId.

Apply this fix:

-      await main(options.app, options.externalUserId)
+      await main(options.app, options.externalUserId)

This is likely working because Commander.js automatically converts kebab-case option names to camelCase in the options object, but it's important to be aware of this conversion when adding new options.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
program
.command("stdio")
.description("Start the stdio server")
.requiredOption("--app <app>", "Specify the MCP app name")
.option(
"--external-user-id <id>",
"Specify the external user ID (defaults to a random UUID)",
)
.action(async (options) => {
try {
const { main } = await import("./stdio.js")
await main(options.app, options.externalUserId)
} catch (error) {
console.error("Error starting stdio server:", error)
process.exit(1)
}
})
program
.command("stdio")
.description("Start the stdio server")
.requiredOption("--app <app>", "Specify the MCP app name")
.option(
"--external-user-id <id>",
"Specify the external user ID (defaults to a random UUID)",
)
.action(async (options) => {
try {
const { main } = await import("./stdio.js")
await main(options.app, options.externalUserId)
} catch (error) {
console.error("Error starting stdio server:", error)
process.exit(1)
}
})

Comment on lines +222 to +234
const response = await pd.configureComponent({
componentId: {
key: args.componentKey,
},
configuredProps: {
[app]: {
authProvisionId: authProvisionResponse.id,
},
},
externalUserId,
propName: args.propName,
})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add error handling for the configureComponent API call

Similar to the runAction call, there's no error handling for the configureComponent API call. Add a try/catch block to gracefully handle errors:

- // Get the configuration options for this property
- const response = await pd.configureComponent({
-   componentId: {
-     key: args.componentKey,
-   },
-   configuredProps: {
-     [app]: {
-       authProvisionId: authProvisionResponse.id,
-     },
-   },
-   externalUserId,
-   propName: args.propName,
- })
+ // Get the configuration options for this property
+ try {
+   const response = await pd.configureComponent({
+     componentId: {
+       key: args.componentKey,
+     },
+     configuredProps: {
+       [app]: {
+         authProvisionId: authProvisionResponse.id,
+       },
+     },
+     externalUserId,
+     propName: args.propName,
+   })
+   
+   return {
+     content: [
+       {
+         type: "text",
+         text: JSON.stringify(response, null, 2),
+       },
+     ],
+   }
+ } catch (error) {
+   console.error(`Error configuring component ${args.componentKey}:`, error)
+   return {
+     content: [
+       {
+         type: "text",
+         text: `Error configuring component ${args.componentKey}: ${error instanceof Error ? error.message : String(error)}`,
+       },
+     ],
+   }
+ }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const response = await pd.configureComponent({
componentId: {
key: args.componentKey,
},
configuredProps: {
[app]: {
authProvisionId: authProvisionResponse.id,
},
},
externalUserId,
propName: args.propName,
})
// Get the configuration options for this property
try {
const response = await pd.configureComponent({
componentId: {
key: args.componentKey,
},
configuredProps: {
[app]: {
authProvisionId: authProvisionResponse.id,
},
},
externalUserId,
propName: args.propName,
})
return {
content: [
{
type: "text",
text: JSON.stringify(response, null, 2),
},
],
}
} catch (error) {
console.error(`Error configuring component ${args.componentKey}:`, error)
return {
content: [
{
type: "text",
text: `Error configuring component ${args.componentKey}: ${error instanceof Error ? error.message : String(error)}`,
},
],
}
}

Comment on lines +143 to +190
safeRegisterTool(component.key, description, schema, async (_args: any) => {
const args = z.object(schema).parse(_args)
const authProvisionResponse = await getAuthProvision({
app,
externalUserId,
})

if (typeof authProvisionResponse === "string") {
return {
content: [
{
type: "text",
text: authProvisionResponse,
},
],
}
}

// Run the action with the provided args
const requestOpts: RunActionOpts = {
actionId: {
key: component.key,
},
configuredProps: {
...args,
[appKey || app]: {
authProvisionId: authProvisionResponse.id,
},
},
externalUserId,
}

console.log(
"Running action:",
component.key,
"for external user: [REDACTED]",
)
const response = await pd.runAction(requestOpts)

return {
content: [
{
type: "text",
text: JSON.stringify(response, null, 2),
},
],
}
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add proper error handling for Pipedream API calls

The component tool handler doesn't include error handling for the pd.runAction call. If this API call fails, the error will propagate up, potentially causing unexpected behavior in the MCP server.

- console.log(
-   "Running action:",
-   component.key,
-   "for external user: [REDACTED]",
- )
- const response = await pd.runAction(requestOpts)
- 
- return {
-   content: [
-     {
-       type: "text",
-       text: JSON.stringify(response, null, 2),
-     },
-   ],
- }
+ console.log(
+   "Running action:",
+   component.key,
+   "for external user: [REDACTED]",
+ )
+ try {
+   const response = await pd.runAction(requestOpts)
+   
+   return {
+     content: [
+       {
+         type: "text",
+         text: JSON.stringify(response, null, 2),
+       },
+     ],
+   }
+ } catch (error) {
+   console.error(`Error running action ${component.key}:`, error)
+   return {
+     content: [
+       {
+         type: "text",
+         text: `Error executing ${component.key}: ${error instanceof Error ? error.message : String(error)}`,
+       },
+     ],
+   }
+ }

Also, consider replacing any with a more specific type for the args parameter:

- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- safeRegisterTool(component.key, description, schema, async (_args: any) => {
+ safeRegisterTool(component.key, description, schema, async (_args: Record<string, unknown>) => {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
safeRegisterTool(component.key, description, schema, async (_args: any) => {
const args = z.object(schema).parse(_args)
const authProvisionResponse = await getAuthProvision({
app,
externalUserId,
})
if (typeof authProvisionResponse === "string") {
return {
content: [
{
type: "text",
text: authProvisionResponse,
},
],
}
}
// Run the action with the provided args
const requestOpts: RunActionOpts = {
actionId: {
key: component.key,
},
configuredProps: {
...args,
[appKey || app]: {
authProvisionId: authProvisionResponse.id,
},
},
externalUserId,
}
console.log(
"Running action:",
component.key,
"for external user: [REDACTED]",
)
const response = await pd.runAction(requestOpts)
return {
content: [
{
type: "text",
text: JSON.stringify(response, null, 2),
},
],
}
})
safeRegisterTool(component.key, description, schema, async (_args: Record<string, unknown>) => {
const args = z.object(schema).parse(_args)
const authProvisionResponse = await getAuthProvision({
app,
externalUserId,
})
if (typeof authProvisionResponse === "string") {
return {
content: [
{
type: "text",
text: authProvisionResponse,
},
],
}
}
// Run the action with the provided args
const requestOpts: RunActionOpts = {
actionId: {
key: component.key,
},
configuredProps: {
...args,
[appKey || app]: {
authProvisionId: authProvisionResponse.id,
},
},
externalUserId,
}
console.log(
"Running action:",
component.key,
"for external user: [REDACTED]",
)
try {
const response = await pd.runAction(requestOpts)
return {
content: [
{
type: "text",
text: JSON.stringify(response, null, 2),
},
],
}
} catch (error) {
console.error(`Error running action ${component.key}:`, error)
return {
content: [
{
type: "text",
text: `Error executing ${component.key}: ${error instanceof Error ? error.message : String(error)}`,
},
],
}
}
})

Comment on lines +108 to +109
console.error("unhandled type. Skipping", cp.name, cp.type)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Improve error handling for unhandled property types

Currently, unhandled property types are logged to console but otherwise silently skipped. Consider either:

  1. Throwing an error (which will stop the registration process)
  2. Adding a default handling mechanism
  3. Recording these properties in a structured way to report back to the caller

For example:

- console.error("unhandled type. Skipping", cp.name, cp.type)
+ const typeName = cp.type || "unknown";
+ console.warn(`Unhandled property type "${typeName}" for property "${cp.name}". Using string schema as fallback.`);
+ schema[cp.name] = z.string().describe(`Original type was "${typeName}" but is handled as string`);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
console.error("unhandled type. Skipping", cp.name, cp.type)
}
const typeName = cp.type || "unknown";
console.warn(`Unhandled property type "${typeName}" for property "${cp.name}". Using string schema as fallback.`);
schema[cp.name] = z.string().describe(`Original type was "${typeName}" but is handled as string`);
}

@dylburger dylburger merged commit 5d39c54 into master Mar 28, 2025
8 checks passed
@dylburger dylburger deleted the mcp branch March 28, 2025 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants