This MCP (Model Context Protocol) server provides a wiki capability for Goose AI Agent, allowing you to extend its functionality for information retrieval and knowledge management. The server acts as a specialized extension that integrates with Goose AI to enhance its capabilities.
To get started with the MCP Wiki server, follow these steps:
git clone https://github.com/username/mcp-wiki.git
cd mcp-wiki
npm install
.env
file in the root directory:PORT=3000
API_KEY=your_goose_ai_api_key
WIKI_SOURCE=your_wiki_data_source
npm start
The server should now be running on http://localhost:3000
(or your specified port).
To connect your MCP Wiki server to Goose AI:
http://localhost:3000
for local development)The server exposes the following key endpoints:
curl -X POST http://localhost:3000/query \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_api_key" \
-d '{"query": "your search term"}'
curl -X POST http://localhost:3000/content \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_api_key" \
-d '{
"title": "Article Title",
"content": "Article content goes here",
"tags": ["tag1", "tag2"]
}'
You can customize your MCP Wiki server by modifying the following configuration options in config.json
:
{
"maxResultsPerQuery": 5,
"enableFullTextSearch": true,
"cacheTimeoutMinutes": 30,
"allowedFileTypes": ["md", "txt", "pdf"]
}
Here's a simple example of how to integrate the MCP Wiki with a Node.js application:
const axios = require('axios');
async function queryWiki(searchTerm) {
try {
const response = await axios.post('http://localhost:3000/query', {
query: searchTerm
}, {
headers: {
'Authorization': `Bearer your_api_key`,
'Content-Type': 'application/json'
}
});
return response.data;
} catch (error) {
console.error('Error querying wiki:', error);
}
}
// Example usage
queryWiki('artificial intelligence').then(results => {
console.log('Search results:', results);
});
Check the server logs for more detailed error information:
npm run logs
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.