|
| 1 | +# Frequently Asked Questions (FAQ) |
| 2 | + |
| 3 | +## Usage |
| 4 | +### How do I configure HTTP request timeouts? |
| 5 | +By default, HTTP requests timeout after 5 seconds. If you have API endpoints that take longer to respond, you can configure a custom timeout by injecting your own httpx client. |
| 6 | + |
| 7 | +For a working example, see [07_configure_http_timeout_example.py](examples/07_configure_http_timeout_example.py). |
| 8 | + |
| 9 | +### Why are my tools not showing up in the MCP inspector? |
| 10 | +If you add endpoints after creating and mounting the MCP server, they won't be automatically registered as tools. You need to either: |
| 11 | +1. Move the MCP creation after all your endpoint definitions |
| 12 | +2. Call `mcp.setup_server()` after adding new endpoints to re-register all tools |
| 13 | + |
| 14 | +For a working example, see [05_reregister_tools_example.py](examples/05_reregister_tools_example.py). |
| 15 | + |
| 16 | +### Can I add custom tools other than FastAPI endpoints? |
| 17 | +Currently, FastApiMCP only supports tools that are derived from FastAPI endpoints. If you need to add custom tools that don't correspond to API endpoints, you can: |
| 18 | +1. Create a FastAPI endpoint that wraps your custom functionality |
| 19 | +2. Contribute to the project by implementing custom tool support |
| 20 | + |
| 21 | +Follow the discussion in [issue #75](https://github.com/tadata-org/fastapi_mcp/issues/75) for updates on this feature request. |
| 22 | +If you have specific use cases for custom tools, please share them in the issue to help guide the implementation. |
| 23 | + |
| 24 | +### How do I test my FastApiMCP server is working? |
| 25 | +To verify your FastApiMCP server is working properly, you can use the MCP Inspector tool. Here's how: |
| 26 | + |
| 27 | +1. Start your FastAPI application |
| 28 | +2. Open a new terminal and run the MCP Inspector: |
| 29 | + ```bash |
| 30 | + npx @modelcontextprotocol/inspector node build/index.js |
| 31 | + ``` |
| 32 | +3. Connect to your MCP server by entering the mount path URL (default: `http://127.0.0.1:8000/mcp`) |
| 33 | +4. Navigate to the `Tools` section and click `List Tools` to see all available endpoints |
| 34 | +5. Test an endpoint by: |
| 35 | + - Selecting a tool from the list |
| 36 | + - Filling in any required parameters |
| 37 | + - Clicking `Run Tool` to execute |
| 38 | +6. Check your server logs for additional debugging information if needed |
| 39 | + |
| 40 | +This will help confirm that your MCP server is properly configured and your endpoints are accessible. |
| 41 | + |
| 42 | +## Development |
| 43 | + |
| 44 | +### Can I contribute to the project? |
| 45 | +Yes! Please read our [CONTRIBUTING.md](CONTRIBUTING.md) file for detailed guidelines on how to contribute to the project and where to start. |
| 46 | + |
| 47 | +## Support |
| 48 | + |
| 49 | +### Where can I get help? |
| 50 | +- Check the documentation |
| 51 | +- Open an issue on GitHub |
| 52 | +- Join our community chat [MCParty Slack community](https://join.slack.com/t/themcparty/shared_invite/zt-30yxr1zdi-2FG~XjBA0xIgYSYuKe7~Xg) |
0 commit comments