Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Dust MCP ServerAsk the research assistant to summarize my recent project documents"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Dust MCP Server
๐ A TypeScript-based MCP (Model Context Protocol) Server with advanced agent conversation features.
GitHub Repository: dust-mcp-server-postman-railway
Table of Contents
User Manual
Features
โ TypeScript-powered MCP server
๐๏ธ Modern ES2022+ JavaScript features
๐ Built-in API documentation
๐งช Comprehensive test suite with Jest
๐ ๏ธ Developer-friendly tooling
๐ Hot-reloading development server
๐ฆ Module aliases for clean imports
๐ Environment-based configuration
๐งฉ Extensible architecture
๐ Getting Started
โ๏ธ Prerequisites
Before you begin, ensure you have the following installed:
Node.js (v18+ required, v20+ recommended)
npm (included with Node.js)
TypeScript (included as a dev dependency)
Git (for version control)
๐ ๏ธ Installation
Clone the repository
git clone https://github.com/ma3u/dust-mcp-server-postman-railway.git cd dust-mcp-server-postman-railwayInstall dependencies
npm installSet up environment variables
Create a
.envfile in the root directory with the following variables:PORT=3000 NODE_ENV=development DEFAULT_WORKSPACE_ID=default WORKSPACE_DEFAULT_API_KEY=your_api_key_here WORKSPACE_DEFAULT_NAME=Default Workspace
๐๏ธ Development
Start the development server
npm run devThis will start the server with hot-reloading enabled.
Build for production
npm run build npm startRun tests
npm test # Run all tests npm run test:watch # Run tests in watch mode npm run test:coverage # Generate test coverage reportLinting and Formatting
npm run lint # Check for linting errors npm run lint:fix # Automatically fix linting issues npm run format # Format code using Prettier
Developer Manual
Architecture
[Architecture overview]
Agent Conversation Flow
The following diagram illustrates the conversation flow between MCP Client, MCP Server, and Dust with session management:
API Documentation
The following API endpoints are available in the application:
Health Check
Check if the server is running.
Response:
Workspace Agent Configurations
Get all agent configurations for a workspace.
Parameters:
workspaceId(path, required): The ID of the workspaceforceRefresh(query, optional): Force refresh the agent configurations (true/false)
Response:
Get Specific Agent
Get configuration for a specific agent.
Parameters:
workspaceId(path, required): The ID of the workspaceagentId(path, required): The ID of the agent
Response:
๐ Environment Variables
The application uses the following environment variables:
Variable | Required | Default | Description |
| No |
| Port to run the server on |
| No |
| Application environment |
| No |
| Default workspace ID |
| Yes | - | API key for the workspace |
| No | Workspace ID | Display name for the workspace |
๐ค Contributing
Contributions are welcome! Please follow these steps:
Fork the repository
Create a feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
Built with TypeScript and Node.js
Uses Express for the web server
Implements the Model Context Protocol (MCP) specification
๐ก JSON-RPC Interface
The server supports the Model Context Protocol (MCP) via JSON-RPC 2.0 over HTTP.
Discovering Available Tools
To list all available tools, send a mcp_discover request:
Calling a Tool
To call a specific tool, such as list_assistants:
Prerequisites
Ensure you have curl installed. For testing with netcat (nc), install it using:
macOS:
brew install netcatUbuntu/Debian:
sudo apt-get install netcat
๐ Tool Environment Variables
This project uses a .env file to manage environment-specific variables, such as API keys. To get started:
Create your environment file: Copy the example environment file to a new file named
.env:cp .env.example .envUpdate API Keys: Open the newly created
.envfile. You'll see placeholder environment variables for the Dust API:DUST_API_KEY= DUST_WORKSPACE_ID= DUST_AGENT_ID=Update these lines with your actual Dust API Key, Workspace ID, and Agent ID. These environment variables are used by the tools to interact with the Dust API. You can inspect the files in the
toolsdirectory to see how they are used.
Note: The generated tools will need to be configured to use these specific environment variables (DUST_API_KEY, DUST_WORKSPACE_ID, DUST_AGENT_ID). If the tools were generated for a different API or expect different environment variable names, you will need to manually update the JavaScript files in the tools/ directory to use these variables correctly for authentication and API calls.
Testing with Postman
Postman provides a user-friendly interface to test your MCP server. Follow these steps to get started:
Prerequisites for Postman
Install the latest Postman Desktop Application
Node.js v18+ installed
Your MCP server project dependencies installed (
npm install)
Creating a New MCP Request
Open Postman
Click "New" > "MCP Request"
In the new tab, you'll see the MCP request configuration
Configuring the MCP Server
Set the request type to
STDIOIn the command field, enter the full path to Node.js followed by the full path to
mcpServer.js:/Users/ma3u/.nvm/versions/node/v22.14.0/bin/node /Users/ma3u/projects/postman-dust-mcp-server/mcpServer.jsTo find these paths on your system:
Get Node.js path
which node
Get absolute path to mcpServer.js (run from your project directory)
pwd
Then append "/mcpServer.js" to the output
Click "Send" to execute the request
View the response in the lower panel
Available Tools
You can call any of the following tools directly by name in the method field:
list_workspace_vaults- List all workspace vaultslist_assistants- List available assistantslist_data_source_views- List data source viewsget_conversation_events- Get conversation eventsget_data_sources- Get available data sourcessearch_assistants_by_name- Search for assistants by nameget_conversation- Get conversation detailsretrieve_document- Retrieve a documentget_app_run- Get application run detailsget_events_for_message- Get events for a specific messageupsert_document- Create or update a documentget_documents- Get multiple documentscreate_conversation- Start a new conversationcreate_message- Send a messagecreate_content_fragment- Create a content fragmentcreate_app_run- Start a new application runsearch_data_source- Search within a data sourcesearch_data_source_view- Search within a data source view
Troubleshooting
Common Issues and Solutions
Server Not Starting
Verify Node.js is installed and in your PATH
Check that all dependencies are installed (
npm install)Look for error messages in the Postman Notifications tab
Connection Timeouts
Ensure the server is running before making requests
Try restarting the server if it becomes unresponsive
Check that no other process is using the required port
Invalid Method Errors
Use tool names exactly as listed in the "Available Tools" section
Don't add prefixes like
mcp.orrpc.to method namesEnsure the
paramsfield is an empty object{}
Environment Variables
Verify
.envfile exists and contains required variablesEnsure environment variables are properly loaded
Check for typos in variable names
Server Logs
Check the Postman Notifications tab for server output
Look for error messages or stack traces
The server logs all incoming requests and errors
Restarting the Server
If you encounter issues, try these steps:
Click the "Disconnect" button in Postman
Wait a few seconds
Click "Connect" to restart the server
Try your request again
Node Version Issues
Make sure you're using Node.js v18 or higher
You can specify the full path to a specific Node.js version if needed
If using nvm, ensure you're using the correct Node.js version:
nvm use 18 # or your preferred version
Tool Execution Errors
Check the Postman console for detailed error messages
Verify that all required parameters are included in your request
Example: Listing Data Sources
Here's how to list all data sources:
Next Steps
Once you've verified the server works in Postman, you can integrate it with other MCP clients like Claude Desktop.
Use the node command followed by the full path to mcpServer.js as the command for your new Postman MCP Request. Then click the Connect button. You should see a list of tools that you selected before generating the server. You can test that each tool works here before connecting the MCP server to an LLM.
๐ฉโ๐ป Connect the MCP Server to Claude
You can connect your MCP server to any MCP client. Here we provide instructions for connecting it to Claude Desktop.
Step 1: Note the full path to node and the mcpServer.js from the previous step.
Step 2. Open Claude Desktop โ Settings โ Developers โ Edit Config and add a new MCP server:
Restart Claude Desktop to activate this change. Make sure the new MCP is turned on and has a green circle next to it. If so, you're ready to begin a chat session that can use the tools you've connected.
Warning: If you don't supply an absolute path to a node version that is v18+, Claude (and other MCP clients) may fall back to another node version on the system of a previous version. In this case, the fetch API won't be present and tool calls will not work. If that happens, you can a) install a newer version of node and point to it in the command, or b) import node-fetch into each tool as fetch, making sure to also add the node-fetch dependency to your package.json.
Additional Options
๐ณ Docker Deployment (Production)
For production deployments, you can use Docker:
1. Build Docker image
2. Claude Desktop Integration
Add Docker server configuration to Claude Desktop (Settings โ Developers โ Edit Config):
Add your environment variables (API keys, etc.) inside the
.envfile.
The project comes bundled with the following minimal Docker setup:
๐ Server-Sent Events (SSE)
To run the server with Server-Sent Events (SSE) support, use the --sse flag:
๐ ๏ธ Additional CLI commands
List tools
List descriptions and parameters from all generated tools with:
Example:
โ Adding New Tools
Extend your MCP server with more tools easily:
Visit Postman MCP Generator.
Pick new API request(s), generate a new MCP server, and download it.
Copy new generated tool(s) into your existing project's
tools/folder.Update your
tools/paths.jsfile to include new tool references.
๐ฌ Questions & Support
Visit the Postman MCP Generator page for updates and new capabilities.
Join the #mcp-lab channel in the Postman Discord to share what you've built and get help.