MCP - Cloning a Repository Issue

Hi All,

I am trying to use Palantir MCP in Claude Code, and I have access to my ontology data and all tools. However, when I try to edit my repository, I first need to clone it locally to allow this. However, it is running into an issue when it tries to do it.

The explanation is below. I am wondering if this is actually a bug or an issue on my behalf.

The tool that’s broken is clone_code_repository_locally.

What it does: It constructs a git clone URL using your Foundry credentials in the format:

https://:@NAME.euw-3.palantirfoundry.co.ukNAME.euw-3.palantirfoundry.co.uk/stemma/git///

What the bug is: Your Foundry account username is your email address (e.g. yourname@gmail.com). When this gets embedded into the URL, @NAME.euw-3.palantirfoundry.co.ukbecomes:

https://yourname@gmail.com:@NAME.euw-3.palantirfoundry.co.uk/..

Git parses URLs by looking for @ to split the credentials from the host. Because your email contains @gmail.com, git sees two @ symbols and misparses the URL — it interprets gmail.com as the host and the token as a port number. Since the token is a long JWT string (not a number), git throws:

URL rejected: Port number was not a decimal number between 0 and 65535

The fix (for Palantir to implement): The @ in the username needs to be URL-encoded as %40 before being embedded in the URL, so it becomes:

https://yourname%40gmail.com:@NAME.euw-3.palantirfoundry.co.uk/

I’ve gotten around this by cloning myself locally, and I have checked that when cloning locally, the ‘@’ is in fact ‘%2540’.

Also, I know I can use VS Code on Foundry instead to do my changes. I was just seeing how I can push what’s possible on the platform.

https://yourname%40gmail.com:@samrajsahota.euw-3.palantirfoundry.co.uk/

1 Like