Client-side token specification support? #137
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/OpenSpec
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
RFC - Request For Comments
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
hermes-attempted
hermes-needs-clarification
hermes-ready
hermes-review
hermes-wip
human-required
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
agentic-forges/forgejo-mcp#137
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Perhaps I'm asking for something that is not part of the design--so please forgive me if I'm asking for something that is out of scope. It seems like the means of authenticating with forgejo should be from the one making the tool call rather than the MCP server. This seems to be how it works with stdio. Is it not possible to do that with HTTP/SSE?
The reason I'm asking is that my use case is to use forgejo-mcp as a central MCP server for several agents and/or the coding assistants of my devs--not just a singular coding assistant. I need these agents to have different levels of access to entities of different organizations. While I understand that I will have to make tokens for each persona, I don't want to have to run an MCP-sidecar process for each of them in order to ensure proper access.
What do you recommend that I do?
Mhm ... did u try it? I am not sure if it works but did u try to to run the server like described ...
but without the token?
I was asuming the whole time this works and the credentials can be part of the request?! Currently i don't use it that but i thought thats the way it would work ...
I checked it ... u r right. it's not the way forgejo-mcp currently works. I have addressed the problem in pr #138.
I think I may not have explained my usecase--or maybe I don't understand. So I'll try to be more specific about what I'm asking for and what my present understanding is.
My present understanding
The token allows the client to access the entities it needs to have access to and none that it does not. Thus, I have two options:
My use case
Both of the above approaches are not ideal for my use case. The MCP server needs to be a centralized MCP server that many clients can access, but each client needs to have a limited subset of access, as in the topology below (using HTTP transport)
.... And probably several more clients that spin up and down dynamically ....
Is it more clear what I'm asking for now? Am I just wrong in my understanding of how forgejo-mcp works? In any case, it was pretty clear to me, via the existing documentation, that my usecase was not supported.
yep, i think i got that. check pr #138. Addresses this the common need for a mcp working actually as a distributed service @fsryanorg?
This is exactly what PR #138 enables. With that change, you can run a single centralized
forgejo-mcpinstance and each client provides its own token via the standard HTTPAuthorizationheader.How it works with PR #138
1. Start the server (optionally without any global token):
2. Client 1 makes a request with their specific token:
3. Client 2 makes a request in the same session (or a different one) with their token:
The server extracts the token from the header for every individual request, creating a short-lived Forgejo client scoped specifically to that request/identity. This keeps the server completely stateless regarding authentication, perfectly supporting your distributed service topology.
@byteflavour wrote in https://codeberg.org/goern/forgejo-mcp/issues/137#issuecomment-15749870:
Ah. I didn't see this as I was messing around with the formatting of my beautiful diagram. Thanks. I'll read through that issue.
yeah, your post is great ... my agent also praised the diagram ;)
ah and btw ... #138 isn't a new issue. it's a pull request ... u can check it out and play around with it. i tested it and it works in my lab.
woke up to this thread — love it ❤️
@fsryanorg thanks for the crisp use case and that diagram — it carried the point. exactly the topology i want forgejo-mcp to support.
@byteflavour respect. diagnosing the gap and shipping PR #138 in the same morning is what open source should feel like. reviewing it now.
community over centralization 🔥
please give https://codeberg.org/goern/forgejo-mcp/releases/tag/v2.24.2 a try