Skip to content

feat: add MCP (Model Context Protocol) server for elmclient#127

Open
filhocf wants to merge 2 commits intoIBM:masterfrom
filhocf:feature/mcp-server
Open

feat: add MCP (Model Context Protocol) server for elmclient#127
filhocf wants to merge 2 commits intoIBM:masterfrom
filhocf:feature/mcp-server

Conversation

@filhocf
Copy link
Copy Markdown

@filhocf filhocf commented Mar 26, 2026

Summary

Adds a built-in MCP (Model Context Protocol) server that exposes elmclient functionality as tools for AI assistants (Claude, GPT, Copilot, etc.).

Closes #125

What is MCP?

Model Context Protocol is an open standard for connecting AI assistants to external tools and data sources. It's supported by Claude, VS Code Copilot, and many other AI tools.

Changes

  • elmclient/mcp_server.py — MCP server with 3 tools:

    • list_projects(domain) — List accessible projects (ccm/rm/qm)
    • list_workitems(project, query, pagesize) — Query work items via OSLC
    • get_workitem(project, id) — Get work item details
  • setup.py — Added:

    • extras_require={"mcp": ["mcp[cli]"]} — Optional dependency
    • elm-mcp-server console_scripts entry point

Installation

pip install 'elmclient[mcp]'

Configuration

Via environment variables:

export ELM_HOST=https://your-elm-server.com
export ELM_USER=username
export ELM_PASSWORD=password
elm-mcp-server

Or via ~/.elm_credentials.json:

{"host": "https://...", "username": "...", "password": "..."}

MCP Client Configuration

{
  "mcpServers": {
    "elm": {
      "command": "elm-mcp-server",
      "env": {
        "ELM_HOST": "https://your-elm-server.com",
        "ELM_USER": "username",
        "ELM_PASSWORD": "password"
      }
    }
  }
}

Notes

  • MCP dependency is optional — existing users are not affected
  • Follows the same patterns as existing elmclient code
  • Tested with a production ELM instance

filhocf added 2 commits March 26, 2026 13:31
Adds a built-in MCP server that exposes ELM functionality as tools
for AI assistants (Claude, GPT, Copilot, etc.).

Tools provided:
- list_projects: List accessible projects (ccm/rm/qm)
- list_workitems: Query work items via OSLC
- get_workitem: Get work item details

Configuration via environment variables or ~/.elm_credentials.json.

Closes IBM#125

Signed-off-by: Claudio Ferreira Filho <filhocf@gmail.com>
- Add 'mcp' extras_require for optional MCP support
- Add 'elm-mcp-server' console_scripts entry point
- Install with: pip install 'elmclient[mcp]'

Signed-off-by: Claudio Ferreira Filho <filhocf@gmail.com>
@filhocf filhocf force-pushed the feature/mcp-server branch from a23426e to b1d69e5 Compare March 26, 2026 16:32
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.

Feature request: MCP (Model Context Protocol) server for elmclient

1 participant