Replies: 1 comment 1 reply
-
I agree this is a super common auth pattern that we are meant to support, but indeed
"headers": {
"type": "array",
"description": "HTTP headers to include",
"items": {
"$ref": "#/$defs/KeyValueInput"
}
} KeyValueInput is: "KeyValueInput": {
"allOf": [
{
"$ref": "#/$defs/InputWithVariables"
},
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the header or environment variable.",
"example": "SOME_VARIABLE"
}
}
}
]
}, InputWithVariables is: "InputWithVariables": {
"allOf": [
{
"$ref": "#/$defs/Input"
},
{
"type": "object",
"properties": {
"variables": {
"type": "object",
"description": "A map of variable names to their values. Keys in the input `value` that are wrapped in `{curly_braces}` will be replaced with the corresponding variable values.",
"additionalProperties": {
"$ref": "#/$defs/Input"
}
}
}
}
]
}, Notably: So the example you're looking for is something like:
Would welcome a PR adding something like this example to the docs in the repo :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Discussion Topic
We can declare remote MCP servers like in the example https://github.com/modelcontextprotocol/registry/blob/main/docs/server-json/examples.md#server-with-remote-and-package-options
For remotes, there is a
headers
field where we can specify an array of Headers with default value, if it's required or not, etc.I'm facing a question for the GitHub mcp server
for example at https://github.com/github/github-mcp-server?tab=readme-ov-file#install-in-vs-code
it says that we need to provide a Authorization field in the headers
my question is the following, how can we say that we want the user to enter the token value and that we can append this value to
Bearer <User Token>
for the Authorization field.Because if we declare an
Authorization
field in theheaders
, how can we say it requiresBearer
prefix. I assume for this kind of field, we don't want to have users being prompted to enterBearer keyword
firstI saw InputWithVariables but it looks like it's for command line arguments, not headers.
Beta Was this translation helpful? Give feedback.
All reactions