mcp -examples
MCP Examples for AutoDev
claude mcp add --transport stdio aise-workshop-mcp-server-examples uv run --directory /Users/phodal/source/ai/autodev-mcp-test/python-sqlite3/ --with mcp mcp run /Users/phodal/source/ai/autodev-mcp-test/python-sqlite3/server.py
How to use
This MCP server configuration defines a small set of example servers that illustrate how different languages and runtimes can participate in the MCP ecosystem. The filesystem entry is an example of a server backed by a filesystem storage adapter (disabled by default). The greeting server runs a Node.js-based example that can generate simple greeting responses. The echo server uses a Python-based runtime via uv (uvicorn-style runner) to execute an MCP-enabled Python script, showing how Python services can integrate with MCP. The weather server demonstrates a Java-based MCP server packaged as a JAR. You can enable or disable individual servers as needed and connect clients to the MCP endpoints to exchange model-context protocol messages.
How to install
Prerequisites:
- Node.js and npm installed
- Python (and uvx/uvicorn-compatible tool if you plan to use the Python example)
- Java JDK installed for the Java MCP server example
- Access to the filesystem paths used in the config (adjust paths as needed)
Installation steps:
- Create a working directory for the MCP setup and navigate into it.
- Save the MCP configuration shown below to a file named mcp_config.json in this directory (you can rename the file if your MCP runtime expects a different name).
- Ensure your MCP runtime/CLI is installed and available in your PATH. If your environment uses a global MCP CLI (often invoked as mcp), verify it’s installed (the README examples show using npx, node, uv, and java commands for individual servers).
- Start the MCP runtime with the saved configuration. The exact command may vary by runtime; examples commonly use:
- mcp -c mcp_config.json
- or mcp --config mcp_config.json Refer to your MCP runtime documentation for the exact flag to supply the configuration file.
- Verify the servers come up and listen on their configured endpoints. Use the MCP client tooling or integration tests to communicate with the servers according to the MCP protocol.
Notes:
- If you modify the paths in the config (e.g., Node.js script path, Python script path, Java JAR path), update mcp_config.json accordingly before starting.
- The filesystem server entry is marked disabled; remove the disabled flag or set it to false if you want it active.
- Make sure any native dependencies or runtime requirements for Node, Python, or Java servers are installed in your environment.
Additional notes
Tips and caveats:
- The npm package for the filesystem server shown in the config is @modelcontextprotocol/server-filesystem; this is invoked via npx for on-demand execution. If you migrate to a local install, you can switch to node-based execution with a direct path to the server script.
- The greeting server uses a Node.js entrypoint; ensure the path corresponds to a valid JavaScript project with an MCP-compatible handler.
- The echo server demonstrates Python-based MCP usage via uvx; make sure your Python environment has uvx installed and accessible as uv.
- The weather server runs a Java JAR; ensure Java is installed and the JAR path points to a valid MCP-capable application packaged for MCP.
- If you encounter protocol negotiation issues, verify the MCP protocol version and client capabilities align with the server implementations you’re using.
- Keep your environment variables minimal in the config unless the servers require specific API keys or runtime configuration; otherwise, set them in your shell or a .env loaded by the MCP runtime.