Add redMCP stdio MCP server
This commit is contained in:
@@ -55,6 +55,56 @@ final class RedmineClient
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias for listIssues() that makes Redmine's built-in issue filters
|
||||
* explicit at call sites.
|
||||
*
|
||||
* Useful filters include project_id, tracker_id, status_id,
|
||||
* assigned_to_id, author_id, category_id, fixed_version_id, query_id,
|
||||
* created_on, updated_on, sort, offset, and limit.
|
||||
*
|
||||
* @param array<string,mixed> $filters Standard Redmine issue list filters.
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
public function filterIssues(array $filters = []): array
|
||||
{
|
||||
return $this->listIssues($filters);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search Redmine using the built-in /search.json endpoint.
|
||||
*
|
||||
* Typical params include project_id, all_words, titles_only, scope,
|
||||
* open_issues, issues, projects, news, documents, changesets, wiki_pages,
|
||||
* messages, offset, and limit.
|
||||
*
|
||||
* @param array<string,mixed> $params Standard Redmine search params.
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
public function search(string $query, array $params = []): array
|
||||
{
|
||||
$query = trim($query);
|
||||
if ($query === '') {
|
||||
throw new RuntimeException('Searching Redmine requires a non-empty query.');
|
||||
}
|
||||
|
||||
return $this->getJson('/search', ['q' => $query] + $params) ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Search only issues using Redmine's built-in /search.json endpoint.
|
||||
*
|
||||
* @param array<string,mixed> $params Additional Redmine search params.
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
public function searchIssues(string $query, array $params = []): array
|
||||
{
|
||||
return $this->search($query, ['issues' => '1'] + $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a normal Redmine issue.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user