This is a bare bones basic implementation of an MCP server using FastMCP for Python. I am providing this for anyone who wants to quickly copy, paste run and connect to their tool of choice. Then extend it as they see fit.
- Copy the files into a fresh project with a virtual environment set up.
- Type: pip install -r requirements.txt (to install the packages into the virutal environment)
- Rename the .env.sample file to be just .env
- Set your database credentials in the .env file
- Run the project using: python server.py or for the inspector mcp dev server.py
Claude Code can run these MCP servers by launching a process. Simply add the MCP to the Claude MCP server list (check out the /mcp command for details) and once connected, you can type in a query that would use the tool.