Skip to content

Conversation

@galligan
Copy link
Contributor

  • package.json with MCP SDK and @outfitter deps
  • StdioServerTransport entry point
  • Sample hello tool implementation
  • Claude Desktop config in README

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

This was referenced Jan 23, 2026
Copy link
Contributor Author

galligan commented Jan 23, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@greptile-apps
Copy link

greptile-apps bot commented Jan 23, 2026

Greptile Summary

  • Adds complete MCP server project template to enable scaffolding new MCP projects with standardized structure, dependencies, and configuration
  • Implements template structure with Mustache-style variables for project customization ({{projectName}}, {{binName}}, {{description}})
  • Includes working "hello" tool example integrated with @outfitter/logging and proper Claude Desktop configuration documentation

Important Files Changed

Filename Overview
templates/mcp/src/mcp.ts.template Core MCP server implementation with tool registration and request handling logic
templates/mcp/package.json.template Project dependencies and build configuration including MCP SDK and @outfitter packages
templates/mcp/src/server.ts.template Bun-based entry point using StdioServerTransport for MCP server execution

Confidence score: 4/5

  • This PR is safe to merge with low risk as it adds new template files without affecting existing functionality
  • Score reflects well-structured template implementation following project conventions, though minor improvements could be made to error handling patterns and type safety in the tool dispatch logic
  • Pay close attention to templates/mcp/src/mcp.ts.template for the string-based tool dispatch pattern and ensure it follows best practices

Sequence Diagram

sequenceDiagram
    participant User as "User"
    participant Claude as "Claude Desktop"
    participant Server as "MCP Server"
    participant Transport as "StdioServerTransport"
    
    User->>Claude: "Request using hello tool"
    Claude->>Server: "ListToolsRequest"
    Server->>Claude: "Return available tools (hello)"
    Claude->>Transport: "CallToolRequest (hello, args)"
    Transport->>Server: "Route tool call"
    Server->>Server: "Process hello tool with name parameter"
    Server->>Transport: "Return greeting response"
    Transport->>Claude: "Tool response with greeting text"
    Claude->>User: "Display greeting result"
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

8 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +9 to +12
"noEmit": true,
"declaration": true,
"declarationDir": "dist",
"outDir": "dist",
Copy link

Choose a reason for hiding this comment

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

logic: Setting noEmit: true while also configuring declaration: true and output directories creates conflicting intentions - declarations won't be generated when noEmit is enabled

Suggested change
"noEmit": true,
"declaration": true,
"declarationDir": "dist",
"outDir": "dist",
"declaration": true,
"declarationDir": "dist",
"outDir": "dist",

Should this template support declaration generation for distribution, or is it purely for development with noEmit?

Prompt To Fix With AI
This is a comment left during a code review.
Path: templates/mcp/tsconfig.json.template
Line: 9:12

Comment:
**logic:** Setting `noEmit: true` while also configuring `declaration: true` and output directories creates conflicting intentions - declarations won't be generated when noEmit is enabled

```suggestion
		"declaration": true,
		"declarationDir": "dist",
		"outDir": "dist",
```

 Should this template support declaration generation for distribution, or is it purely for development with noEmit?

How can I resolve this? If you propose a fix, please make it concise.

- package.json with MCP SDK and @outfitter deps
- StdioServerTransport entry point
- Sample hello tool implementation
- Claude Desktop config in README

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@galligan galligan changed the base branch from graphite-base/93 to p6/templates/cli January 23, 2026 23:18
@galligan
Copy link
Contributor Author

Tightened tool dispatch in the template: added a small handler map, argument guards/defaults, and a warn log for unknown tools. Restacked and resubmitted.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants