- Home
- MCP servers
- DashScope
DashScope
- typescript
0
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run a Model Context Protocol (MCP) server that combines a complete MCP implementation with the DashScope AI platform. This server lets you chat with an AI assistant, call tools, access resources, and run it locally or alongside MCP clients, all through a simple set of commands and a web UI.
How to use
You interact with the server through a web UI or via MCP clients. Start the server in stdio mode for integration with MCP clients, or use the built-in web interface for quick testing. When you chat, the system routes your messages through the ai_chat tool, which calls the DashScope API to generate responses and may use the AI tools and resources defined in the server.
How to install
Prerequisites: Node.js 18.0.0 or higher (the runtime must include a built-in fetch API). Install dependencies, configure environment variables, and then run the server components as described.
npm install
# Optional: copy or edit the environment file to configure API access
# Edit DASHSCOPE_API_KEY in the environment variables as needed
npm run build
# Start the web UI server (no MCP stdio required for browser usage)
npm run api
# Open http://localhost:3000 in your browser to use the web UI
# Run the MCP server in stdio mode for client integration
npm start
# Development mode with auto-recompile (optional)
npm run dev
# If you want to use the web interface alongside the MCP server, prefer the above api command for the UI.”
Configuration and runtime notes
The server relies on a DashScope API key to access the DashScope AI capabilities. Store this key in the DASHSCOPE_API_KEY environment variable. The web UI communicates with the MCP server over HTTP for convenience, while the MCP protocol itself uses stdio when you run the server in stdio mode. The Web UI is designed to be user-friendly and handles the underlying stdio-based MCP communication internally.
Development and tools
Developers can add new tools and resources by placing them in the defined directories and registering them with the MCP server. The available tool in this setup is ai_chat, which enables AI dialogue and calls the DashScope API to fetch responses.
To explore or extend capabilities, implement new tools under src/tools and expose them through the MCP server logic in src/server.ts. Resources can be added under src/resources and hooked into the server as needed.
Security and best practices
Keep your API key secure. Do not commit the key to version control. When deploying, prefer environment variables managed by your hosting platform. If you expose the web UI over the internet, ensure you apply appropriate access controls and rate limiting.
Troubleshooting and tips
If you need to test MCP client integration, run the stdio server with npm start and connect your MCP client to the server’s stdio interface. If you want to use the UI first, run npm run api and open http://localhost:3000. Ensure Node.js 18.x+ is installed and your environment variable DASHSCOPE_API_KEY is correctly set.
Available tools
ai_chat
AI dialogue tool that executes chat actions and calls the DashScope API to generate responses and coordinate with other tools and resources