Skip to content

Mcp server#447

Merged
kaospr merged 9 commits intomainfrom
setup/mcp-server
Mar 5, 2026
Merged

Mcp server#447
kaospr merged 9 commits intomainfrom
setup/mcp-server

Conversation

@kaospr
Copy link
Collaborator

@kaospr kaospr commented Mar 5, 2026

No description provided.

kaospr and others added 8 commits March 3, 2026 16:36
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement MCP server tools (Tasks 5-8):
- ShowOrganizationTool: view organization details by ID
- Client tools: ListClientsTool, ShowClientTool, CreateClientTool,
  UpdateClientTool, DeleteClientTool (soft delete via discard)
- Project tools: ListProjectsTool, ShowProjectTool, CreateProjectTool,
  UpdateProjectTool, DeleteProjectTool (soft delete via discard)
- Task tools: ListTasksTool, ShowTaskTool (read-only)

All tools follow ActionPolicy authorization patterns matching the
existing API controllers, use authorized_scope for data isolation,
and include comprehensive test coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Non-admin users were able to list projects via MCP tool when the API
controller would return 403 Forbidden. Now matches the API behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement the remaining MCP tools:
- TimeReg tools: list (with pagination), show, create, update, delete
- ToggleTimerTool: start/stop timer on time registrations
- User tools: list, show, get_current_user (with org info)
- RegenerateApiTokenTool: regenerate the current user's API token
- GetReportsTool: aggregated time reports with project/user breakdowns

All tools follow existing authorization patterns using ActionPolicy
scopes (`:own` for time_regs, full scope for reports). Includes
comprehensive tests covering happy paths, auth errors, and access
control boundaries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract format_time_reg to ApplicationTool base class (was duplicated
  in 5 files)
- Add authorize! calls to ListClientsTool and ListTasksTool for
  consistency with API controllers
- Fix ListProjectsTool authorize! to not pass unnecessary record arg
- Remove unused application_resource.rb

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MCP clients should not be able to reset or supply API tokens.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Collaborator Author

@kaospr kaospr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets try this out! 😁

@kaospr kaospr merged commit 4f6c608 into main Mar 5, 2026
3 of 4 checks passed
@kaospr kaospr deleted the setup/mcp-server branch March 5, 2026 14:20
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.

1 participant