Skip to content

feat: add an MCP server with Passport OAuth - #136

Open
kachelle wants to merge 12 commits into
dev-null-sh:productionfrom
kachelle:feat/mcp-server
Open

kachelle wants to merge 12 commits into
dev-null-sh:productionfrom
kachelle:feat/mcp-server

Conversation

@kachelle

@kachelle kachelle commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

An mcp server at POST /mcp, using OAuth with Passport.

The tools call the existing actions and queries, and only see commits the user is allowed to see.

Try it locally: claude mcp add --transport http devnull https://dev-null.test/mcp, then /mcp → devnull → Authenticate.

kachelle and others added 2 commits October 15, 2026 20:47
Adds a remote MCP server at /mcp, authenticated with OAuth through Passport
(dynamic client registration, authorization code with PKCE).

Tools: read the log, show a commit, search users, commit or reply, star a
commit, follow a user. They call the existing actions and queries.

Passport's user_id columns are UUIDs to match the users table, and the
device code grant is disabled.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The deferred suggestedUsers shared prop made the consent page issue a second
GET to /oauth/authorize, which replaced the session auth token and made
approving fail with a 403.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@xHeaven

xHeaven commented Oct 18, 2026

Copy link
Copy Markdown
Member

@nunomaduro This PR touches database migrations, authentication / permissions, new third-party dependencies, and configuration. Could you take a look?

Resolve conflicts in User, AppServiceProvider and composer files, and
adapt the MCP server to production: the everyone log is now latest,
UserSearchQuery takes the viewer, and migrations no longer have down
methods.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kachelle kachelle changed the title feat: MCP server with Passport OAuth feat: add an MCP server with Passport OAuth Oct 19, 2026
MCP commits now take the same 4,000 characters as the app, with blank
lines collapsed first. The consent page reads the user through useUser,
PHPStan's errors in the MCP code are typed away, and tests cover the
tool schemas, deleted commits in a thread and ambiguous hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kachelle

Copy link
Copy Markdown
Contributor Author

No more merge conflicts @xHeaven !

@paulinevos

Copy link
Copy Markdown
Contributor

I'm not super convinced about this one. I don't know if there's much of a use case for having agents do things like star commits, etc. If this is really something people want, it might work better as a standalone project calling the API?

@kachelle

kachelle commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

@paulinevos , its more to easily be able to post from an agent.

But you are maybe right, as in: this will lead to less quality commits.

Its okay to close!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants