Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Joe Chen
mcp_demo
Commits
f3593c8a
Commit
f3593c8a
authored
4 weeks ago
by
Joe Chen
Browse files
Options
Download
Email Patches
Plain Diff
ss
parent
28cc2f42
main
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mcp_server/server.py
+5
-5
mcp_server/server.py
with
5 additions
and
5 deletions
+5
-5
mcp_server/server.py
View file @
f3593c8a
...
...
@@ -219,7 +219,7 @@ async def set_access_token(ctx: Context, token: str) -> str:
"""
try
:
ctx
.
request_context
.
lifespan_context
.
access_token
=
token
return
"Access token successfully set"
except
Exception
as
e
:
return
f
"Error setting access token:
{
str
(
e
)
}
"
...
...
@@ -304,7 +304,7 @@ async def check_domain_availability(ctx: Context, domain_name: str) -> str:
return
error_msg
@
mcp
.
tool
()
async
def
deploy_repository_site
(
ctx
:
Context
,
repository_url
:
str
,
domain_name
:
str
,
username
:
Optional
[
str
]
=
None
,
token
:
Optional
[
str
]
=
None
)
->
str
:
async
def
deploy_repository_site
(
ctx
:
Context
,
repository_url
:
str
,
domain_name
:
str
,
username
:
str
,
token
:
str
)
->
str
:
"""Deploy a website from a Git repository to a custom domain.
This tool clones a Git repository (GitHub, GitLab, or self-hosted Git),
...
...
@@ -313,9 +313,9 @@ async def deploy_repository_site(ctx: Context, repository_url: str, domain_name:
Args:
ctx: The MCP server provided context
repository_url: The Git repository URL to clone (GitHub, GitLab, or self-hosted Git)
domain_name: The subdomain name
(will be deployed as
domain_name.smartzliving.ai
)
username:
Optional
username for private repositories
token:
Optional
token for private repositories
domain_name: The subdomain name
always ask for it, the full domain name will be
domain_name.smartzliving.ai
username: username for private repositories
token: token for private repositories
Returns:
A success message or an error message
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help