#16640·langfuse

用户范围的 API 令牌,用于跨项目访问数据 (MCP/代理)

作者: eenglesson创建于 2026年8月26日更新于 2026年9月29日
标签feat-authfeat-apifeat-rbacfeat-api-authstalefeaturefeat-mcp

What I am asking for is a credential that represents the user (a personal access token, or equivalent), with the following properties: 1. GET /api/public/projects returns every project that the identity can access, not only the project in which the key was created. 2. Trace, observation, prompt, dataset, and similar data APIs accept a projectId (or equivalent) and enforce the user's project-level RBAC. 3. The token cannot exceed the user's UI permissions. A Viewer token cannot write. A project-level role still applies. 4. Organization API keys remain admin-only. This is not a request to let org keys read traces or prompts. GitHub's API is the shape I have in mind: one user token, endpoints take owner / repo. GitHub MCP can span orgs in a single stdio process for that reason. Langfuse MCP cannot, because there is no such token to put in the process environment. What exists today | Credential | What it can do | Cross-project traces / prompts? | Project pk / sk | Data APIs for that one project | No | Organization API key | Create / update / delete projects, project keys, memberships, SCIM | No. Admin only. | UI session | Whatever the user's roles allow | Yes, in the UI only | Public API docs show GET /api/public/projects with a project key returning that project. Org-key routes are provisioning, not observability. The official MCP server is explicit that each API key is scoped to one project, and it rejects org-level keys. Workaround today: one MCP server entry (or CLI profile) per project, each with its own project key. That works. It does not give an agent a single "list my projects, then read this trace" loop, and the tool list multiplies with every extra server. Related, but different | Discussion #10605 already has people asking to switch Langfuse projects inside one agent session. The blocker is the credential, not the MCP tool list. | Community avivsinai/langfuse-mcp#54 is named --profiles, still N processes. Useful local key store. Does not change Langfuse auth. | #12738 is SSO / OIDC for MCP transport. Complementary. OIDC

内容来源: langfuse/langfuse