add contribute guide and fix openai implement to openai-compatible (#13)

This commit is contained in:
Earisty
2025-04-12 04:16:43 +08:00
committed by GitHub
parent e614a4d061
commit 54ff95c421
8 changed files with 84 additions and 11 deletions
+4
View File
@@ -0,0 +1,4 @@
./output/mcphost --model openai:<your-model-name> \
--openai-url <your-base-url> \
--openai-api-key <your-api-key> \
--config ./conf/demo.json --debug
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
RUN_NAME="mcphost"
mkdir -p output
go build -o output/${RUN_NAME}
+22
View File
@@ -0,0 +1,22 @@
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"./"
]
},
"weather": {
"command": "uv",
"args": [
"--directory",
"/Users/bytedance/code/MCP/my_host/weather",
"run",
"weather.py"
]
}
}
}
+31
View File
@@ -0,0 +1,31 @@
# Contribute README
Thanks for your contribution, you can follow these step to run this repo and debug it.
## Run demo
1. clone this repo to your work dir.
```bash
git clone https://github.com/mark3labs/mcphost.git
```
2. enter the `contribute` dir.
```bash
cd mcphost/contribute
```
3. run `build.sh` to build your binary file.
```bash
./build.sh
```
4. open `boost.sh` file and fill your model info in.
```bash
cat boost.sh
vi boost.sh
```
5. run `boost.sh` to run your mcphost, if you don't want run it in debug model, you can delete the `--debug` flag in `boost.sh`.
```bash
./boost.sh
```
## Contribute your code
just write your code and push it.