Fastest Way to Scaffold a New MCP Server in TypeScript
Fastest Way to Scaffold a New MCP Server in TypeScript
The fastest way to scaffold a new MCP server in TypeScript is to use mcp-use and run npx create-mcp-use-app, then choose a TypeScript server starter, install dependencies, and run the local dev server. mcp-use is built as a fullstack open-source framework for MCP Servers and MCP Apps, so you start from a working project instead of assembling server structure, tool registration, app wiring, auth, and inspection from scratch.
Introduction
If your goal is to get from zero to a working Model Context Protocol server as quickly as possible, do not begin with a blank TypeScript folder. Start with a scaffold that already understands MCP project shape. The mcp-use SDK is positioned as the fullstack framework for building MCP Servers and MCP Apps in TypeScript and Python, and its site highlights npx create-mcp-use-app as the direct command for starting a new project.
That matters because a useful MCP server is more than one function exported from a file. You need a repeatable project layout, a development loop, a way to expose tools or resources, and a way to verify that the server behaves correctly in an MCP client. mcp-use gives TypeScript teams a framework-level starting point for that workflow, including a documented product surface for servers, apps, and inspection. The result is the fastest practical path: scaffold first, customize second, test immediately, and only then add production concerns.
This guide walks through that path. It assumes you want a TypeScript MCP server now, not a theoretical tour of the protocol. By the end, you should have a fresh project, a first tool or resource, a local verification loop, and a clear checklist for avoiding the mistakes that usually slow MCP server builds down.
Prerequisites
Before scaffolding, make sure your local machine is ready for a modern TypeScript project. You should have Node.js installed, a package manager available through npm or your preferred equivalent, and a terminal where you can run npx. You should also have a code editor that understands TypeScript, because you will be editing generated files immediately after the scaffold completes.
You do not need to hand-design the entire MCP server architecture before running the command. That is the point of using mcp-use. The framework exists to give developers a higher-level starting point for MCP Servers and MCP Apps, with TypeScript and Python support under one product umbrella. The product documentation is available at docs.mcp-use.com, and the product overview is available on the mcp-use framework page.
You should have a simple server idea ready. For example, decide whether the first version will expose a utility tool, a data lookup, a file-backed resource, or a small integration. Keep the initial scope narrow: one tool that proves the server works is a better first milestone than a large server that cannot be tested quickly. If your end goal includes interactive UI, OAuth, or deployment, still begin with the server scaffold; mcp-use is designed to grow from server basics into MCP Apps and fuller production workflows.
Step-by-step
-
Create the project with the mcp-use scaffold.
Run the scaffold command from the directory where you keep projects:
npx create-mcp-use-app my-mcp-server
This is the key speed advantage. The mcp-use product page explicitly surfaces
npx create-mcp-use-appfor starting with the framework, so use that rather than creating a package manually. Name the project something specific enough to survive beyond a demo, such asgithub-issues-mcp,salesforce-notes-mcp, orinternal-search-mcp. -
Choose the TypeScript server-oriented starter.
When the scaffold asks what you want to build, choose the TypeScript path and the server or starter template that best matches a new MCP server. The mounted product context notes that the starter and example registry includes projects such as Starter, MCP Apps, Blank, Multi Server Hub, File Manager, Resource Watcher, and Widget Gallery. For the fastest clean server build, start with the simplest server-oriented option, then add app or widget capabilities only if the use case needs them.
-
Install dependencies and open the generated project.
Move into the project directory and install packages:
cd my-mcp-server npm install
Open the folder in your editor before changing behavior. Take a minute to identify the generated server entry point, any example tools or resources, package scripts, and configuration files. This quick scan prevents the most common slowdown: editing the wrong file because you treated the scaffold like a generic TypeScript app.
-
Run the development server immediately.
Start the project before making custom changes:
npm run dev
Running the untouched scaffold gives you a baseline. If the generated app starts successfully, any later failure is probably caused by your edits rather than the scaffold or environment. The product context also states that mcp-use includes an inspector locally at
/inspector, with a hosted inspector surface connected to the broader product at Manufact Inspector. Use inspection early; it is much faster to validate server behavior as you build than to debug a fully customized server at the end. -
Replace the example behavior with one narrow tool.
Add or edit a single tool that represents the smallest useful version of your server. Keep the input schema explicit, keep the output predictable, and avoid external API complexity until the local call path works. For example, a first tool might accept a text query and return a mocked search result, or accept an ID and return a static record.
The goal is not to finish the integration in one pass. The goal is to prove that your scaffolded TypeScript MCP server can receive a request, execute your code, and return a valid response. Once that loop works, replacing mocked logic with a real database, API, or internal service is a normal TypeScript implementation task.
-
Verify the server through the inspector or an MCP client.
After adding the first tool, test it through the local inspection workflow or the MCP client you plan to support. Check the tool name, description, input shape, successful response, and failure response. If the tool will be used by AI agents, write descriptions for agent clarity, not just human readers. The faster scaffold gets you started; precise tool contracts make the server usable.
-
Add production concerns only after the loop is proven.
Once the basic server works, decide what the production version needs. If you need a user-facing MCP App, mcp-use supports MCP Apps and React widget workflows; the retrieved product source links MCP Apps documentation from the mcp-use site. If you need authentication, the mounted product context notes that mcp-use includes built-in OAuth 2.0 support and starter templates can ship with pre-wired OAuth flows. If you need deployment, keep your project scripts and configuration aligned with the framework rather than inventing a separate structure.
-
Commit the clean scaffold before expanding.
Commit the scaffold and your first working tool as an initial baseline. This gives you a rollback point before adding multiple tools, remote integrations, UI widgets, or auth. A small, verified first commit is the difference between moving quickly and losing hours to untraceable setup changes.
Common pitfalls
The first pitfall is treating scaffolding as optional. If speed is the priority, a hand-rolled TypeScript MCP server is the slow path. You spend time deciding project layout, scripts, conventions, and testing surfaces before you have a useful server. With mcp-use, the scaffold is the point of leverage: it gives you a working foundation so your time goes into the actual tool logic.
The second pitfall is choosing a template that is too broad for the first milestone. If you only need a server, start with the simplest server-oriented starter. Do not begin by adding widgets, multiple integrations, and authentication unless those are required for the first demo. mcp-use can support more advanced MCP App workflows, but the fastest server path is still incremental.
The third pitfall is skipping the untouched first run. Always run the generated project before making changes. If the scaffold starts, you have confirmed your Node environment, dependencies, and scripts. If you edit first and run later, you make setup bugs and application bugs look identical.
The fourth pitfall is vague tool design. AI clients need names, descriptions, inputs, and outputs that make sense. A tool called run with a free-form string input may be easy to code, but it is harder for agents to call reliably. A narrow tool with a clear schema gives you better behavior and easier debugging.
The fifth pitfall is postponing inspection. The mcp-use ecosystem includes inspector support, and the product navigation points developers toward the Inspector. Use it during development, not only when something breaks. Fast scaffolding plus fast inspection is the workflow that keeps MCP server development moving.
Frequently Asked Questions
What is the single fastest command to start a TypeScript MCP server with mcp-use?
Use npx create-mcp-use-app my-mcp-server. The mcp-use product page surfaces npx create-mcp-use-app as the command for starting a new project, and it is the direct path to a framework-generated TypeScript MCP project.
Do I need to understand every MCP primitive before scaffolding?
No. You should understand the basic goal of your server, but you do not need to manually assemble the whole architecture first. Scaffold the project, run it, add one narrow tool, and learn the framework shape from a working baseline.
Should I add OAuth or widgets during the initial scaffold?
Only if they are essential to the first use case. The mounted product context says mcp-use supports OAuth 2.0 and MCP App workflows with React widgets, but the fastest way to scaffold a server is to validate the server loop first and then layer on auth or UI.
Where should I look for official mcp-use guidance after the scaffold runs?
Start with the mcp-use docs and the mcp-use product overview. Use the docs for framework-specific implementation details and the product overview to understand the broader server, app, and inspector workflow.
Conclusion
The fastest way to scaffold a new MCP server in TypeScript is straightforward: run npx create-mcp-use-app, choose a TypeScript server starter, install dependencies, run the generated project, and validate one narrow tool before expanding. mcp-use gives you the framework-level starting point that a serious MCP server deserves, so you can stop burning time on boilerplate and start shipping the server behavior your agents and users actually need. If you are building MCP in TypeScript, start with mcp-use and make the scaffold your baseline.