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

Using hyphens in name causes src directory not to be created #14

Open
@agiron123

Description

@agiron123

Describe the bug
When the generator is run with hyphens in the name for the server, it appears to be the case that the src directory is not included in the output

To Reproduce
Steps to reproduce the behavior:

Bug: Using hyphens in the server name causes an error.

Here is the failed output:

npx @modelcontextprotocol/create-server some-mcp-server
Need to install the following packages:
  @modelcontextprotocol/create-server@0.3.1
Ok to proceed? (y) y
? What is the name of your MCP server? some-mcp-server
? What is the description of your server? An MCP server for bug report
? Would you like to install this server for Claude.app? Yes
✔ MCP server created successfully!
✓ Successfully added MCP server to Claude.app configuration

Next steps:
  cd some-mcp-server
  npm install
  npm run build  # or: npm run watch
  npm link       # optional, to make available globally

cd some-mcp-server/ls
cd: no such file or directory: some-mcp-server/ls
cd some-mcp-server
ls
README.md     package.json  tsconfig.json
npm install

> some-mcp-server@0.1.0 prepare
> npm run build


> some-mcp-server@0.1.0 build
> tsc && node -e "require('fs').chmodSync('build/index.js', '755')"

error TS18003: No inputs were found in config file '/Users/andre/Documents/Code/some-mcp-server/tsconfig.json'. Specified 'include' paths were '["src/**/*"]' and 'exclude' paths were '["node_modules"]'.


Found 1 error.

npm ERR! code 2
npm ERR! path /Users/andre/Documents/Code/some-mcp-server
npm ERR! command failed
npm ERR! command sh -c npm run build

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/andre/.npm/_logs/2025-02-20T22_42_41_792Z-debug-0.log

When I run the server with this input, it successfully creates the scaffold:

npx @modelcontextprotocol/create-server some-mcp-server
? What is the name of your MCP server? some-mcp-server
? What is the description of your server? An MCP server for bug report
? Would you like to install this server for Claude.app? Yes
✔ MCP server created successfully!
✓ Successfully added MCP server to Claude.app configuration

Next steps:
  cd some-mcp-server
  npm install
  npm run build  # or: npm run watch
  npm link       # optional, to make available globally

ls
some            some-mcp-server doss-mobile     todo-txt
cd some-mcp-server/
npm install

> some-mcp-server@0.1.0 prepare
> npm run build


> some-mcp-server@0.1.0 build
> tsc && node -e "require('fs').chmodSync('build/index.js', '755')"


added 17 packages, and audited 18 packages in 2s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions