Skip to content

Commit e405b7f

Browse files
committed
chore(docs): Instructions for retrieving MCP server tool schema
1 parent f7833a9 commit e405b7f

File tree

1 file changed

+39
-6
lines changed

1 file changed

+39
-6
lines changed

README.md

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,46 @@ This solution is compatible with most MCP clients that support the streamable HT
224224
MCP servers deployed with this architecture can typically be used with off-the-shelf
225225
MCP-compatible applications such as Cursor, Cline, Claude Desktop, etc.
226226

227-
Using Bedrock AgentCore Gateway in front of your stdio-based MCP server requires that
228-
you duplicate the MCP server's input schema (and optionally, the output schema), and
229-
provide it in the AgentCore Gateway Lambda target configuration. AgentCore Gateway
230-
can then advertise the schema to HTTP clients and validate request inputs and outputs.
227+
You can choose your desired OAuth server provider with Bedrock AgentCore Gateway,
228+
such as Amazon Cognito, Okta, or Auth0.
231229

232-
You can choose your desired OAuth server provider for this solution, such as Amazon Cognito,
233-
Okta, or Auth0.
230+
Using Bedrock AgentCore Gateway in front of your stdio-based MCP server requires that
231+
you retrieve the MCP server's tool schema, and provide it in the
232+
[AgentCore Gateway Lambda target configuration](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-add-target-lambda.html#gateway-lambda-schema).
233+
AgentCore Gateway can then advertise the schema to HTTP clients and validate request inputs and outputs.
234+
235+
To retrieve your stdio-based MCP server's tool schema:
236+
237+
1. Start the MCP inspector: `npx @modelcontextprotocol/inspector`
238+
2. Open the inspector tool in your web browser using the localhost link shown.
239+
3. In the left-hand column, select STDIO transport type, and fill in your server's command and arguments. For example, command `uvx` and arguments `mcp-server-time`.
240+
4. Click Connect.
241+
5. In the main panel, select Tools and click "List Tools".
242+
6. In the bottom "History" panel, select the `tools/list` request.
243+
7. In the Response box, click the Copy clipboard icon in the upper-right corner of the box.
244+
8. Paste the JSON into a new file. It should begin with `{ tools:[...`
245+
9. Add a new key "arn" to your JSON file with the value of your Lambda function's ARN.
246+
247+
Your Lambda function schema should now look something like this:
248+
249+
```json
250+
{
251+
"arn": "arn:aws:lambda:us-west-2:123456789012:function:MyFunction",
252+
"tools": [
253+
{
254+
"name": "process_data",
255+
"description": "Process input data",
256+
"inputSchema": {
257+
"type": "object",
258+
"properties": {
259+
"input": { "type": "string" }
260+
},
261+
"required": ["input"]
262+
}
263+
}
264+
]
265+
}
266+
```
234267

235268
<details>
236269

0 commit comments

Comments
 (0)