- Home
- MCP servers
- MCP Node.js TypeScript API
MCP Node.js TypeScript API
- typescript
0
GitHub Stars
typescript
Language
2 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"proffillipesilva-mcpnodefil": {
"command": "node",
"args": [
"c:/Users/USER/Desktop/aimcpproj/mcpnodefil/dist/mcp/index.js"
],
"env": {
"PORT": "3000",
"MONGODB_URI": "mongodb://localhost:27017/mcpnodefil"
}
}
}
}You run an MCP server that exposes all API endpoints as MCP tools, enabling AI assistants to interact directly with your MongoDB-backed user and product data. It uses a TypeScript/Node.js REST API with a layered feature structure, client-ready validation, and open interfaces for safe automation workflows.
How to use
You interact with the MCP server through your MCP client. The server exposes tools for managing users and products, allowing you to create, read, update, and delete resources. Tools are typed and validated, so you get reliable, predictable responses while integrating AI-assisted flows into your applications.
How to install
Prerequisites you need before starting:
• Node.js v16 or higher is required.
• MongoDB must be running (locally or remotely).**
Install and run the MCP server
npm install
# Optional: copy the environment example if present and edit
cp .env.example .env
Then start the MCP server in development or production mode depending on your workflow (the MCP runner is invoked with npm run mcp):
npm run mcp
To build and run a production-ready MCP server, follow the project’s standard build steps and then start the runtime via the appropriate start script (npm start). The MCP development flow uses the exact command shown above to launch the local MCP process.
## Configuration and environment
The MCP server configuration includes a local, stdio-based setup that runs the Node.js process directly and passes environment variables for database access and server port.
Environment variables shown for running locally include the MongoDB connection string and the server port.
## Examples and getting started with Claude Desktop
If you plan to use Claude Desktop to drive the MCP server, add a local MCP configuration that launches the Node.js runtime with your built MCP entry point and supplies the required environment variables.
Example configuration (adjust the path to match your installation):
## Available tools
### create\_user
Create a new user with email, password, name, and optional picture URL.
### get\_all\_users
Retrieve a list of all users from the MongoDB collection.
### get\_user\_by\_id
Fetch a single user by their unique ID.
### update\_user
Update fields of an existing user identified by ID.
### delete\_user
Remove a user by their ID.
### create\_product
Create a new product with name, description, price, quantity, and attributes.
### get\_all\_products
Retrieve a list of all products.
### get\_product\_by\_id
Fetch a single product by its ID.
### update\_product
Update fields of an existing product identified by ID.
### delete\_product
Delete a product by its ID.