...and Feedback for MCP:
The possibility for an MCP Service:
Historical routes:
“Show me the trip of device xy on exact date or week or month or last trip...”
"When was my vehicle in city xy"
"When was my vehicle in country xy""
Actual route
"When will vehicle xy reach its home base"
...
The URL for MCP is:
{baseUrl}/api/mcp
Hope its okay to add the question here, in terms of how to configure it.
In ChatGPT while adding a connector after authentication it redirects to this URI.
http://127.0.1.1:8082/api/oidc/authorize?response_type=code&client_id=a
Why is it redirecting a 127.0.1.1,
The configuration is enabled: <entry key='web.mcp.enable'>true</entry>
However, is there something else that needs to be configured as well for the authentication to work, what am I missing please advise.
Probably because you haven't set web.url.
For OAuth to work, you also need to configure client id and client secret. Check config documentation.
Have we got any documentation on how to implement this please?
Which part?
All of it - to make sure I am following it correctly.
I have made changes to the XML by adding.
<entry key='web.mcp.enable'>true</entry>
<entry key='web.url'>https://myurlhere.co.uk</entry>
I have gone to chatgpt and added in the basic details using my actual URL but all I seem to get it a blank white page on the webgui
{baseUrl}/api/mcp
Kind Regards
What is the real URL you're using in ChatGPT?
I am using https://locate.mydomain.co.uk/api/mcp and selecting no auth.
I get the error below but I don't get what authentication it needs as I haven't specified any authentication in the XML file or the chatgpt connector settings just to prove it works
Client error '401 Unauthorized' for url 'https://mydomain.co.uk/api/mcp' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
Why would you select no auth?
I was looking to test it with minimal security which would not be the long term.
So reading above I need to set up using oauth? Have you got a summary of steps to follow to get it working?
Kind Regards
You have to set up oauth. There's no dedicated documentation beyond what you see in this thread and the config doc.
If it helps anyone but my setup to try it out with chatGPT was basically this:
in the traccar config have at least this:
<entry key='web.url'>https://someurl.com</entry>
<entry key='openid.clients'>chatgpt-traccar-mcp:secret_to_generate</entry>
<entry key='web.mcp.enable'>true</entry>
and then replace:
https://someurl.com
chatgpt-traccar-mcp:secret_to_generate
with your actual url and then generate a secret to replace secret_to_generate I used this command on my linux machine: openssl rand -hex 32 to generate a random secret
then you input into chatgpt (probably similar with any other mcp setup) the following:
<entry key='openid.clients'>chatgpt-traccar-mcp:secret_to_generate</entry> so as an example put chatgpt-traccar-mcp as the OAuth Client ID and secret_to_generate in OAuth Client Secret field in chatgptand here is the thing I was troubleshooting the whole day and is a complete oversight on my part but maybe a friendly suggestion for the future, but you need to be logged into traccar in the same browser session as where you are setting up the mcp in chatgpt. If you are not then it will just return a 401 error.
the suggestions I have for improvement would be:
From the blog:
MCP service that you can use in ChatGPT and other AI assistants.
For now the only available function is querying the current device position.
This is a very experimental feature.
Please provide feedback on how useful this is and what tools you would like to be available via MCP.
Yes, maybe i search the doc for this feature :-)