Add redMCP stdio MCP server
This commit is contained in:
@@ -35,6 +35,7 @@ Basic issue CRUD is exposed on the same wrapper:
|
||||
|
||||
```php
|
||||
$issues = $client->issues(['project_id' => 'customer-service', 'status_id' => 'open', 'limit' => 10]);
|
||||
$filtered = $client->filterIssues(['query_id' => 12, 'limit' => 25]);
|
||||
$issue = $client->issue(39858);
|
||||
|
||||
$created = $client->createIssue([
|
||||
@@ -47,6 +48,23 @@ $client->updateIssue((int) $created['id'], ['notes' => 'Follow-up note']);
|
||||
$client->deleteIssue((int) $created['id']);
|
||||
```
|
||||
|
||||
Native Redmine search is exposed separately from issue filtering. Use
|
||||
`filterIssues()` or `issues()` when you already know the structured filters.
|
||||
Use `search()` or `searchIssues()` when you want Redmine's built-in text search:
|
||||
|
||||
```php
|
||||
$results = $client->search('power supply', [
|
||||
'all_words' => '1',
|
||||
'limit' => 10,
|
||||
]);
|
||||
|
||||
$issueResults = $client->searchIssues('power supply', [
|
||||
'project_id' => 'customer-service',
|
||||
'open_issues' => '1',
|
||||
'limit' => 10,
|
||||
]);
|
||||
```
|
||||
|
||||
`updateIssue()` is intentionally safe by default: on Helpdesk-backed issues, a
|
||||
normal Redmine note does **not** send an email to the customer. To send through
|
||||
the Helpdesk plugin, opt in explicitly:
|
||||
@@ -66,6 +84,33 @@ Use the default non-email update for internal notes, status/category/assignee
|
||||
changes, and automation cleanup. Use the Helpdesk email path only when the
|
||||
caller deliberately wants the customer to receive mail.
|
||||
|
||||
## MCP server
|
||||
|
||||
`redMCP` can also run as a stdio MCP server. It reads Redmine credentials from
|
||||
environment variables or `redMCP/.env`:
|
||||
|
||||
```sh
|
||||
redMCP/bin/redmcp-server.php
|
||||
```
|
||||
|
||||
Example client configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"redmcp": {
|
||||
"command": "/home/iadnah/redmine/redMCP/bin/redmcp-server.php"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The server exposes tools for native Redmine filtering/search, issue CRUD,
|
||||
Helpdesk-aware issue reads, and explicit Helpdesk email responses. Tools that
|
||||
can send customer-visible mail require an explicit tool call such as
|
||||
`redmine_send_helpdesk_response` or `redmine_update_issue` with
|
||||
`send_helpdesk_email=true`.
|
||||
|
||||
## Test instance
|
||||
|
||||
A working test copy of Redmine is available on the LAN at `192.168.50.170`.
|
||||
|
||||
Reference in New Issue
Block a user