MCP startup discovery ignores tools/list pagination
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
Research direction
The bug is in packages/coding-agent/src/step/mcp.ts at the connectStepMcpServer function around line 309. Look at the existing listAllMcpTools function to see how pagination is handled. The fix involves replacing the single listTools call with a call to listAllMcpTools or implementing similar pagination logic. Run the new regression tests to verify the fix works.
Written by the indexing model from the issue text.
Description
What happened?
MCP startup only discovers the first tools/list page. A server can connect successfully while tools on later pages are missing. An enabled_tools entry naming only a second-page tool produces an empty catalog.
connectStepMcpServer calls listTools once and ignores nextCursor.
Steps to reproduce
- Serve a local HTTP MCP fixture: the first tools/list response contains tool_0 and nextCursor; the next page contains tool_1.
- Connect through connectStepMcpServer.
- Observe only one tools/list request and tool_0. The existing invokeRemoteMcpTool path correctly follows both pages against the same fixture.
The reproduction calls the production function directly without loading extensions.
Expected behavior
Collect every page before filtering and publishing the tools.
I have a small fix in my fork that reuses listAllMcpTools. Six new regression cases fail before the fix and pass afterwards; 33 focused tests and npm run check pass on Windows. Full Linux validation passed: build:offline, npm run check, and the complete isolated ./test.sh.
I'd like to submit the PR once approved with lgtm.
Version
Step Code 0.1.0, main @ cb5fc1456d49d49c62e072bfed2926220083214e; Node v24.14.0, Windows.
- Dominant language
- TypeScript
- Stars
- 54
- Forks
- 20
- Avg merge
- 23m
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stepfun-ai/Step-Code
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stepfun-ai/Step-Code#151 · 1 comment ·
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stepfun-ai/Step-Code#149 · 1 comment ·
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
stepfun-ai/Step-Code#148 · 1 comment ·
-
untriaged
Difficulty 1/5 Under an hour Newbie friendliness 90/100
stepfun-ai/Step-Code#144 · 1 comment ·
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stepfun-ai/Step-Code#141 · 1 comment ·
All issues in stepfun-ai/Step-Code
Similar issues
-
blocklist removal
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
pastelsky/bundlephobia#1122 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100